From a1a69b80425010845e52de1771e20b794f963399 Mon Sep 17 00:00:00 2001 From: Daniel Xie Date: Mon, 6 Aug 2018 21:15:31 -0400 Subject: [PATCH] Prevent dev menu from being shown in produ --- dist/engine.bundle.js | 2 +- src/engine.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 24f35fcf2..6efe44f4a 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -1,2 +1,2 @@ -!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],d=0,h=[];d0?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),R.hp=Math.round(this.max_hp*e)},S.prototype.resetMultipliers=function(){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},S.prototype.calculateHackingChance=function(){var e=(100-this.getCurrentServer().hackDifficulty)/100,t=1.75*this.hacking_skill+.2*this.intelligence,n=(t-this.getCurrentServer().requiredHackingSkill)/t*e*this.hacking_chance_mult;return n>1?1:n<0?0:n},S.prototype.calculateHackingTime=function(){return 5*((2.5*(this.getCurrentServer().requiredHackingSkill*this.getCurrentServer().hackDifficulty)+200)/(this.hacking_skill+100+.1*this.intelligence))/this.hacking_speed_mult},S.prototype.calculatePercentMoneyHacked=function(){var e=(100-this.getCurrentServer().hackDifficulty)/100*((this.hacking_skill-(this.getCurrentServer().requiredHackingSkill-1))/this.hacking_skill)*this.hacking_money_mult/240;return console.log("Percent money hacked calculated to be: "+e),e<0?0:e>1?1:e*i.a.ManualHackMoney},S.prototype.calculateExpGain=function(){var e=this.getCurrentServer();return null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty),(e.baseDifficulty*this.hacking_exp_mult*.3+3)*i.a.HackExpGain},S.prototype.hack=function(){this.actionTime=this.calculateHackingTime(),console.log("Hacking time: "+this.actionTime),this.startAction=!0},S.prototype.analyze=function(){this.actionTime=1,this.startAction=!0},S.prototype.hasProgram=function(e){for(var t=R.getHomeComputer(),n=0;n0?this.intelligence_exp+=e:console.log("Not gaining intelligence experience bc it hasn't been unlocked yet")},S.prototype.queryStatFromString=function(e){var t=e.toLowerCase();return t.includes("hack")?R.hacking_skill:t.includes("str")?R.strength:t.includes("def")?R.defense:t.includes("dex")?R.dexterity:t.includes("agi")?R.agility:t.includes("cha")?R.charisma:t.includes("int")?R.intelligence:void 0},S.prototype.resetWorkStatus=function(){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.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",document.getElementById("work-in-progress-text").innerHTML=""},S.prototype.gainWorkExp=function(){this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)},S.prototype.finishWork=function(e,t=!1){e&&(this.workRepGained/=2),this.gainWorkExp(),r.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var n="You earned a total of:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the company
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(n=e?"You worked a short shift of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

Since you cancelled your work early, you only gained half of the reputation you earned.

"+n:"You worked a full shift of 8 hours!

"+n,t||Object(v.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),t){var a="You worked a short shift of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+Object(w.formatNumber)(this.workMoneyGained,2)+", "+Object(w.formatNumber)(this.workRepGained,4)+" reputation, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()},S.prototype.startWork=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.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=o.a.MillisecondsPer8Hours;var e=Object(_.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Cancel Work",e.addEventListener("click",function(){return R.finishWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.work=function(e){this.workRepGainRate=this.getWorkRepGain(),this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var t=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer8Hours){var n=o.a.GameCyclesPer8Hours;return this.workHackExpGained=this.workHackExpGainRate*n,this.workStrExpGained=this.workStrExpGainRate*n,this.workDefExpGained=this.workDefExpGainRate*n,this.workDexExpGained=this.workDexExpGainRate*n,this.workAgiExpGained=this.workAgiExpGainRate*n,this.workChaExpGained=this.workChaExpGainRate*n,this.workRepGained=this.workRepGainRate*n,this.workMoneyGained=this.workMoneyGainRate*n,void this.finishWork(!1)}var a=r.a[this.companyName],i="0";null!=a&&a instanceof r.b?i=a.playerReputation:console.log("ERROR: Could not find Company: "+this.companyName),document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition.positionName+" at "+this.companyName+" (Current Company Reputation: "+Object(w.formatNumber)(i,0)+")

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

You have earned:

$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ($"+Object(w.formatNumber)(this.workMoneyGainRate*t,2)+" / sec)

"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*t,4)+" / sec) reputation for this company

"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*t,4)+" / sec) hacking exp

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

"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*t,4)+" / sec) charisma exp

You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain half of the reputation you've earned so far."},S.prototype.startWorkPartTime=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.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=o.a.MillisecondsPer8Hours;var e=Object(_.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Stop Working",e.addEventListener("click",function(){return R.finishWorkPartTime(),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.workPartTime=function(e){this.workRepGainRate=this.getWorkRepGain(),this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var t=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer8Hours){var n=o.a.GameCyclesPer8Hours;return this.workHackExpGained=this.workHackExpGainRate*n,this.workStrExpGained=this.workStrExpGainRate*n,this.workDefExpGained=this.workDefExpGainRate*n,this.workDexExpGained=this.workDexExpGainRate*n,this.workAgiExpGained=this.workAgiExpGainRate*n,this.workChaExpGained=this.workChaExpGainRate*n,this.workRepGained=this.workRepGainRate*n,this.workMoneyGained=this.workMoneyGainRate*n,void this.finishWorkPartTime()}document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition.positionName+" at "+R.companyName+"

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

You have earned:

$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ($"+Object(w.formatNumber)(this.workMoneyGainRate*t,2)+" / sec)

"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*t,4)+" / sec) reputation for this company

"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*t,4)+" / sec) hacking exp

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

"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*t,4)+" / sec) charisma exp

You will automatically finish after working for 8 hours. You can cancel earlier if you wish,
and there will be no penalty because this is a part-time job."},S.prototype.finishWorkPartTime=function(e=!1){this.gainWorkExp(),r.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var t="You earned a total of:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the company
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(t="You worked for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

"+t,e||Object(v.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),e){var n="You worked for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+Object(w.formatNumber)(this.workMoneyGained,2)+", "+Object(w.formatNumber)(this.workRepGained,4)+" reputation, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},S.prototype.finishFactionWork=function(e,t=!1){this.gainWorkExp();var n=d.b[this.currentWorkFactionName];n.playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var a="You worked for your faction "+n.name+" for a total of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You earned a total of:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the faction
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(t||Object(v.dialogBoxCreate)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadFactionContent(),Object(d.c)(n.name),t){var i="You worked for your faction "+n.name+" for a total of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+Object(w.formatNumber)(this.workRepGained,4)+" rep, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agi exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" cha exp.";return this.resetWorkStatus(),i}this.resetWorkStatus()},S.prototype.startFactionWork=function(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=i.a.FactionWorkRepGain,this.isWorking=!0,this.workType=o.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=o.a.MillisecondsPer20Hours;var n=Object(_.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",function(){return R.finishFactionWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.startFactionHackWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.15*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.workRepGainRate=(this.hacking_skill+this.intelligence)/o.a.MaxSkillLevel*this.faction_rep_mult,this.factionWorkType=o.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)},S.prototype.startFactionFieldWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*i.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*i.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*i.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.getFactionFieldWorkRepGain(),this.factionWorkType=o.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)},S.prototype.startFactionSecurityWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.05*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*i.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*i.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*i.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.getFactionSecurityWorkRepGain(),this.factionWorkType=o.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)},S.prototype.workForFaction=function(e){var t=d.b[this.currentWorkFactionName];switch(this.factionWorkType){case o.a.FactionWorkHacking:this.workRepGainRate=(this.hacking_skill+this.intelligence)/o.a.MaxSkillLevel*this.faction_rep_mult;break;case o.a.FactionWorkField:this.workRepGainRate=this.getFactionFieldWorkRepGain();break;case o.a.FactionWorkSecurity:this.workRepGainRate=this.getFactionSecurityWorkRepGain()}var n=1+t.favor/100;isNaN(n)&&(n=1),this.workRepGainRate*=n,this.workRepGainRate*=i.a.FactionWorkRepGain,this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var a=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer20Hours){var r=o.a.GameCyclesPer20Hours;this.timeWorked=o.a.MillisecondsPer20Hours,this.workHackExpGained=this.workHackExpGainRate*r,this.workStrExpGained=this.workStrExpGainRate*r,this.workDefExpGained=this.workDefExpGainRate*r,this.workDexExpGained=this.workDexExpGainRate*r,this.workAgiExpGained=this.workAgiExpGainRate*r,this.workChaExpGained=this.workChaExpGainRate*r,this.workRepGained=this.workRepGainRate*r,this.workMoneyGained=this.workMoneyGainRate*r,this.finishFactionWork(!1)}document.getElementById("work-in-progress-text").innerHTML="You are currently "+this.currentWorkFactionDescription+" for your faction "+t.name+" (Current Faction Reputation: "+Object(w.formatNumber)(t.playerReputation,0)+"). You have been doing this for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ("+Object(w.formatNumber)(this.workMoneyGainRate*a,2)+" / sec)

"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*a,4)+" / sec) reputation for this faction

"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*a,4)+" / sec) hacking exp

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

"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*a,4)+" / sec) charisma exp

You will automatically finish after working for 20 hours. You can cancel earlier if you wish.
There is no penalty for cancelling earlier."},S.prototype.getWorkMoneyGain=function(){var e=1,t=r.a[this.companyName];return m.d&&(e=1+t.favor/100),this.companyPosition.baseSalary*t.salaryMultiplier*this.work_money_mult*i.a.CompanyWorkMoney*e},S.prototype.getWorkHackExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkStrExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.strengthExpGain*e.expMultiplier*this.strength_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkDefExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.defenseExpGain*e.expMultiplier*this.defense_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkDexExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkAgiExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.agilityExpGain*e.expMultiplier*this.agility_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkChaExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkRepGain=function(){var e=r.a[this.companyName],t=this.companyPosition.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);t+=this.intelligence/o.a.MaxSkillLevel;var n=1+e.favor/100;return isNaN(n)&&(n=1),t*this.company_rep_mult*n},S.prototype.getFactionSecurityWorkRepGain=function(){return.9*(this.hacking_skill/o.a.MaxSkillLevel+this.strength/o.a.MaxSkillLevel+this.defense/o.a.MaxSkillLevel+this.dexterity/o.a.MaxSkillLevel+this.agility/o.a.MaxSkillLevel)/4.5*this.faction_rep_mult},S.prototype.getFactionFieldWorkRepGain=function(){return.9*(this.hacking_skill/o.a.MaxSkillLevel+this.strength/o.a.MaxSkillLevel+this.defense/o.a.MaxSkillLevel+this.dexterity/o.a.MaxSkillLevel+this.agility/o.a.MaxSkillLevel+this.charisma/o.a.MaxSkillLevel+this.intelligence/o.a.MaxSkillLevel)/5.5*this.faction_rep_mult},S.prototype.startCreateProgramWork=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a=100)break;this.timeWorkedCreateProgram=s/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var l=Object(_.clearEventListeners)("work-in-progress-cancel-button");l.innerHTML="Cancel work on creating program",l.addEventListener("click",function(){return R.finishCreateProgramWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.createProgramWork=function(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t;n=1+(n-1)/5,this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=u.Engine._idleSpeed*e*n;var a=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1),document.getElementById("work-in-progress-text").innerHTML="You are currently working on coding "+a+".

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

The program is "+(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2)+"% complete.
If you cancel, your work will be saved and you can come back to complete the program later."},S.prototype.finishCreateProgramWork=function(e,t=!1){var n=this.createProgramName;if(!1===e)Object(v.dialogBoxCreate)("You've finished creating "+n+"!
The new program can be found on your home computer."),this.getHomeComputer().programs.push(n);else{var a=n+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(a)}e||this.gainIntelligenceExp(this.createProgramReqLvl/o.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadTerminalContent(),this.resetWorkStatus()},S.prototype.startClass=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeStudyClass,this.className=n;var a=1e3/u.Engine._idleSpeed,r=0,s=0,l=0,c=0,d=0,h=0,p=0;switch(n){case o.a.ClassStudyComputerScience:s=.5*t/a;break;case o.a.ClassDataStructures:r=o.a.ClassDataStructuresBaseCost*e/a,s=1*t/a;break;case o.a.ClassNetworks:r=o.a.ClassNetworksBaseCost*e/a,s=2*t/a;break;case o.a.ClassAlgorithms:r=o.a.ClassAlgorithmsBaseCost*e/a,s=4*t/a;break;case o.a.ClassManagement:r=o.a.ClassManagementBaseCost*e/a,p=2*t/a;break;case o.a.ClassLeadership:r=o.a.ClassLeadershipBaseCost*e/a,p=4*t/a;break;case o.a.ClassGymStrength:r=o.a.ClassGymBaseCost*e/a,l=1*t/a;break;case o.a.ClassGymDefense:r=o.a.ClassGymBaseCost*e/a,c=1*t/a;break;case o.a.ClassGymDexterity:r=o.a.ClassGymBaseCost*e/a,d=1*t/a;break;case o.a.ClassGymAgility:r=o.a.ClassGymBaseCost*e/a,h=1*t/a;break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=s*this.hacking_exp_mult*i.a.ClassGymExpGain,this.workStrExpGainRate=l*this.strength_exp_mult*i.a.ClassGymExpGain,this.workDefExpGainRate=c*this.defense_exp_mult*i.a.ClassGymExpGain,this.workDexExpGainRate=d*this.dexterity_exp_mult*i.a.ClassGymExpGain,this.workAgiExpGainRate=h*this.agility_exp_mult*i.a.ClassGymExpGain,this.workChaExpGainRate=p*this.charisma_exp_mult*i.a.ClassGymExpGain;var m=Object(_.clearEventListeners)("work-in-progress-cancel-button");n==o.a.ClassGymStrength||n==o.a.ClassGymDefense||n==o.a.ClassGymDexterity||n==o.a.ClassGymAgility?m.innerHTML="Stop training at gym":m.innerHTML="Stop taking course",m.addEventListener("click",function(){return R.finishClass(),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.takeClass=function(e){this.timeWorked+=u.Engine._idleSpeed*e;var t=this.className;this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e,this.workMoneyGained-=this.workMoneyLossRate*e;var n=1e3/u.Engine._idleSpeed;document.getElementById("work-in-progress-text").innerHTML="You have been "+t+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

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

You have gained:
"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*n,4)+" / sec) hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" ("+Object(w.formatNumber)(this.workStrExpGainRate*n,4)+" / sec) strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" ("+Object(w.formatNumber)(this.workDefExpGainRate*n,4)+" / sec) defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" ("+Object(w.formatNumber)(this.workDexExpGainRate*n,4)+" / sec) dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" ("+Object(w.formatNumber)(this.workAgiExpGainRate*n,4)+" / sec) agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*n,4)+" / sec) charisma exp
You may cancel at any time"},S.prototype.finishClass=function(e=!1){if(this.gainWorkExp(),this.gainIntelligenceExp(o.a.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");this.loseMoney(-1*this.workMoneyGained),this.updateSkillLevels();var t="After "+this.className+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+",
you spent a total of $"+Object(w.formatNumber)(-1*this.workMoneyGained,2)+".

You earned a total of:
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(e||Object(v.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),e){var n="After "+this.className+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of $"+Object(w.formatNumber)(-1*this.workMoneyGained,2)+". You earned a total of: "+Object(w.formatNumber)(this.workHackExpGained,3)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,3)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},S.prototype.startCrime=function(e,t,n,a,r,s,l,c,d=null){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCrime,d&&d.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=d.workerscript),this.workHackExpGained=e*this.hacking_exp_mult*i.a.CrimeExpGain,this.workStrExpGained=t*this.strength_exp_mult*i.a.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*i.a.CrimeExpGain,this.workDexExpGained=a*this.dexterity_exp_mult*i.a.CrimeExpGain,this.workAgiExpGained=r*this.agility_exp_mult*i.a.CrimeExpGain,this.workChaExpGained=s*this.charisma_exp_mult*i.a.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*i.a.CrimeMoney,this.timeNeededToCompleteWork=c;var h=Object(_.clearEventListeners)("work-in-progress-cancel-button");h.innerHTML="Cancel crime",h.addEventListener("click",function(){return R.finishCrime(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.commitCrime=function(e){if(this.timeWorked+=u.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+".
Time remaining: "+Object(w.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+a.replace(/ /g," ")}},S.prototype.finishCrime=function(e){if(!e){if(Object(c.b)(this.crimeType,this.workMoneyGained)){let e=null;for(const t in c.a)if(c.a[t].type==this.crimeType){e=c.a[t];break}null==e&&(console.log(this.crimeType),Object(v.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer")),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 "+C()(this.workMoneyGained).format("$0.000a")+", "+Object(w.formatNumber)(this.workHackExpGained,3)+" hack exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agi exp, "+Object(w.formatNumber)(this.workChaExpGained,3)+" cha exp."):Object(v.dialogBoxCreate)("Crime successful!

You gained:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking experience
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength experience
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense experience
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity experience
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility experience
"+Object(w.formatNumber)(this.workChaExpGained,4)+" 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 "+Object(w.formatNumber)(this.workHackExpGained,3)+" hack exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agi exp, "+Object(w.formatNumber)(this.workChaExpGained,3)+" cha exp."):Object(v.dialogBoxCreate)("Crime failed!

You gained:
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking experience
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength experience
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense experience
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity experience
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility experience
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma experience");this.gainWorkExp()}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),u.Engine.loadLocationContent()},S.prototype.singularityStopWork=function(){if(!this.isWorking)return"";var e;switch(this.workType){case o.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case o.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case o.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case o.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case o.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0,!0);break;case o.a.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.log("ERROR: Unrecognized work type"),""}return e},S.prototype.takeDamage=function(e){return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0)},S.prototype.hospitalize=function(){Object(v.dialogBoxCreate)("You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged $"+Object(w.formatNumber)(this.max_hp*o.a.HospitalCostPerHp,2)),this.loseMoney(this.max_hp*o.a.HospitalCostPerHp),this.hp=this.max_hp},S.prototype.applyForJob=function(e,t=!1){var n="";""!=this.companyName&&(n=r.a[this.companyName]);var a="";""!=this.companyPosition&&(a=this.companyPosition.positionName);var i=r.a[this.location];if(t&&!(i instanceof r.b))return"ERROR: Invalid company name: "+this.location+". applyToCompany() failed";var o=e;if(!this.isQualified(i,o)){var s=Object(r.f)(i,o);return!t&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position
"+s)}for(;;){u.Engine.Debug&&console.log("Determining qualification for next Company Position");var l=Object(r.g)(o);if(null==l)break;if(!i.hasPosition(l))break;if(!this.isQualified(i,l))break;o=l}if(""==n||n.companyName!=i.companyName||o.positionName!=a){var c=!1,d="";if(""!=n&&n.companyName!=i.companyName&&(c=!0,d=n.companyName,i.playerReputation-=1e3,i.playerReputation<0&&(i.playerReputation=0)),this.companyName=i.companyName,this.companyPosition=o,!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),c){if(t)return!0;Object(v.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+o.positionName+"!
You lost 1000 reputation at your old company "+d+" because you left.")}else{if(t)return!0;Object(v.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+o.positionName+"!")}u.Engine.loadLocationContent()}else{var h=Object(r.g)(o);if(null==h){if(t)return!1;Object(v.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(i.hasPosition(h)){if(t)return!1;s=Object(r.f)(i,h);Object(v.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion
"+s)}else{if(t)return!1;Object(v.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}},S.prototype.getNextCompanyPosition=function(e,t){var n=null;return""!=this.companyName&&(n=r.a[this.companyName]),null==n||n.companyName!=e.companyName?t:this.companyPosition.isSoftwareJob()&&t.isSoftwareJob()||this.companyPosition.isITJob()&&t.isITJob()||this.companyPosition.isBusinessJob()&&t.isBusinessJob()||this.companyPosition.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||this.companyPosition.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||this.companyPosition.isSecurityJob()&&t.isSecurityJob()||this.companyPosition.isAgentJob()&&t.isAgentJob()||this.companyPosition.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||this.companyPosition.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||this.companyPosition.isPartTimeJob()&&t.isPartTimeJob()?Object(r.g)(this.companyPosition):t},S.prototype.applyForSoftwareJob=function(e=!1){return this.applyForJob(r.d.SoftwareIntern,e)},S.prototype.applyForSoftwareConsultantJob=function(e=!1){return this.applyForJob(r.d.SoftwareConsultant,e)},S.prototype.applyForItJob=function(e=!1){return this.applyForJob(r.d.ITIntern,e)},S.prototype.applyForSecurityEngineerJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.SecurityEngineer)?this.applyForJob(r.d.SecurityEngineer,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForNetworkEngineerJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.NetworkEngineer)?this.applyForJob(r.d.NetworkEngineer,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForBusinessJob=function(e=!1){return this.applyForJob(r.d.BusinessIntern,e)},S.prototype.applyForBusinessConsultantJob=function(e=!1){return this.applyForJob(r.d.BusinessConsultant,e)},S.prototype.applyForSecurityJob=function(e=!1){return this.applyForJob(r.d.SecurityGuard,e)},S.prototype.applyForAgentJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.FieldAgent)?this.applyForJob(r.d.FieldAgent,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForEmployeeJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.Employee)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.Employee,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForPartTimeEmployeeJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.PartTimeEmployee)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.PartTimeEmployee,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForWaiterJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.Waiter)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.Waiter,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForPartTimeWaiterJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.PartTimeWaiter)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.PartTimeWaiter,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.isQualified=function(e,t){var n=e.jobStatReqOffset,a=t.requiredHacking>0?t.requiredHacking+n:0,i=t.requiredStrength>0?t.requiredStrength+n:0,r=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>=i&&this.defense>=r&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation},S.prototype.reapplyAllAugmentations=function(e=!0){console.log("Re-applying augmentations"),e&&this.resetMultipliers();for(let e=0;e=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 s=d.b.Daedalus;!s.isBanned&&!s.isMember&&!s.alreadyInvited&&t>=30&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(s);var l=d.b["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=30&&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=d.b.ECorp;!c.isBanned&&!c.isMember&&!c.alreadyInvited&&this.companyName==p.a.AevumECorp&&a>=o.a.CorpFactionRepRequirement&&e.push(c);var u=d.b.MegaCorp;!u.isBanned&&!u.isMember&&!u.alreadyInvited&&this.companyName==p.a.Sector12MegaCorp&&a>=o.a.CorpFactionRepRequirement&&e.push(u);var h=d.b["Bachman & Associates"];!h.isBanned&&!h.isMember&&!h.alreadyInvited&&this.companyName==p.a.AevumBachmanAndAssociates&&a>=o.a.CorpFactionRepRequirement&&e.push(h);var m=d.b["Blade Industries"];!m.isBanned&&!m.isMember&&!m.alreadyInvited&&this.companyName==p.a.Sector12BladeIndustries&&a>=o.a.CorpFactionRepRequirement&&e.push(m);var f=d.b.NWO;!f.isBanned&&!f.isMember&&!f.alreadyInvited&&this.companyName==p.a.VolhavenNWO&&a>=o.a.CorpFactionRepRequirement&&e.push(f);var b=d.b["Clarke Incorporated"];!b.isBanned&&!b.isMember&&!b.alreadyInvited&&this.companyName==p.a.AevumClarkeIncorporated&&a>=o.a.CorpFactionRepRequirement&&e.push(b);var v=d.b["OmniTek Incorporated"];!v.isBanned&&!v.isMember&&!v.alreadyInvited&&this.companyName==p.a.VolhavenOmniTekIncorporated&&a>=o.a.CorpFactionRepRequirement&&e.push(v);var _=d.b["Four Sigma"];!_.isBanned&&!_.isMember&&!_.alreadyInvited&&this.companyName==p.a.Sector12FourSigma&&a>=o.a.CorpFactionRepRequirement&&e.push(_);var k=d.b["KuaiGong International"];!k.isBanned&&!k.isMember&&!k.alreadyInvited&&this.companyName==p.a.ChongqingKuaiGongInternational&&a>=o.a.CorpFactionRepRequirement&&e.push(k);var E=d.b["Fulcrum Secret Technologies"],O=g.b[y.a[y.b.FulcrumSecretTechnologies]];null==O?console.log("ERROR: Could not find Fulcrum Secret Technologies Server"):!E.isBanned&&!E.isMember&&!E.alreadyInvited&&O.manuallyHacked&&this.companyName==p.a.AevumFulcrumTechnologies&&a>=25e4&&e.push(E);var C=d.b.BitRunners,w=this.getHomeComputer(),S=g.b[y.a[y.b.BitRunnersServer]];null==S?console.log("ERROR: Could not find BitRunners Server"):!C.isBanned&&!C.isMember&&S.manuallyHacked&&!C.alreadyInvited&&this.hacking_skill>=500&&w.maxRam>=128&&e.push(C);var T=d.b["The Black Hand"],R=g.b[y.a[y.b.TheBlackHandServer]];null==R?console.log("ERROR: Could not find The Black Hand Server"):!T.isBanned&&!T.isMember&&R.manuallyHacked&&!T.alreadyInvited&&this.hacking_skill>=350&&w.maxRam>=64&&e.push(T);var x=d.b.NiteSec,I=g.b[y.a[y.b.NiteSecServer]];null==I?console.log("ERROR: Could not find NiteSec Server"):!x.isBanned&&!x.isMember&&I.manuallyHacked&&!x.alreadyInvited&&this.hacking_skill>=200&&w.maxRam>=32&&e.push(x);var P=d.b.Chongqing;P.isBanned||P.isMember||P.alreadyInvited||!this.money.gte(2e7)||this.city!=p.a.Chongqing||e.push(P);var N=d.b["Sector-12"];N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(15e6)||this.city!=p.a.Sector12||e.push(N);var A=d.b["New Tokyo"];A.isBanned||A.isMember||A.alreadyInvited||!this.money.gte(2e7)||this.city!=p.a.NewTokyo||e.push(A);var M=d.b.Aevum;M.isBanned||M.isMember||M.alreadyInvited||!this.money.gte(4e7)||this.city!=p.a.Aevum||e.push(M);var L=d.b.Ishima;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(3e7)||this.city!=p.a.Ishima||e.push(L);var B=d.b.Volhaven;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(5e7)||this.city!=p.a.Volhaven||e.push(B);var j=d.b["Speakers for the Dead"];!j.isBanned&&!j.isMember&&!j.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(j);var D=d.b["The Dark Army"];!D.isBanned&&!D.isMember&&!D.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==p.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(D);var F=d.b["The Syndicate"];!F.isBanned&&!F.isMember&&!F.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==p.a.Aevum||this.city==p.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(F);var H=d.b.Silhouette;H.isBanned||H.isMember||H.alreadyInvited||this.companyPosition.positionName!=r.d.CTO.positionName&&this.companyPosition.positionName!=r.d.CFO.positionName&&this.companyPosition.positionName!=r.d.CEO.positionName||!this.money.gte(15e6)||!(this.karma<=-22)||e.push(H);var W=d.b.Tetrads;!W.isBanned&&!W.isMember&&!W.alreadyInvited&&(this.city==p.a.Chongqing||this.city==p.a.NewTokyo||this.city==p.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(W);var G=d.b["Slum Snakes"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(G);for(var U=d.b.Netburners,q=0,K=0,V=0,Y=0;Y=80&&q>=8&&K>=4&&V>=100&&e.push(U);var z=d.b["Tian Di Hui"];z.isBanned||z.isMember||z.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=p.a.Chongqing&&this.city!=p.a.NewTokyo&&this.city!=p.a.Ishima||e.push(z);var J=d.b.CyberSec,$=g.b[y.a[y.b.CyberSecServer]];return null==$?console.log("ERROR: Could not find CyberSec Server"):!J.isBanned&&!J.isMember&&$.manuallyHacked&&!J.alreadyInvited&&this.hacking_skill>=50&&e.push(J),e},S.prototype.inGang=function(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof h.b},S.prototype.startGang=function(e,t){this.gang=new h.b(e,t)},S.prototype.setBitNodeNumber=function(e){this.bitNodeN=e},S.prototype.queueAugmentation=function(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.log("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.log("tried to queue "+e+" but we already have that aug");this.firstAugPurchased=!0,this.queuedAugmentations.push(new a.d(e))},S.prototype.toJSON=function(){return Object(E.Generic_toJSON)("PlayerObject",this)},S.fromJSON=function(e){return Object(E.Generic_fromJSON)(S,e.data)},E.Reviver.constructors.PlayerObject=S;let R=new S},function(e,t,n){"use strict";n.d(t,"a",function(){return a});let a={Version:"0.40.1",MaxSkillLevel:975,CorpFactionRepRequirement:2e5,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,BaseCostFor1GBOfRamHacknetNode:3e4,TravelCost:2e5,BaseCostForHacknetNode:1e3,BaseCostForHacknetNodeCore:5e5,HacknetNodeMoneyGainPerLevel:1.6,HacknetNodePurchaseNextMult:1.85,HacknetNodeUpgradeLevelMult:1.04,HacknetNodeUpgradeRamMult:1.28,HacknetNodeUpgradeCoreMult:1.48,HacknetNodeMaxLevel:200,HacknetNodeMaxRam:64,HacknetNodeMaxCores:16,BaseFavorToDonate:150,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,ScriptBaseRamCost:1.6,ScriptDomRamCost:100,ScriptWhileRamCost:0,ScriptForRamCost:0,ScriptIfRamCost:0,ScriptHackRamCost:.1,ScriptGrowRamCost:.15,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,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,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptSingularityFn1RamCost:1,ScriptSingularityFn2RamCost:2,ScriptSingularityFn3RamCost:3,ScriptBladeburnerApiBaseRamCost:4,NumNetscriptPorts:20,ServerBaseGrowthRate:1.03,ServerMaxGrowthRate:1.0035,ServerFortifyAmount:.002,ServerWeakenAmount:.05,PurchasedServerLimit:25,PurchasedServerMaxRam:1048576,AugmentationCostMultiplier:5,AugmentationRepMultiplier:2.5,MultipleAugMultiplier:1.9,TorRouterCost:2e5,InfiltrationBribeBaseAmount:1e5,InfiltrationMoneyValue:5e3,InfiltrationRepValue:1.4,WSEAccountCost:2e8,TIXAPICost:5e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.05,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.001,IntelligenceProgramBaseExpGain:500,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:.002,IntelligenceClassBaseExpGain:1e-6,IntelligenceHackingMissionBaseExpGain:.03,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.

In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.

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

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

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

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

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

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

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

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

There are six different types of Nodes:

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

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

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

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

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

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

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

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

Other Notes:

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

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

-Miscellaneous Nodes slowly raise their defense over time

-Nodes slowly regenerate health over time.",GangRespectToReputationRatio:2,MaximumGangMembers:20,GangRecruitCostMultiplier:2,GangTerritoryUpdateTimer:150,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,CrimeSingFnDivider:2,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",TutorialNetworkingText:"Servers are a central part of the game. You start with a single personal server (your home computer) and you can purchase additional servers as you progress through the game. Connecting to other servers and hacking them can be a major source of income and experience. Servers can also be used to run scripts which can automatically hack servers for you.

In order to navigate between machines, use the 'scan' or 'scan-analyze' Terminal command to see all servers that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' command to connect to one of the available machines.

The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the server you are currently connected to.",TutorialHackingText:"In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers. By hacking these servers, you can steal their money and gain experience.

Gaining root access


The key to hacking a server is to gain root access to that server. This can be done using the NUKE virus (NUKE.exe). You start the game with a copy of the NUKE virus on your home computer. The NUKE virus attacks the target server's open ports using buffer overflow exploits. When successful, you are granted root administrative access to the machine.

Typically, in order for the NUKE virus to succeed, the target server needs to have at least one of its ports opened. Some servers have no security and will not need any ports opened. Some will have very high security and will need many ports opened. In order to open ports on another server, you will need to run programs that attack the server to open specific ports. These programs can be coded once your hacking skill gets high enough, or they can be purchased if you can find a seller.

In order to determine how many ports need to be opened to successfully NUKE a server, connect to that server and run the 'analyze' command. This will also show you which ports have already been opened.

Once you have enough ports opened and have ran the NUKE virus to gain root access, the server can then be hacked by simply calling the 'hack' command through terminal, or by using a script.

Hacking mechanics


When you execute the hack command, either manually through the terminal or automatically through a script, you attempt to hack the server. This action takes time. The more advanced a server's security is, the more time it will take. Your hacking skill level also affects the hacking time, with a higher hacking skill leading to shorter hacking times. Also, running the hack command manually through terminal is faster than hacking from a script.

Your attempt to hack a server will not always succeed. The chance you have to successfully hack a server is also determined by the server's security and your hacking skill level. Even if your hacking attempt is unsuccessful, you will still gain experience points.

When you successfully hack a server. You steal a certain percentage of that server's total money. This percentage is determined by the server's security and your hacking skill level. The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking (since you are only hacking a certain percentage). You can increase the amount of money on a server using a script and the grow() function in Netscript.

Server Security


Each server has a security level, typically between 1 and 100. A higher number means the server has stronger security. It is possible for a server to have a security level of 100 or higher, in which case hacking that server will become impossible (0% chance to hack).

As mentioned above, a server's security level is an important factor to consider when hacking. You can check a server's security level using the 'analyze' command, although this only gives an estimate (with 5% uncertainty). You can also check a server's security in a script, using the getServerSecurityLevel(server) function in Netscript. See the Netscript documentation for more details. This function will give you an exact value for a server's security.

Whenever a server is hacked manually or through a script, its security level increases by a small amount. Calling the grow() command in a script will also increase security level of the target server. These actions will make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a server's security level in a script using the weaken(server) function in Netscript. See the Netscript documentation for more details.

A server has a minimum security level that is equal to one third of its starting security, rounded to the nearest integer. To be more precise:

server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))

This means that a server's security will not fall below this value if you are trying to weaken it.",TutorialScriptsText:"Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. Documentation about the Netscript language can be found in the 'Netscript Programming Language' section of this 'Tutorial' page.

It is highly recommended that you have a basic background in programming to start writing scripts. You by no means need to be an expert. All you need is some familiarity with basic programming constructs like for/while loops, if statements, functions, variables, etc. The Netscript programming language most resembles the Javascript language. Therefore, a good beginner's programming tutorial to read might be this one. Note that while the Netscript language is similar to Javascript, it is not the exact same, so the syntax will vary a little bit.

Running a script requires RAM. The more complex a script is, the more RAM it requires to run. Scripts can be run on any server you have root access to.

Here are some Terminal commands that are useful when working with scripts:

check [script] [args...]
Prints the logs of the script specified by the name and arguments to Terminal. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'check' it you must also add the 'foodnstuff' argument to the check command as so:
check foo.script foodnstuff

free
Shows the current server's RAM usage and availability

kill [script] [args...]
Stops a script that is running with the specified script name and arguments. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 1 and 2, then just typing 'kill foo.script' will not work. You have to use 'kill foo.script 1 2'.

mem [script] [-t] [n]
Check how much RAM a script requires to run with n threads

nano [script]
Create/Edit a script. The name of the script must end with the '.script' extension

ps
Displays all scripts that are actively running on the current server

rm [script]
Delete a script

run [script] [-t] [n] [args...]
Run a script with n threads and the specified arguments. Each argument should be separated by a space. Both the arguments and thread specification are optional. If neither are specified, then the script will be run single-threaded with no arguments.
Examples:
run foo.script
The command above will run 'foo.script' single-threaded with no arguments.
run foo.script -t 10
The command above will run 'foo.script' with 10 threads and no arguments.
run foo.script foodnstuff sigma-cosmetics 10
The command above will run 'foo.script' single-threaded with three arguments: [foodnstuff, sigma-cosmetics, 10]
run foo.script -t 50 foodnstuff
The command above will run 'foo.script' with 50 threads and a single argument: [foodnstuff]

tail [script] [args...]
Displays the logs of the script specified by the name and arguments. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'tail' it you must also add the 'foodnstuff' argument to the tail command as so:
tail foo.script foodnstuff

top
Displays all active scripts and their RAM usage

Multithreading scripts


Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of threads. For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would yield $50,000.

When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script with the number of threads, where the base cost refers to the amount of RAM required to run the script single-threaded. In the terminal, you can run the 'mem [scriptname] -t n' command to see how much RAM a script requires with n threads.

Every method for running a script has an option for making it multihreaded. To run a script with n threads from a Terminal:
run [scriptname] -t n

Using Netscript commands:
run('scriptname.script', n);
exec('scriptname.script, 'targetServer', n);

Notes about how scripts work offline


The scripts that you write and execute are interpreted in Javascript. For this reason, it is not possible for these scripts to run while offline (when the game is closed). It is important to note that for this reason, conditionals such as if/else statements and certain commands such as purchaseHacknetNode() or nuke() will not work while the game is offline.

However, Scripts WILL continue to generate money and hacking exp for you while the game is offline. This offline production is based off of the scripts' production while the game is online.

grow() and weaken() are two Netscript commands that will also be applied when the game is offline, although at a slower rate compared to if the game was open. This is done by having each script keep track of the rate at which the grow() and weaken() commands are called when the game is online. These calculated rates are used to determine how many times these function calls would be made while the game is offline.

Also, note that because of the way the Netscript interpreter is implemented, whenever you reload or re-open the game all of the scripts that you are running will start running from the BEGINNING of the code. The game does not keep track of where exactly the execution of a script is when it saves/loads.


",TutorialNetscriptText:"Netscript is a programming language implemented for this game. There are two versions of Netscript: Netscript 1.0 and Netscript 2.0 (NetscriptJS).

Click here for Bitburner's official Netscript documentation",TutorialTravelingText:"There are six major cities in the world that you are able to travel to:

Aevum
Chongqing
Sector-12
New Tokyo
Ishima
Volhaven

To travel between cities, visit your current city's travel agency through the 'World' page. From the travel agency you can travel to any other city. Doing so costs money.

Each city has its own set of companies and unique locations. Also, certain content is only available to you if you are in certain cities, so get exploring!",TutorialCompaniesText:"Hacking is not the only way to gain money and experience! Located around the world are many different companies which you can work for. By working for a company you can earn money, train your various labor skills, and unlock powerful passive perks.

To apply for a job, visit the company you want to work for through the 'World' menu. The company page will have options that let you apply to positions in the company. There might be several different positions you can apply for, ranging from software engineer to business analyst to security officer.

When you apply for a job, you will get the offer if your stats are high enough. Your first position at a company will be an entry-level position such as 'intern'. Once you get the job, an button will appear on the company page that allows you to work for the company. Click this button to start working.

Working occurs in 8 hour shifts. Once you start working, you will begin earning money, experience, and reputation. The rate at which you money and experience depends on the company and your position. The amount of reputation you gain for your company is based on your job performance, which is affected by your stats. Different positions value different stats. When you are working, you are unable to perform any other actions such as using your terminal or visiting other locations (However, note that any scripts you have running on servers will continue to run as you work!). It is possible to cancel your work shift before the 8 hours is up. However, if you have a full-time job, then cancelling a shift early will result in you gaining only half of the reputation that you had earned up to that point. There are also part-time/consultant jobs available where you will not be penalized if you cancel a work shift early. However, these positions pay less than full-time positions.

As you continue to work at a company, you will gain more and more reputation at that company. When your stats and reputation are high enough, you can get a promotion. You can apply for a promotion on the company page, just like you applied for the job originally. Higher positions at a company provide better salaries and stat gains.

Infiltrating Companies


Many companies have facilities that you can attempt to infiltrate. By infiltrating, you can steal classified company secrets and then sell these for money or for faction reputation. To try and infiltrate a company, visit a company through the 'World' menu. There will be an option that says 'Infiltrate Company'.

When infiltrating a company, you must progress through clearance levels in the facility. Every clearance level has some form of security that you must get past. There are several forms of security, ranging from high-tech security systems to armed guards. For each form of security, there are a variety of options that you can choose to try and bypass the security. Examples include hacking the security, engaging in combat, assassination, or sneaking past the security. The chance to succeed for each option is determined in part by your stats. So, for example, trying to hack the security system relies on your hacking skill, whereas trying to sneak past the security relies on your agility level.

The facility has a 'security level' that affects your chance of success when trying to get past a clearance level. Every time you advance to the next clearance level, the facility's security level will increase by a fixed amount. Furthermore the options you choose and whether you succeed or fail will affect the security level as well. For example, if you try to kill a security guard and fail, the security level will increase by a lot. If you choose to sneak past security and succeed, the security level will not increase at all.

Every 5 clearance levels, you will steal classified company secrets that can be sold for money or faction reputation. However, in order to sell these secrets you must successfully escape the facility using the 'Escape' option. Furthermore, companies have a max clearance level. If you reach the max clearance level you will automatically escape the facility with all of your stolen secrets.

",TutorialFactionsText:"Throughout the game you may receive invitations from factions. There are many different factions, and each faction has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial to progressing in the game and unlocking endgame content.

It is possible to join multiple factions if you receive invitations from them. However, note that joining a faction may prevent you from joining other rival factions.

The 'Factions' link on the menu brings up a list of all factions that you have joined. You can select a Faction on this list to go to that Faction page. This page displays general information about the Faction and also lets you perform work for the faction. Working for a Faction is similar to working for a company except that you don't get paid a salary. You will only earn reputation in your Faction and train your stats. Also, cancelling work early when working for a Faction does NOT result in reduced experience/reputation earnings.

Earning reputation for a Faction unlocks powerful Augmentations. Purchasing and installing these Augmentations will upgrade your abilities. The Augmentations that are available to unlock vary from faction to faction.",TutorialAugmentationsText:"Advances in science and medicine have lead to powerful new technologies that allow people to augment themselves beyond normal human capabilities. There are many different types of Augmentations, ranging from cybernetic to genetic to biological. Acquiring these Augmentations enhances the user's physical and mental faculties.

Because of how powerful these Augmentations are, the technology behind them is kept private and secret by the corporations and organizations that create them. Therefore, the only way for the player to obtain Augmentations is through Factions. After joining a Faction and earning enough reputation in it, you will be able to purchase its Augmentations. Different Factions offer different Augmentations. Augmentations must be purchased in order to be installed, and they are fairly expensive.

When you purchase an Augmentation, the price of purchasing another Augmentation increases by 90%. This multiplier stacks for each Augmentation you purchase. You will not gain the benefits of your purchased Augmentations until you install them. You can choose to install Augmentations through the 'Augmentations' menu tab. Once you install your purchased Augmentations, their costs are reset back to the original price.

Unfortunately, installing Augmentations has side effects. You will lose most of the progress you've made, including your skills, stats, and money. You will have to start over, but you will have all of the Augmentations you have installed to help you progress.

To summarize, here is a list of everything you will LOSE when you install an Augmentation:

Stats/Skills
Money
Scripts on all servers EXCEPT your home computer
Purchased servers
Hacknet Nodes
Company/faction reputation
Jobs and Faction memberships
Programs
Stocks
TOR router

Here is everything you will KEEP when you install an Augmentation:

Every Augmentation you have installed
Scripts on your home computer
RAM and CPU Core Upgrades on your home computer
World Stock Exchange account and TIX API Access
",LatestUpdate:"v0.40.1 - Community Update
* Added getPurchasedServerCost() Netscript function (by kopelli)
* Added getFavorToDonate() Netscript function (by hydroflame)
* Added getFactionFavorGain() and getCompanyFavorGain() Singularity functions (by hydroflame)
* Accumulated 'bonus' time in Bladeburner is now displayed in the UI (by hydroflame)
* The Red Pill can now be purchased with negative money (since its supposed to be free) (by hydroflame)
* Cranial Signal Processor Augmentations now have the previous generation as a prerequisite. i.e. Cranial Signal Processor - Gen II requires Gen I (by Kline-)
* Terminal now supports semicolon usage (end of command). This allows chaining multiple Terminal commands (by hydroflame)
* Bladeburner Raid operations can no longer be performed if your estimate of Synthoid communities is zero (by hydroflame)
* The difficulty of BN-12 now scales faster (by hydroflame)
* Active Scripts UI now shows a RAM Usage bar for each server (by kopelli)
* Bug Fix: Corrected terminal timestamp format (by kopelli)
* Bug Fix: NetscriptJS scripts should now die properly if they don't have a 'main' function (by hydroflame)
* Bug Fix: write(), read(), and tryWrite() Netscript functions should now work properly for writing Arrays/objects to Netscript Ports
* Various minor UI/QOL fixes by hydroflame, kopelli, and Kline-"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(32);function i(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){const t=Math.floor(e/1e3),n=Math.floor(t/86400),a=t%86400,i=Math.floor(a/3600),r=a%3600,o=Math.floor(r/60);let s="";return n>0&&(s+=`${n} days `),i>0&&(s+=`${i} hours `),o>0&&(s+=`${o} minutes `),s+=`${r%60} seconds `},t.longestCommonStart=function(e){if(!i(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],a=t[t.length-1],r=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;aYou will earn "+Object(k.formatNumber)(Be,0)+" faction favor upon resetting after installing an Augmentation",j.innerHTML="Company Favor: "+Object(k.formatNumber)(Le.favor,0)+"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 an Augmentation. The amount of favor you gain depends on how much reputation you have with the company",M.style.display="block";var je=d.a.companyPosition;M.addEventListener("click",function(){return je.isPartTimeJob()?d.a.startWorkPartTime():d.a.startWork(),!1}),je.isSoftwareJob()?c.innerHTML="Apply for a promotion (Software)":je.isSoftwareConsultantJob()?h.innerHTML="Apply for a promotion (Software Consultant)":je.isITJob()?p.innerHTML="Apply for a promotion (IT)":je.isSecurityEngineerJob()?m.innerHTML="Apply for a promotion (Security Engineer)":je.isNetworkEngineerJob()?y.innerHTML="Apply for a promotion (Network Engineer)":je.isBusinessJob()?b.innerHTML="Apply for a promotion (Business)":je.isBusinessConsultantJob()?v.innerHTML="Apply for a promotion (Business Consultant)":je.isSecurityJob()?_.innerHTML="Apply for a promotion (Security)":je.isAgentJob()&&(E.innerHTML="Apply for a promotion (Agent)")}else L.style.display="none",B.style.display="none",j.style.display="none",D.style.display="none",F.style.display="none",H.style.display="none";d.a.hp<0&&(d.a.hp=0);var De=(d.a.max_hp-d.a.hp)*o.a.HospitalCostPerHp;switch(N(Me,i.d.SoftwareIntern,c),N(Me,i.d.SoftwareConsultant,h),N(Me,i.d.ITIntern,p),N(Me,i.d.SecurityEngineer,m),N(Me,i.d.NetworkEngineer,y),N(Me,i.d.BusinessIntern,b),N(Me,i.d.BusinessConsultant,v),N(Me,i.d.SecurityGuard,_),N(Me,i.d.FieldAgent,E),N(Me,i.d.Employee,C),N(Me,i.d.PartTimeEmployee,w),N(Me,i.d.Waiter,S),N(Me,i.d.PartTimeWaiter,A),Me){case O.AevumTravelAgency:ue.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.AevumSummitUniversity:var Fe=3;T(He=4),R(He,Fe);break;case O.AevumECorp:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumECorp,4800,116,150,6);break;case O.AevumBachmanAndAssociates:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.AevumBachmanAndAssociates,1350,42,60,4.1);break;case O.AevumClarkeIncorporated:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.AevumClarkeIncorporated,1800,34,75,3.6);break;case O.AevumFulcrumTechnologies:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumFulcrumTechnologies,4140,96,100,6.2);break;case O.AevumAeroCorp:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.AevumAeroCorp,1350,32,50,4.4);break;case O.AevumGalacticCybersystems:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.AevumGalacticCybersystems,1260,30,50,3.95);break;case O.AevumWatchdogSecurity:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.AevumWatchdogSecurity,690,20,30,3);break;case O.AevumRhoConstruction:n.innerHTML=i.a[Me].info,c.style.display="block",b.style.display="block",P(fe,O.AevumRhoConstruction,485,16,20,1.9);break;case O.AevumPolice:n.innerHTML=i.a[Me].info,c.style.display="block",_.style.display="block",P(fe,O.AevumPolice,565,18,25,2.2);break;case O.AevumNetLinkTechnologies:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",X.style.display="block",Q.style.display="block",Z.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumNetLinkTechnologies,144,10,25,1.4);break;case O.AevumCrushFitnessGym:Fe=2;x(He=3),I(He,Fe);break;case O.AevumSnapFitnessGym:Fe=5;x(He=10),I(He,Fe);break;case O.ChongqingTravelAgency:ue.style.display="block",de.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.ChongqingKuaiGongInternational:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.ChongqingKuaiGongInternational,4450,100,100,6.1);break;case O.ChongqingSolarisSpaceSystems:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.ChongqingSolarisSpaceSystems,2915,52,75,6);break;case O.Sector12TravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.Sector12RothmanUniversity:Fe=2;T(He=3),R(He,Fe);break;case O.Sector12MegaCorp:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12MegaCorp,4500,114,125,6.75);break;case O.Sector12BladeIndustries:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12BladeIndustries,2160,46,100,4.2);break;case O.Sector12FourSigma:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12FourSigma,1350,58,100,7);break;case O.Sector12IcarusMicrosystems:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.Sector12IcarusMicrosystems,730,32,70,5.4);break;case O.Sector12UniversalEnergy:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.Sector12UniversalEnergy,700,24,50,4.3);break;case O.Sector12DeltaOne:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.Sector12DeltaOne,970,38,75,4.5);break;case O.Sector12CIA:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.Sector12CIA,1170,44,80,4.6);break;case O.Sector12NSA:if(n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",6===d.a.bitNodeN||!0===u.c){if(8===d.a.bitNodeN)break;d.a.bladeburner instanceof a.a?Ae.innerText="Enter Bladeburner Headquarters":(P(fe,O.Sector12NSA,1135,40,80,5),Ae.innerText="Apply to Bladeburner Division"),Ae.style.display="block"}else P(fe,O.Sector12NSA,1135,40,80,5);break;case O.Sector12AlphaEnterprises:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",b.style.display="block",X.style.display="block",Q.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.Sector12AlphaEnterprises,200,14,40,2.25);break;case O.Sector12CarmichaelSecurity:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.Sector12CarmichaelSecurity,405,18,60,2.5);break;case O.Sector12FoodNStuff:n.innerHTML=i.a[Me].info,C.style.display="block",w.style.display="block";break;case O.Sector12JoesGuns:n.innerHTML=i.a[Me].info,C.style.display="block",w.style.display="block",P(fe,O.Sector12JoesGuns,120,8,20,1.8);break;case O.Sector12IronGym:Fe=1;x(He=1),I(He,Fe);break;case O.Sector12PowerhouseGym:Fe=10;x(He=20),I(He,Fe);break;case O.Sector12CityHall:Ne.style.display="block",d.a.corporation instanceof r.a?Ne.className="a-link-button-inactive":Ne.className="a-link-button";break;case O.NewTokyoTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.NewTokyoDefComm:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.NewTokyoDefComm,1050,28,70,4);break;case O.NewTokyoVitaLife:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.NewTokyoVitaLife,605,22,100,3.5);break;case O.NewTokyoGlobalPharmaceuticals:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.NewTokyoGlobalPharmaceuticals,700,24,80,3.8);break;case O.NewTokyoNoodleBar:n.innerHTML=i.a[Me].info,S.style.display="block",A.style.display="block";break;case O.IshimaTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ye.style.display="block";break;case O.IshimaStormTechnologies:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="none",E.style.display="none",C.style.display="none",S.style.display="none",te.style.display="block",ne.style.display="block",ae.style.display="block",ie.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.IshimaStormTechnologies,570,24,100,4.1);break;case O.IshimaNovaMedical:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.IshimaNovaMedical,485,20,50,3.2);break;case O.IshimaOmegaSoftware:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",b.style.display="block",Q.style.display="block",Z.style.display="block",ee.style.display="block",te.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.IshimaOmegaSoftware,130,10,40,1.6);break;case O.VolhavenTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block";break;case O.VolhavenZBInstituteOfTechnology:Fe=4;T(He=5),R(He,Fe);break;case O.VolhavenOmniTekIncorporated:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",P(fe,O.VolhavenOmniTekIncorporated,1215,44,100,4.4);break;case O.VolhavenNWO:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.VolhavenNWO,1460,56,200,6.8);break;case O.VolhavenHeliosLabs:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.VolhavenHeliosLabs,1080,28,75,3);break;case O.VolhavenOmniaCybersystems:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.VolhavenOmniaCybersystems,725,28,90,4.9);break;case O.VolhavenLexoCorp:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.VolhavenLexoCorp,340,14,60,2);break;case O.VolhavenSysCoreSecurities:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.VolhavenSysCoreSecurities,430,18,75,2.4);break;case O.VolhavenCompuTek:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",Z.style.display="block",ee.style.display="block",te.style.display="block",ne.style.display="block",ae.style.display="block",ie.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.VolhavenCompuTek,195,12,60,2.1);break;case O.VolhavenMilleniumFitnessGym:var He;Fe=4;x(He=7),I(He,Fe);break;case O.AevumSlums:case O.ChongqingSlums:case O.Sector12Slums:case O.NewTokyoSlums:case O.IshimaSlums:case O.VolhavenSlums:var We=s.a.Shoplift.successRate(),Ge=s.a.RobStore.successRate(),Ue=s.a.Mug.successRate(),qe=s.a.Larceny.successRate(),Ke=s.a.DealDrugs.successRate(),Ve=s.a.BondForgery.successRate(),Ye=s.a.TraffickArms.successRate(),ze=s.a.Homicide.successRate(),Je=s.a.GrandTheftAuto.successRate(),$e=s.a.Kidnap.successRate(),Xe=s.a.Assassination.successRate(),Qe=s.a.Heist.successRate();ve.style.display="block",_e.style.display="block",_e.innerHTML="Shoplift ("+(100*We).toFixed(3)+"% chance of success)",_e.innerHTML+=' Attempt to shoplift from a low-end retailer ',ke.style.display="block",ke.innerHTML="Rob store("+(100*Ge).toFixed(3)+"% chance of success)",ke.innerHTML+='Attempt to commit armed robbery on a high-end store ',Ee.style.display="block",Ee.innerHTML="Mug someone ("+(100*Ue).toFixed(3)+"% chance of success)",Ee.innerHTML+=' Attempt to mug a random person on the street ',Oe.style.display="block",Oe.innerHTML="Larceny ("+(100*qe).toFixed(3)+"% chance of success)",Oe.innerHTML+=" Attempt to rob property from someone's house ",Ce.style.display="block",Ce.innerHTML="Deal Drugs ("+(100*Ke).toFixed(3)+"% chance of success)",Ce.innerHTML+=' Attempt to deal drugs ',we.style.display="block",we.innerHTML="Bond Forgery("+(100*Ve).toFixed(3)+"% chance of success)",we.innerHTML+=" Attempt to forge corporate bonds",Se.style.display="block",Se.innerHTML="Traffick Illegal Arms ("+(100*Ye).toFixed(3)+"% chance of success)",Se.innerHTML+=' Attempt to smuggle illegal arms into the city and sell them to gangs and criminal organizations ',Te.style.display="block",Te.innerHTML="Homicide ("+(100*ze).toFixed(3)+"% chance of success)",Te.innerHTML+=' Attempt to murder a random person on the street',Re.style.display="block",Re.innerHTML="Grand Theft Auto ("+(100*Je).toFixed(3)+"% chance of success)",Re.innerHTML+=' Attempt to commit grand theft auto ',xe.style.display="block",xe.innerHTML="Kidnap and Ransom ("+(100*$e).toFixed(3)+"% chance of success)",xe.innerHTML+=' Attempt to kidnap and ransom a high-profile target ',Ie.style.display="block",Ie.innerHTML="Assassinate ("+(100*Xe).toFixed(3)+"% chance of success)",Ie.innerHTML+=' Attempt to assassinate a high-profile target ',Pe.style.display="block",Pe.innerHTML="Heist ("+(100*Qe).toFixed(3)+"% chance of success)",Pe.innerHTML+=' Attempt to pull off the ultimate heist ';break;case O.Hospital:be.innerText="Get treatment for wounds - $"+Object(k.formatNumber)(De,2).toString(),be.style.display="block";break;default:console.log("ERROR: INVALID LOCATION")}Me==d.a.companyName&&((je=d.a.companyPosition).positionName==i.d.Employee.positionName?C.style.display="none":je.positionName==i.d.Waiter.positionName?S.style.display="none":je.positionName==i.d.PartTimeEmployee.positionName?w.style.display="none":je.positionName==i.d.PartTimeWaiter.positionName&&(A.style.display="none"))}function w(){document.getElementById("aevum-travelagency").addEventListener("click",function(){return d.a.location=O.AevumTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-summituniversity").addEventListener("click",function(){return d.a.location=O.AevumSummitUniversity,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-ecorp").addEventListener("click",function(){return d.a.location=O.AevumECorp,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-bachmanandassociates").addEventListener("click",function(){return d.a.location=O.AevumBachmanAndAssociates,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-clarkeincorporated").addEventListener("click",function(){return d.a.location=O.AevumClarkeIncorporated,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-fulcrumtechnologies").addEventListener("click",function(){return d.a.location=O.AevumFulcrumTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-aerocorp").addEventListener("click",function(){return d.a.location=O.AevumAeroCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-galacticcybersystems").addEventListener("click",function(){return d.a.location=O.AevumGalacticCybersystems,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-watchdogsecurity").addEventListener("click",function(){return d.a.location=O.AevumWatchdogSecurity,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-rhoconstruction").addEventListener("click",function(){return d.a.location=O.AevumRhoConstruction,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-aevumpolice").addEventListener("click",function(){return d.a.location=O.AevumPolice,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-netlinktechnologies").addEventListener("click",function(){return d.a.location=O.AevumNetLinkTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-crushfitnessgym").addEventListener("click",function(){return d.a.location=O.AevumCrushFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-snapfitnessgym").addEventListener("click",function(){return d.a.location=O.AevumSnapFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-slums").addEventListener("click",function(){return d.a.location=O.AevumSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-travelagency").addEventListener("click",function(){return d.a.location=O.ChongqingTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-kuaigonginternational").addEventListener("click",function(){return d.a.location=O.ChongqingKuaiGongInternational,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-solarisspacesystems").addEventListener("click",function(){return d.a.location=O.ChongqingSolarisSpaceSystems,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-slums").addEventListener("click",function(){return d.a.location=O.ChongqingSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-travelagency").addEventListener("click",function(){return d.a.location=O.Sector12TravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-rothmanuniversity").addEventListener("click",function(){return d.a.location=O.Sector12RothmanUniversity,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-megacorp").addEventListener("click",function(){return d.a.location=O.Sector12MegaCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-bladeindustries").addEventListener("click",function(){return d.a.location=O.Sector12BladeIndustries,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-foursigma").addEventListener("click",function(){return d.a.location=O.Sector12FourSigma,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-icarusmicrosystems").addEventListener("click",function(){return d.a.location=O.Sector12IcarusMicrosystems,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-universalenergy").addEventListener("click",function(){return d.a.location=O.Sector12UniversalEnergy,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-deltaone").addEventListener("click",function(){return d.a.location=O.Sector12DeltaOne,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-cia").addEventListener("click",function(){return d.a.location=O.Sector12CIA,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-nsa").addEventListener("click",function(){return d.a.location=O.Sector12NSA,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-alphaenterprises").addEventListener("click",function(){return d.a.location=O.Sector12AlphaEnterprises,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-carmichaelsecurity").addEventListener("click",function(){return d.a.location=O.Sector12CarmichaelSecurity,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-foodnstuff").addEventListener("click",function(){return d.a.location=O.Sector12FoodNStuff,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-joesguns").addEventListener("click",function(){return d.a.location=O.Sector12JoesGuns,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-irongym").addEventListener("click",function(){return d.a.location=O.Sector12IronGym,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-powerhousegym").addEventListener("click",function(){return d.a.location=O.Sector12PowerhouseGym,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-slums").addEventListener("click",function(){return d.a.location=O.Sector12Slums,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-cityhall").addEventListener("click",function(){return d.a.location=O.Sector12CityHall,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-travelagency").addEventListener("click",function(){return d.a.location=O.NewTokyoTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-defcomm").addEventListener("click",function(){return d.a.location=O.NewTokyoDefComm,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-vitalife").addEventListener("click",function(){return d.a.location=O.NewTokyoVitaLife,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-globalpharmaceuticals").addEventListener("click",function(){return d.a.location=O.NewTokyoGlobalPharmaceuticals,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-noodlebar").addEventListener("click",function(){return d.a.location=O.NewTokyoNoodleBar,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-slums").addEventListener("click",function(){return d.a.location=O.NewTokyoSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-travelagency").addEventListener("click",function(){return d.a.location=O.IshimaTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-stormtechnologies").addEventListener("click",function(){return d.a.location=O.IshimaStormTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-novamedical").addEventListener("click",function(){return d.a.location=O.IshimaNovaMedical,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-omegasoftware").addEventListener("click",function(){return d.a.location=O.IshimaOmegaSoftware,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-slums").addEventListener("click",function(){return d.a.location=O.IshimaSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-travelagency").addEventListener("click",function(){return d.a.location=O.VolhavenTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-zbinstituteoftechnology").addEventListener("click",function(){return d.a.location=O.VolhavenZBInstituteOfTechnology,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-omnitekincorporated").addEventListener("click",function(){return d.a.location=O.VolhavenOmniTekIncorporated,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-nwo").addEventListener("click",function(){return d.a.location=O.VolhavenNWO,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-helioslabs").addEventListener("click",function(){return d.a.location=O.VolhavenHeliosLabs,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-omniacybersystems").addEventListener("click",function(){return d.a.location=O.VolhavenOmniaCybersystems,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-lexocorp").addEventListener("click",function(){return d.a.location=O.VolhavenLexoCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-syscoresecurities").addEventListener("click",function(){return d.a.location=O.VolhavenSysCoreSecurities,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-computek").addEventListener("click",function(){return d.a.location=O.VolhavenCompuTek,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-milleniumfitnessgym").addEventListener("click",function(){return d.a.location=O.VolhavenMilleniumFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-slums").addEventListener("click",function(){return d.a.location=O.VolhavenSlums,l.Engine.loadLocationContent(),!1});var e=document.getElementById("location-software-job"),t=document.getElementById("location-software-consultant-job"),n=document.getElementById("location-it-job"),i=document.getElementById("location-security-engineer-job"),c=document.getElementById("location-network-engineer-job"),u=document.getElementById("location-business-job"),m=document.getElementById("location-business-consultant-job"),f=document.getElementById("location-security-job"),v=document.getElementById("location-agent-job"),w=document.getElementById("location-employee-job"),S=document.getElementById("location-parttime-employee-job"),T=document.getElementById("location-waiter-job"),R=document.getElementById("location-parttime-waiter-job"),x=(document.getElementById("location-work"),document.getElementById("location-purchase-2gb")),I=document.getElementById("location-purchase-4gb"),P=document.getElementById("location-purchase-8gb"),N=document.getElementById("location-purchase-16gb"),L=document.getElementById("location-purchase-32gb"),B=document.getElementById("location-purchase-64gb"),j=document.getElementById("location-purchase-128gb"),D=document.getElementById("location-purchase-256gb"),F=document.getElementById("location-purchase-512gb"),H=document.getElementById("location-purchase-1tb"),W=document.getElementById("location-purchase-tor"),G=document.getElementById("location-purchase-home-ram"),U=document.getElementById("location-purchase-home-cores"),q=document.getElementById("location-travel-to-aevum"),K=document.getElementById("location-travel-to-chongqing"),V=document.getElementById("location-travel-to-sector12"),Y=document.getElementById("location-travel-to-newtokyo"),z=document.getElementById("location-travel-to-ishima"),J=document.getElementById("location-travel-to-volhaven"),$=document.getElementById("location-slums-shoplift"),X=document.getElementById("location-slums-rob-store"),Q=document.getElementById("location-slums-mug"),Z=document.getElementById("location-slums-larceny"),ee=document.getElementById("location-slums-deal-drugs"),te=document.getElementById("location-slums-bond-forgery"),ne=document.getElementById("location-slums-traffic-arms"),ae=document.getElementById("location-slums-homicide"),ie=document.getElementById("location-slums-gta"),re=document.getElementById("location-slums-kidnap"),oe=document.getElementById("location-slums-assassinate"),se=document.getElementById("location-slums-heist"),le=document.getElementById("location-cityhall-create-corporation"),ce=document.getElementById("location-nsa-bladeburner"),ue=document.getElementById("location-hospital-treatment");e.addEventListener("click",function(){return d.a.applyForSoftwareJob(),!1}),t.addEventListener("click",function(){return d.a.applyForSoftwareConsultantJob(),!1}),n.addEventListener("click",function(){return d.a.applyForItJob(),!1}),i.addEventListener("click",function(){return d.a.applyForSecurityEngineerJob(),!1}),c.addEventListener("click",function(){return d.a.applyForNetworkEngineerJob(),!1}),u.addEventListener("click",function(){return d.a.applyForBusinessJob(),!1}),m.addEventListener("click",function(){return d.a.applyForBusinessConsultantJob(),!1}),f.addEventListener("click",function(){return d.a.applyForSecurityJob(),!1}),v.addEventListener("click",function(){return d.a.applyForAgentJob(),!1}),w.addEventListener("click",function(){return d.a.applyForEmployeeJob(),!1}),S.addEventListener("click",function(){return d.a.applyForPartTimeEmployeeJob(),!1}),T.addEventListener("click",function(){return d.a.applyForWaiterJob(),!1}),R.addEventListener("click",function(){return d.a.applyForPartTimeWaiterJob(),!1}),x.addEventListener("click",function(){return M(2,2*o.a.BaseCostFor1GBOfRamServer),!1}),I.addEventListener("click",function(){return M(4,4*o.a.BaseCostFor1GBOfRamServer),!1}),P.addEventListener("click",function(){return M(8,8*o.a.BaseCostFor1GBOfRamServer),!1}),N.addEventListener("click",function(){return M(16,16*o.a.BaseCostFor1GBOfRamServer),!1}),L.addEventListener("click",function(){return M(32,32*o.a.BaseCostFor1GBOfRamServer),!1}),B.addEventListener("click",function(){return M(64,64*o.a.BaseCostFor1GBOfRamServer),!1}),j.addEventListener("click",function(){return M(128,128*o.a.BaseCostFor1GBOfRamServer),!1}),D.addEventListener("click",function(){return M(256,256*o.a.BaseCostFor1GBOfRamServer),!1}),F.addEventListener("click",function(){return M(512,512*o.a.BaseCostFor1GBOfRamServer),!1}),H.addEventListener("click",function(){return M(1024,1024*o.a.BaseCostFor1GBOfRamServer),!1}),W.addEventListener("click",function(){return function(){if(d.a.money.lt(o.a.TorRouterCost))return void Object(y.dialogBoxCreate)("You cannot afford to purchase the Tor router");d.a.loseMoney(o.a.TorRouterCost);var e=new h.d({ip:Object(b.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(h.a)(e),g.a.addIp("Darkweb Server",e.ip);const t=document.getElementById("location-purchase-tor");t.setAttribute("class","a-link-button-bought"),t.innerHTML="TOR Router - Purchased",d.a.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(d.a.getHomeComputer().ip),Object(y.dialogBoxCreate)("You have purchased a Tor router!
You now have access to the dark web from your home computer
Use the scan/scan-analyze commands to search for the dark web connection.")}(),!1}),G.addEventListener("click",function(){const e=d.a.getUpgradeHomeRamCost(),t=d.a.getHomeComputer().maxRam;var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Purchase",a.innerHTML="Cancel",n.addEventListener("click",()=>{Object(p.a)(e),Object(E.a)()}),a.addEventListener("click",()=>{Object(E.a)()}),Object(E.b)("Would you like to purchase additional RAM for your home computer?

This will upgrade your RAM from "+t+"GB to "+2*t+"GB.

This will cost "+_()(e).format("$0.000a"))}),U.addEventListener("click",function(){var e=d.a.getHomeComputer().cpuCores;if(!(e>=8)){var t=[0,1e10,25e10,5e12,1e14,1e15,2e16,2e17];t=t[e];var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Purchase",a.innerHTML="Cancel",n.addEventListener("click",()=>{d.a.money.lt(t)?Object(y.dialogBoxCreate)("You do not have enough mone to purchase an additional CPU Core for your home computer!"):(d.a.loseMoney(t),d.a.getHomeComputer().cpuCores++,Object(y.dialogBoxCreate)("You purchased an additional CPU Core for your home computer! It now has "+d.a.getHomeComputer().cpuCores+" cores.")),Object(E.a)()}),a.addEventListener("click",()=>{Object(E.a)()}),Object(E.b)("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.

Purchasing an additional core (for a total of "+(d.a.getHomeComputer().cpuCores+1)+") will cost "+_()(t).format("$0.000a"))}}),q.addEventListener("click",function(){return A(O.Aevum,o.a.TravelCost),!1}),K.addEventListener("click",function(){return A(O.Chongqing,o.a.TravelCost),!1}),V.addEventListener("click",function(){return A(O.Sector12,o.a.TravelCost),!1}),Y.addEventListener("click",function(){return A(O.NewTokyo,o.a.TravelCost),!1}),z.addEventListener("click",function(){return A(O.Ishima,o.a.TravelCost),!1}),J.addEventListener("click",function(){return A(O.Volhaven,o.a.TravelCost),!1}),$.addEventListener("click",function(){return s.a.Shoplift.commit(),!1}),X.addEventListener("click",function(){return s.a.RobStore.commit(),!1}),Q.addEventListener("click",function(){return s.a.Mug.commit(),!1}),Z.addEventListener("click",function(){return s.a.Larceny.commit(),!1}),ee.addEventListener("click",function(){return s.a.DealDrugs.commit(),!1}),te.addEventListener("click",function(){return s.a.BondForgery.commit(),!1}),ne.addEventListener("click",function(){return s.a.TraffickArms.commit(),!1}),ae.addEventListener("click",function(){return s.a.Homicide.commit(),!1}),ie.addEventListener("click",function(){return s.a.GrandTheftAuto.commit(),!1}),re.addEventListener("click",function(){return s.a.Kidnap.commit(),!1}),oe.addEventListener("click",function(){return s.a.Assassination.commit(),!1}),se.addEventListener("click",function(){return s.a.Heist.commit(),!1}),le.addEventListener("click",function(){var e=Object(E.j)(),t=Object(E.i)();e.innerText="Create Corporation",t.innerText="Cancel",e.addEventListener("click",function(){if(d.a.money.lt(15e10))return Object(y.dialogBoxCreate)("You don't have enough money to create a corporation! You need $150b"),Object(E.f)();d.a.loseMoney(15e10);var e=Object(E.h)();return null==e||""==e?(Object(y.dialogBoxCreate)("Invalid company name!"),!1):(d.a.corporation=new r.a({name:e}),C(),document.getElementById("corporation-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(y.dialogBoxCreate)("Congratulations! You just started your own corporation. You can visit and manage your company in the City"),Object(E.f)())}),t.addEventListener("click",function(){return Object(E.f)()}),d.a.corporation instanceof r.a||Object(E.g)("Would you like to start a corporation? This will require $150b for registration and initial funding.

If so, please enter a name for your corporation below:")}),ce.addEventListener("click",function(){d.a.bladeburner&&d.a.bladeburner instanceof a.a?l.Engine.loadBladeburnerContent():d.a.strength>=100&&d.a.defense>=100&&d.a.dexterity>=100&&d.a.agility>=100?(d.a.bladeburner=new a.a({new:!0}),Object(y.dialogBoxCreate)("You have been accepted into the Bladeburner division!"),C(),document.getElementById("bladeburner-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()):Object(y.dialogBoxCreate)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}),ue.addEventListener("click",function(){d.a.hp<0&&(d.a.hp=0);var e=(d.a.max_hp-d.a.hp)*o.a.HospitalCostPerHp;return d.a.loseMoney(e),Object(y.dialogBoxCreate)("You were healed to full health! The hospital billed you for $"+Object(k.formatNumber)(e,2).toString()),d.a.hp=d.a.max_hp,C(),!1})}function S(e,t){!1===d.a.firstTimeTraveled&&(d.a.firstTimeTraveled=!0,document.getElementById("travel-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),d.a.money.lt(t)?Object(y.dialogBoxCreate)("You cannot afford to travel to "+e):(d.a.loseMoney(t),d.a.city=e,Object(y.dialogBoxCreate)("You are now in "+e+"!"),l.Engine.loadWorldContent())}function T(e){var t=document.getElementById("location-study-computer-science"),n=document.getElementById("location-data-structures-class"),a=document.getElementById("location-networks-class"),i=document.getElementById("location-algorithms-class"),r=document.getElementById("location-management-class"),s=document.getElementById("location-leadership-class");t.style.display="block",n.style.display="block",a.style.display="block",i.style.display="block",r.style.display="block",s.style.display="block";var l=o.a.ClassDataStructuresBaseCost*e,c=o.a.ClassNetworksBaseCost*e,u=o.a.ClassAlgorithmsBaseCost*e,d=o.a.ClassManagementBaseCost*e,h=o.a.ClassLeadershipBaseCost*e;n.innerHTML="Take Data Structures course ($"+l+" / sec)",a.innerHTML="Take Networks course ($"+c+" / sec)",i.innerHTML="Take Algorithms course ($"+u+" / sec)",r.innerHTML="Take Management course ($"+d+" / sec)",s.innerHTML="Take Leadership course ($"+h+" / sec)"}function R(e,t){Object(f.clearEventListeners)("location-study-computer-science").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassStudyComputerScience),!1}),Object(f.clearEventListeners)("location-data-structures-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassDataStructures),!1}),Object(f.clearEventListeners)("location-networks-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassNetworks),!1}),Object(f.clearEventListeners)("location-algorithms-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassAlgorithms),!1}),Object(f.clearEventListeners)("location-management-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassManagement),!1}),Object(f.clearEventListeners)("location-leadership-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassLeadership),!1})}function x(e){var t=document.getElementById("location-gym-train-str"),n=document.getElementById("location-gym-train-def"),a=document.getElementById("location-gym-train-dex"),i=document.getElementById("location-gym-train-agi");t.style.display="block",n.style.display="block",a.style.display="block",i.style.display="block";var r=o.a.ClassGymBaseCost*e;t.innerHTML="Train Strength ($"+r+" / sec)",n.innerHTML="Train Defense ($"+r+" / sec)",a.innerHTML="Train Dexterity ($"+r+" / sec)",i.innerHTML="Train Agility ($"+r+" / sec)"}function I(e,t){Object(f.clearEventListeners)("location-gym-train-str").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymStrength),!1}),Object(f.clearEventListeners)("location-gym-train-def").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymDefense),!1}),Object(f.clearEventListeners)("location-gym-train-dex").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymDexterity),!1}),Object(f.clearEventListeners)("location-gym-train-agi").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymAgility),!1})}function P(e,t,n,a,i,r){e.style.display="block",e.addEventListener("click",function(){return l.Engine.loadInfiltrationContent(),Object(c.a)(t,n,a,i,r),!1})}function N(e,t,n){var a=i.a[e];if(null!=a){var r=d.a.getNextCompanyPosition(a,t);if(null!=r&&a.hasPosition(r)){var o=Object(i.f)(a,r,!0);n.innerHTML+=""+o+""}}}function A(e,t){if(m.a.SuppressTravelConfirmation)S(e,t);else{var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Yes",a.innerHTML="No",a.addEventListener("click",()=>(Object(E.a)(),!1)),n.addEventListener("click",()=>(Object(E.a)(),S(e,t),!1)),Object(E.b)("Would you like to travel to "+e+"? The trip will cost $"+Object(k.formatNumber)(t,2)+".")}}function M(e,t){var n=Object(E.j)(),a=Object(E.i)();n.innerHTML="Purchase Server",a.innerHTML="Cancel",n.addEventListener("click",function(){Object(p.b)(e,t),Object(E.f)()}),a.addEventListener("click",function(){Object(E.f)()}),Object(E.g)("Would you like to purchase a new server with "+e+"GB of RAM for $"+Object(k.formatNumber)(t,2)+"?

Please enter the server hostname below:
")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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),function(e){n.d(t,"Engine",function(){return V});var a=n(8),i=n(65),r=n(27),o=n(13),s=n(3),l=n(42),c=n(87),u=n(14),d=n.n(u),h=n(2),p=n(60),m=n(51),g=n(18),y=n(16),f=n(28),b=n(95),v=n(74),_=n(11),k=n(48),E=n(1),O=n(21),C=n(12),w=n(38),S=n(4),T=n(41),R=n(50),x=n(29),I=n(63),P=n(33),N=n(39),A=n(34),M=n(23),L=n(0),B=n(67),j=n(47),D=n(57),F=n(30),H=n(9),W=n(22),G=n(49),U=n(19),q=n(24),K=n(25);n(134),n(132),n(130),n(128),n(126),n(124),n(122),n(120),n(118),n(116);e(document).keydown(function(e){if(!0!==W.a.DisableHotkeys){if(!(L.a.isWorking||j.b||N.c||v.a))if(84==e.keyCode&&e.altKey)e.preventDefault(),V.loadTerminalContent();else if(e.keyCode===K.a.C&&e.altKey)e.preventDefault(),V.loadCharacterContent();else if(e.keyCode===K.a.E&&e.altKey)e.preventDefault(),V.loadScriptEditorContent();else if(e.keyCode===K.a.S&&e.altKey)e.preventDefault(),V.loadActiveScriptsContent();else if(e.keyCode===K.a.H&&e.altKey)e.preventDefault(),V.loadHacknetNodesContent();else if(e.keyCode===K.a.W&&e.altKey)e.preventDefault(),V.loadWorldContent();else if(e.keyCode===K.a.J&&e.altKey)e.preventDefault(),V.loadJobContent();else if(e.keyCode===K.a.R&&e.altKey)e.preventDefault(),V.loadTravelContent();else if(e.keyCode===K.a.P&&e.altKey)e.preventDefault(),V.loadCreateProgramContent();else if(e.keyCode===K.a.F&&e.altKey){if(V.currentPage===V.Page.Terminal&&w.a.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),V.loadFactionsContent()}else e.keyCode===K.a.A&&e.altKey?(e.preventDefault(),V.loadAugmentationsContent()):e.keyCode===K.a.U&&e.altKey&&(e.preventDefault(),V.loadTutorialContent());e.keyCode===K.a.O&&e.altKey&&(e.preventDefault(),Object(i.b)())}});let V={version:"",Debug:!0,Clickables:{terminalMainMenuButton:null,characterMainMenuButton:null,scriptEditorMainMenuButton:null,activeScriptsMainMenuButton:null,hacknetNodesMainMenuButton:null,worldMainMenuButton:null,travelMainMenuButton:null,jobMainMenuButton:null,createProgramMainMenuButton:null,factionsMainMenuButton:null,augmentationsMainMenuButton:null,tutorialMainMenuButton:null,bladeburnerMenuButton:null,corporationMenuButton:null,gangMenuButton:null,devMainMenuButton:null,saveMainMenuButton:null,deleteMainMenuButton:null,tutorialNetworkingButton:null,tutorialHackingButton:null,tutorialScriptsButton:null,tutorialNetscriptButton:null,tutorialTravelingButton:null,tutorialCompaniesButton:null,tutorialFactionsButton:null,tutorialAugmentationsButton:null,tutorialBackButton:null,devMenuGiveMoney:null,devMenuGiveRam:null,devMenuAugDropdown:null,devMenuAddAug:null,devMenuTriggerBitFlume:null,devMenuFactionDropdown:null,devMenuAddFaction:null,devMenuOpen:null,devMenuMinSecurity:null,devMenuMaxMoney:null,devMenuConnectDropdown:null,devMenuConnect:null,devMenuProgramsDropdown:null,devMenuAddProgram:null,devMenuHackingExp:null,devMenuAddHacking:null,devMenuStrengthExp:null,devMenuAddStrength:null,devMenuDefenseExp:null,devMenuAddDefense:null,devMenuDexterityExp:null,devMenuAddDexterity:null,devMenuAgilityExp:null,devMenuAddAgility:null,devMenuCharismaExp:null,devMenuAddCharisma:null,devMenuIntelligenceExp:null,devMenuAddIntelligence:null,devMenuEnableIntelligence:null,devMenuDisableIntelligence:null,devMenuSFN:null,devMenuSFLvl:null,devMenuAddSF:null},Display:{progress:null,statusText:null,hacking_skill:null,terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,worldContent:null,createProgramContent:null,factionsContent:null,factionContent:null,factionAugmentationsContent:null,augmentationsContent:null,tutorialContent:null,devMenuContent:null,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},Page:{Terminal:"Terminal",CharacterInfo:"CharacterInfo",ScriptEditor:"ScriptEditor",ActiveScripts:"ActiveScripts",HacknetNodes:"HacknetNodes",World:"World",CreateProgram:"CreateProgram",Factions:"Factions",Faction:"Faction",Augmentations:"Augmentations",Tutorial:"Tutorial",DevMenu:"Dev Menu",Location:"Location",workInProgress:"WorkInProgress",RedPill:"RedPill",CinematicText:"CinematicText",Infiltration:"Infiltration",StockMarket:"StockMarket",Gang:"Gang",Mission:"Mission",Corporation:"Corporation",Bladeburner:"Bladeburner"},currentPage:null,overview:new b.a,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){V.hideAllContent(),V.Display.terminalContent.style.display="block",V.currentPage=V.Page.Terminal,document.getElementById("terminal-menu-link").classList.add("active")},loadCharacterContent:function(){V.hideAllContent(),V.Display.characterContent.style.display="block",V.displayCharacterInfo(),V.currentPage=V.Page.CharacterInfo,document.getElementById("stats-menu-link").classList.add("active")},loadScriptEditorContent:function(e="",t=""){V.hideAllContent(),V.Display.scriptEditorContent.style.display="block";var n=ace.edit("javascript-editor");""!=e&&(document.getElementById("script-editor-filename").value=e,n.setValue(t)),n.focus(),Object(F.h)(),V.currentPage=V.Page.ScriptEditor,document.getElementById("create-script-menu-link").classList.add("active")},loadActiveScriptsContent:function(){V.hideAllContent(),V.Display.activeScriptsContent.style.display="block",Object(m.c)(),V.currentPage=V.Page.ActiveScripts,document.getElementById("active-scripts-menu-link").classList.add("active")},loadHacknetNodesContent:function(){V.hideAllContent(),V.Display.hacknetNodesContent.style.display="block",Object(R.b)(),V.currentPage=V.Page.HacknetNodes,document.getElementById("hacknet-nodes-menu-link").classList.add("active")},loadWorldContent:function(){V.hideAllContent(),V.Display.worldContent.style.display="block",V.displayWorldInfo(),V.currentPage=V.Page.World,document.getElementById("city-menu-link").classList.add("active")},loadCreateProgramContent:function(){V.hideAllContent(),V.Display.createProgramContent.style.display="block",Object(O.b)(),V.currentPage=V.Page.CreateProgram,document.getElementById("create-program-menu-link").classList.add("active")},loadFactionsContent:function(){V.hideAllContent(),V.Display.factionsContent.style.display="block",V.displayFactionsInfo(),V.currentPage=V.Page.Factions,document.getElementById("factions-menu-link").classList.add("active")},loadFactionContent:function(){V.hideAllContent(),V.Display.factionContent.style.display="block",V.currentPage=V.Page.Faction},loadAugmentationsContent:function(){V.hideAllContent(),V.Display.augmentationsContent.style.display="block",Object(g.g)(),V.currentPage=V.Page.Augmentations,document.getElementById("augmentations-menu-link").classList.add("active")},loadTutorialContent:function(){V.hideAllContent(),V.Display.tutorialContent.style.display="block",V.displayTutorialContent(),V.currentPage=V.Page.Tutorial,document.getElementById("tutorial-menu-link").classList.add("active")},loadDevMenuContent:function(){V.hideAllContent(),V.Display.devMenuContent.style.display="block",V.displayDevMenuContent(),V.currentPage=V.Page.DevMenu,document.getElementById("dev-menu-link").classList.add("active")},loadLocationContent:function(){V.hideAllContent(),V.Display.locationContent.style.display="block",Object(S.b)(),V.currentPage=V.Page.Location},loadTravelContent:function(){switch(L.a.city){case S.a.Aevum:L.a.location=S.a.AevumTravelAgency;break;case S.a.Chongqing:L.a.location=S.a.ChongqingTravelAgency;break;case S.a.Sector12:L.a.location=S.a.Sector12TravelAgency;break;case S.a.NewTokyo:L.a.location=S.a.NewTokyoTravelAgency;break;case S.a.Ishima:L.a.location=S.a.IshimaTravelAgency;break;case S.a.Volhaven:L.a.location=S.a.VolhavenTravelAgency;break;default:Object(a.dialogBoxCreate)("ERROR: Invalid city. This is a bug please contact game dev")}V.loadLocationContent()},loadJobContent:function(){""!=L.a.companyName?(L.a.location=L.a.companyName,V.loadLocationContent()):Object(a.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.")},loadWorkInProgressContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",V.Display.workInProgressContent.style.display="block",V.currentPage=V.Page.WorkInProgress},loadRedPillContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",V.Display.redPillContent.style.display="block",V.currentPage=V.Page.RedPill},loadCinematicTextContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",V.Display.cinematicTextContent.style.display="block",V.currentPage=V.Page.CinematicText},loadInfiltrationContent:function(){V.hideAllContent(),V.Display.infiltrationContent.style.display="block",V.currentPage=V.Page.Infiltration},loadStockMarketContent:function(){V.hideAllContent(),V.Display.stockMarketContent.style.display="block",V.currentPage=V.Page.StockMarket,Object(q.f)()},loadGangContent:function(){V.hideAllContent(),document.getElementById("gang-container")||L.a.inGang()?(Object(T.d)(),V.currentPage=V.Page.Gang):(V.loadTerminalContent(),V.currentPage=V.Page.Terminal)},loadMissionContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",V.Display.missionContent.style.display="block",V.currentPage=V.Page.Mission},loadCorporationContent:function(){L.a.corporation instanceof k.a&&(V.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",L.a.corporation.createUI(),V.currentPage=V.Page.Corporation)},loadBladeburnerContent:function(){if(L.a.bladeburner instanceof f.a)try{V.hideAllContent(),V.currentPage=V.Page.Bladeburner,L.a.bladeburner.createContent()}catch(e){Object(l.a)(e)}},hideAllContent:function(){V.Display.terminalContent.style.display="none",V.Display.characterContent.style.display="none",V.Display.scriptEditorContent.style.display="none",V.Display.activeScriptsContent.style.display="none",V.Display.hacknetNodesContent.style.display="none",V.Display.worldContent.style.display="none",V.Display.createProgramContent.style.display="none",V.Display.factionsContent.style.display="none",V.Display.factionContent.style.display="none",V.Display.factionAugmentationsContent.style.display="none",V.Display.augmentationsContent.style.display="none",V.Display.tutorialContent.style.display="none",V.Display.devMenuContent.style.display="none",V.Display.locationContent.style.display="none",V.Display.workInProgressContent.style.display="none",V.Display.redPillContent.style.display="none",V.Display.cinematicTextContent.style.display="none",V.Display.infiltrationContent.style.display="none",V.Display.stockMarketContent.style.display="none",V.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),L.a.corporation instanceof k.a&&L.a.corporation.clearUI(),L.a.bladeburner instanceof f.a&&L.a.bladeburner.clearContent(),V.aevumLocationsList.style.display="none",V.chongqingLocationsList.style.display="none",V.sector12LocationsList.style.display="none",V.newTokyoLocationsList.style.display="none",V.ishimaLocationsList.style.display="none",V.volhavenLocationsList.style.display="none",document.getElementById("terminal-menu-link").classList.remove("active"),document.getElementById("create-script-menu-link").classList.remove("active"),document.getElementById("active-scripts-menu-link").classList.remove("active"),document.getElementById("create-program-menu-link").classList.remove("active"),document.getElementById("stats-menu-link").classList.remove("active"),document.getElementById("factions-menu-link").classList.remove("active"),document.getElementById("augmentations-menu-link").classList.remove("active"),document.getElementById("hacknet-nodes-menu-link").classList.remove("active"),document.getElementById("city-menu-link").classList.remove("active"),document.getElementById("tutorial-menu-link").classList.remove("active"),document.getElementById("options-menu-link").classList.remove("active"),document.getElementById("dev-menu-link").classList.remove("active"),document.getElementById("bladeburner-menu-link").classList.remove("active"),document.getElementById("corporation-menu-link").classList.remove("active"),document.getElementById("gang-menu-link").classList.remove("active")},displayCharacterOverviewInfo:function(){V.overview.update();const e=document.getElementById("character-overview-save-button");W.a.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},displayCharacterInfo:function(){Object(r.removeChildrenFromElement)(V.Display.characterInfo);var e="";""!=L.a.companyPosition&&(e=L.a.companyPosition.positionName);var t="";L.a.intelligence>0&&(t="Intelligence: "+L.a.intelligence.toLocaleString()+"


");let n="";if(L.a.sourceFiles.length>0&&(n="Time played since last Bitnode destroyed: "+Object(h.convertTimeMsToTimeElapsedString)(L.a.playtimeSinceLastBitnode)+"
"),V.Display.characterInfo.appendChild(Object(s.createElement)("pre",{innerHTML:"General

Current City: "+L.a.city+"

Employer: "+L.a.companyName+"
Job Title: "+e+"

Money: $"+Object(h.formatNumber)(L.a.money.toNumber(),2)+"


Stats

Hacking Level: "+L.a.hacking_skill.toLocaleString()+" ("+d()(L.a.hacking_exp).format("(0.000a)")+" experience)
Strength: "+L.a.strength.toLocaleString()+" ("+d()(L.a.strength_exp).format("(0.000a)")+" experience)
Defense: "+L.a.defense.toLocaleString()+" ("+d()(L.a.defense_exp).format("(0.000a)")+" experience)
Dexterity: "+L.a.dexterity.toLocaleString()+" ("+d()(L.a.dexterity_exp).format("(0.000a)")+" experience)
Agility: "+L.a.agility.toLocaleString()+" ("+d()(L.a.agility_exp).format("(0.000a)")+" experience)
Charisma: "+L.a.charisma.toLocaleString()+" ("+d()(L.a.charisma_exp).format("(0.000a)")+" experience)
"+t+"Multipliers

Hacking Chance multiplier: "+Object(h.formatNumber)(100*L.a.hacking_chance_mult,2)+"%
Hacking Speed multiplier: "+Object(h.formatNumber)(100*L.a.hacking_speed_mult,2)+"%
Hacking Money multiplier: "+Object(h.formatNumber)(100*L.a.hacking_money_mult,2)+"%
Hacking Growth multiplier: "+Object(h.formatNumber)(100*L.a.hacking_grow_mult,2)+"%

Hacking Level multiplier: "+Object(h.formatNumber)(100*L.a.hacking_mult,2)+"%
Hacking Experience multiplier: "+Object(h.formatNumber)(100*L.a.hacking_exp_mult,2)+"%

Strength Level multiplier: "+Object(h.formatNumber)(100*L.a.strength_mult,2)+"%
Strength Experience multiplier: "+Object(h.formatNumber)(100*L.a.strength_exp_mult,2)+"%

Defense Level multiplier: "+Object(h.formatNumber)(100*L.a.defense_mult,2)+"%
Defense Experience multiplier: "+Object(h.formatNumber)(100*L.a.defense_exp_mult,2)+"%

Dexterity Level multiplier: "+Object(h.formatNumber)(100*L.a.dexterity_mult,2)+"%
Dexterity Experience multiplier: "+Object(h.formatNumber)(100*L.a.dexterity_exp_mult,2)+"%

Agility Level multiplier: "+Object(h.formatNumber)(100*L.a.agility_mult,2)+"%
Agility Experience multiplier: "+Object(h.formatNumber)(100*L.a.agility_exp_mult,2)+"%

Charisma Level multiplier: "+Object(h.formatNumber)(100*L.a.charisma_mult,2)+"%
Charisma Experience multiplier: "+Object(h.formatNumber)(100*L.a.charisma_exp_mult,2)+"%

Hacknet Node production multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_money_mult,2)+"%
Hacknet Node purchase cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_purchase_cost_mult,2)+"%
Hacknet Node RAM upgrade cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_ram_cost_mult,2)+"%
Hacknet Node Core purchase cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_core_cost_mult,2)+"%
Hacknet Node level upgrade cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_level_cost_mult,2)+"%

Company reputation gain multiplier: "+Object(h.formatNumber)(100*L.a.company_rep_mult,2)+"%
Faction reputation gain multiplier: "+Object(h.formatNumber)(100*L.a.faction_rep_mult,2)+"%
Salary multiplier: "+Object(h.formatNumber)(100*L.a.work_money_mult,2)+"%
Crime success multiplier: "+Object(h.formatNumber)(100*L.a.crime_success_mult,2)+"%
Crime money multiplier: "+Object(h.formatNumber)(100*L.a.crime_money_mult,2)+"%


Misc

Servers owned: "+L.a.purchasedServers.length+"
Hacknet Nodes owned: "+L.a.hacknetNodes.length+"
Augmentations installed: "+L.a.augmentations.length+"
Time played since last Augmentation: "+Object(h.convertTimeMsToTimeElapsedString)(L.a.playtimeSinceLastAug)+"
"+n+"Time played: "+Object(h.convertTimeMsToTimeElapsedString)(L.a.totalPlaytime)})),0!==L.a.sourceFiles.length){var a="BitNode"+L.a.bitNodeN;V.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",innerHTML:"
Current BitNode: "+L.a.bitNodeN+" ("+y.b[a].name+")

"})),V.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",fontSize:"13px",marginLeft:"4%",innerHTML:y.b[a].info}))}},aevumLocationsList:null,chongqingLocationsList:null,sector12LocationsList:null,newTokyoLocationsList:null,ishimaLocationsList:null,volhavenLocationsList:null,displayWorldInfo:function(){V.aevumLocationsList.style.display="none",V.chongqingLocationsList.style.display="none",V.sector12LocationsList.style.display="none",V.newTokyoLocationsList.style.display="none",V.ishimaLocationsList.style.display="none",V.volhavenLocationsList.style.display="none",document.getElementById("world-city-name").innerHTML=L.a.city;document.getElementById("world-city-desc");switch(L.a.city){case S.a.Aevum:V.aevumLocationsList.style.display="inline";break;case S.a.Chongqing:V.chongqingLocationsList.style.display="inline";break;case S.a.Sector12:V.sector12LocationsList.style.display="inline",3!==L.a.bitNodeN&&!A.e||8===L.a.bitNodeN?document.getElementById("sector12-cityhall-li").style.display="none":document.getElementById("sector12-cityhall-li").style.display="block";break;case S.a.NewTokyo:V.newTokyoLocationsList.style.display="inline";break;case S.a.Ishima:V.ishimaLocationsList.style.display="inline";break;case S.a.Volhaven:V.volhavenLocationsList.style.display="inline";break;default:console.log("Invalid city value in Player object!")}var e,t=document.getElementById("generic-locations-list");(t.style.display="inline",Object(r.removeChildrenFromElement)(t),(e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"World Stock Exchange",class:"a-link-button",clickListener:()=>(L.a.location=S.a.WorldStockExchange,V.loadStockMarketContent(),!1)})),t.appendChild(e),L.a.corporation instanceof k.a&&null==document.getElementById("location-corporation-button"))&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:L.a.corporation.name,id:"location-corporation-button",class:"a-link-button",clickListener:()=>(V.loadCorporationContent(),!1)})),t.appendChild(e));L.a.bladeburner instanceof f.a&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"Bladeburner Headquarters",class:"a-link-button",clickListener:()=>(V.loadBladeburnerContent(),!1)})),t.appendChild(e))},displayFactionsInfo:function(){Object(r.removeChildrenFromElement)(V.Display.factionsContent),V.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Factions"})),V.Display.factionsContent.appendChild(Object(s.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(s.createElement)("ul");V.Display.factionsContent.appendChild(Object(s.createElement)("br"));for(var t=0;t(V.loadFactionContent(),Object(C.c)(n),!1)})),e.appendChild(Object(s.createElement)("br"))}();V.Display.factionsContent.appendChild(e),V.Display.factionsContent.appendChild(Object(s.createElement)("br")),V.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),V.Display.factionsContent.appendChild(Object(s.createElement)("p",{width:"70%",innerText:"Lists factions you have been invited to, as well as factions you have previously rejected. You can accept these faction invitations at any time."}));var n=Object(s.createElement)("ul");for(t=0;t{Object(C.h)(C.b[e]);for(var t=0;t0&&(V._lastUpdate=e-n,L.a.lastUpdate=e-n,V.updateGame(t)),window.requestAnimationFrame(V.idleTimer)},updateGame:function(e=1){var t=e*V._idleSpeed;null==L.a.totalPlaytime&&(L.a.totalPlaytime=0),null==L.a.playtimeSinceLastAug&&(L.a.playtimeSinceLastAug=0),null==L.a.playtimeSinceLastBitnode&&(L.a.playtimeSinceLastBitnode=0),L.a.totalPlaytime+=t,L.a.playtimeSinceLastAug+=t,L.a.playtimeSinceLastBitnode+=t,1==L.a.startAction&&(V._totalActionTime=L.a.actionTime,V._actionTimeLeft=L.a.actionTime,V._actionInProgress=!0,V._actionProgressBarCount=1,V._actionProgressStr="[ ]",V._actionTimeStr="Time left: ",L.a.startAction=!1),L.a.isWorking&&(L.a.workType==E.a.WorkTypeFaction?L.a.workForFaction(e):L.a.workType==E.a.WorkTypeCreateProgram?L.a.createProgramWork(e):L.a.workType==E.a.WorkTypeStudyClass?L.a.takeClass(e):L.a.workType==E.a.WorkTypeCrime?L.a.commitCrime(e):L.a.workType==E.a.WorkTypeCompanyPartTime?L.a.workPartTime(e):L.a.work(e)),2==L.a.bitNodeN&&L.a.inGang()&&L.a.gang.process(e),N.c&&N.b&&N.b.process(e),L.a.corporation instanceof k.a&&L.a.corporation.storeCycles(e),L.a.bladeburner instanceof f.a&&L.a.bladeburner.storeCycles(e),V.decrementAllCounters(e),V.checkCounters(),1==V._actionInProgress&&V.updateHackProgress(e),Object(M.g)(e),Object(R.d)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:600,messages:150,stockTick:30,sCr:1500,mechanicProcess:5},decrementAllCounters:function(e=1){for(var t in V.Counters)V.Counters.hasOwnProperty(t)&&(V.Counters[t]=V.Counters[t]-e)},checkCounters:function(){if(V.Counters.autoSaveCounter<=0&&(D.b.saveGame(Y),null==W.a.AutosaveInterval&&(W.a.AutosaveInterval=60),0===W.a.AutosaveInterval?V.Counters.autoSaveCounter=1/0:V.Counters.autoSaveCounter=5*W.a.AutosaveInterval),V.Counters.updateSkillLevelsCounter<=0&&(L.a.updateSkillLevels(),V.Counters.updateSkillLevelsCounter=10),V.Counters.updateActiveScriptsDisplay<=0&&(Object(m.c)(),V.currentPage===V.Page.ActiveScripts?V.Counters.updateActiveScriptsDisplay=5:V.Counters.updateActiveScriptsDisplay=10),V.Counters.updateDisplays<=0&&(V.displayCharacterOverviewInfo(),V.currentPage==V.Page.CharacterInfo?V.displayCharacterInfo():V.currentPage==V.Page.HacknetNodes?Object(R.f)():V.currentPage==V.Page.CreateProgram&&Object(O.b)(),p.b&&Object(p.c)(),V.Counters.updateDisplays=3),V.Counters.updateDisplaysMed<=0&&(V.currentPage===V.Page.Corporation&&L.a.corporation.updateUIContent(),V.Counters.updateDisplaysMed=9),V.Counters.updateDisplaysLong<=0&&(V.currentPage===V.Page.Gang?Object(T.g)():V.currentPage===V.Page.ScriptEditor&&Object(F.h)(),V.Counters.updateDisplaysLong=15),V.Counters.createProgramNotifications<=0){var e=Object(O.c)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),V.Counters.createProgramNotifications=10}if(V.Counters.checkFactionInvitations<=0){var n=L.a.checkForFactionInvitations();if(n.length>0){!1===L.a.firstFacInvRecvd&&(L.a.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=n[Math.floor(Math.random()*n.length)];Object(C.g)(a)}V.Counters.checkFactionInvitations=100}if(V.Counters.passiveFactionGrowth<=0){var i=Math.floor(600-V.Counters.passiveFactionGrowth);Object(C.j)(i),V.Counters.passiveFactionGrowth=600}if(V.Counters.messages<=0&&(Object(P.c)(),g.c[g.b.TheRedPill].owned?V.Counters.messages=4500:V.Counters.messages=150),V.Counters.stockTick<=0&&(L.a.hasWseAccount&&Object(q.q)(),V.Counters.stockTick=30),V.Counters.sCr<=0&&(L.a.hasWseAccount&&Object(q.o)(),V.Counters.sCr=1500),V.Counters.mechanicProcess<=0){if(L.a.corporation instanceof k.a&&L.a.corporation.process(),L.a.bladeburner instanceof f.a)try{L.a.bladeburner.process()}catch(e){Object(l.a)("Exception caught in Bladeburner.process(): "+e)}V.Counters.mechanicProcess=5}},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*V._idleSpeed;V._actionTimeLeft-=t/1e3,V._actionTimeLeft=Math.max(V._actionTimeLeft,0);for(var n=Math.round(100*(1-V._actionTimeLeft/V._totalActionTime));2*V._actionProgressBarCount<=n;)V._actionProgressStr=Object(h.replaceAt)(V._actionProgressStr,V._actionProgressBarCount,"|"),V._actionProgressBarCount+=1;V._actionTimeStr="Time left: "+Math.max(0,Math.round(V._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=V._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=V._actionProgressStr.replace(/ /g," "),n>=100&&(V._actionInProgress=!1,K.b.finishAction())},_prevTimeout:null,createStatusText:function(e){null!=V._prevTimeout&&(clearTimeout(V._prevTimeout),V._prevTimeout=null);var t=document.getElementById("status-text");t.style.display="inline-block",t.setAttribute("class","status-text"),t.innerHTML=e,V._prevTimeout=setTimeout(function(){t.style.display="none",t.removeAttribute("class"),t.innerHTML=""},3e3)},closeMainMenuHeader:function(e){for(var t=0;t{t.delay=null,n()},e),t.delayResolve=n})}function y(e,t,n=null){var a="";null!=n&&(a=" (Line "+b(n,e)+")");return"|"+e.serverIp+"|"+e.name+"|"+t+a}function f(e,t,n,a,i=1){if(null!=(d=Object(s.d)(t,n,e)))return a.scriptRef.log(t+" is already running on "+e.hostname),h.resolve(!1);for(var o=0;op?(a.scriptRef.log("Cannot run script "+t+"(t="+i+") on "+e.hostname+" because there is not enough available RAM!"),h.resolve(!1)):(null==a.disableLogs.ALL&&null==a.disableLogs.exec&&null==a.disableLogs.run&&null==a.disableLogs.spawn&&a.scriptRef.log("Running script: "+t+" on "+e.hostname+" with "+i+" threads and args: "+Object(c.arrayToString)(n)+". May take a few seconds to start up..."),(d=new s.b(l,n)).threads=i,e.runningScripts.push(d),Object(r.c)(d,e),h.resolve(!0))}return a.scriptRef.log("Could not find script "+t+" on "+e.hostname),h.resolve(!1)}function b(e,t){var n=t.scriptRef.scriptRef.code;try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}function v(e){if(!Object(d.isString)(e))return!1;let t=e.split("|");if(4!=t.length)return!1;var n=t[1];return!!Object(u.isValidIPAddress)(n)}function _(e){var t=(100-e.hackDifficulty)/100,n=1.75*i.a.hacking_skill+.2*i.a.intelligence,a=(n-e.requiredHackingSkill)/n*t*i.a.hacking_chance_mult;return a>1?1:a<0?0:a}function k(e){return 5*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult}function E(e){return null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty),(e.baseDifficulty*i.a.hacking_exp_mult*.3+3)*a.a.HackExpGain}function O(e){var t=(100-e.hackDifficulty)/100*((i.a.hacking_skill-(e.requiredHackingSkill-1))/i.a.hacking_skill)*i.a.hacking_money_mult/240;return t<0?0:t>1?1:t*a.a.ScriptHackMoney}function C(e){return 1e3*(16*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult)}function w(e){return 1e3*(20*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult)}h.config({warnings:!1,longStackTraces:!1,cancellation:!0,monitoring:!1})},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"dialogBoxCreate",function(){return r}),n.d(t,"dialogBoxOpened",function(){return i});let a=[];e(document).click(function(t){i&&a.length>=1&&(e(t.target).closest(a[0]).length||(a[0].remove(),a.splice(0,1),0==a.length?i=!1:a[0].style.visibility="visible"))}),e(document).on("click",".dialog-box-close-button",function(e){i&&a.length>=1&&(a[0].remove(),a.splice(0,1),0==a.length?i=!1:a[0].style.visibility="visible")});var i=!1;function r(e,t=!1){var n=document.createElement("div");n.setAttribute("class","dialog-box-container");var r=document.createElement("div");r.setAttribute("class","dialog-box-content");var o,s=document.createElement("span");s.setAttribute("class","dialog-box-close-button"),s.innerHTML="×",t?(o=document.createElement("pre")).innerHTML=e:(o=document.createElement("p")).innerHTML=e.replace(/(?:\r\n|\r|\n)/g,"
"),r.appendChild(s),r.appendChild(o),n.appendChild(r),document.body.appendChild(n),a.length>=1&&(n.style.visibility="hidden"),a.push(n),setTimeout(function(){i=!0},400)}}.call(this,n(53))},function(e,t,n){"use strict";n.d(t,"d",function(){return h}),n.d(t,"b",function(){return y}),n.d(t,"e",function(){return k}),n.d(t,"c",function(){return _}),n.d(t,"g",function(){return b}),n.d(t,"a",function(){return v}),n.d(t,"j",function(){return m}),n.d(t,"f",function(){return p}),n.d(t,"h",function(){return f}),n.d(t,"i",function(){return g});var a=n(16),i=n(1),r=n(21),o=n(0),s=(n(30),n(19)),l=n(5),c=n(17),u=n(10),d=n(66);function h(e={ip:Object(c.a)(),hostname:""}){this.ip=e.ip?e.ip:Object(c.a)();for(var t=e.hostname,n=0,i="";null!=_(t+i);)i="-"+n,++n;this.hostname=t+i,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights,this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.manuallyHacked=!1,this.maxRam=null!=e.maxRam?e.maxRam:0,this.ramUsed=0,this.cpuCores=1,this.scripts=[],this.runningScripts=[],this.programs=[],this.messages=[],this.textFiles=[],this.dir=0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*a.a.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*a.a.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*a.a.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.serversOnNetwork=[],this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5,this.sshPortOpen=!1,this.ftpPortOpen=!1,this.smtpPortOpen=!1,this.httpPortOpen=!1,this.sqlPortOpen=!1,this.openPortCount=0}function p(){var e=new h({ip:Object(c.a)(),hostname:"ecorp",organizationName:"ECorp",requiredHackingSkill:Object(l.getRandomInt)(1150,1300),moneyAvailable:Object(l.getRandomInt)(3e10,7e10),hackDifficulty:99,serverGrowth:99,numOpenPortsRequired:5});v(e);var t=new h({ip:Object(c.a)(),hostname:"megacorp",organizationName:"MegaCorp",requiredHackingSkill:Object(l.getRandomInt)(1150,1300),moneyAvailable:Object(l.getRandomInt)(4e10,6e10),hackDifficulty:99,serverGrowth:99,numOpenPortsRequired:5});v(t);var n=new h({ip:Object(c.a)(),hostname:"b-and-a",organizationName:"Bachman & Associates",requiredHackingSkill:Object(l.getRandomInt)(1e3,1050),moneyAvailable:Object(l.getRandomInt)(2e10,25e9),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(65,75),numOpenPortsRequired:5});v(n);var a=new h({ip:Object(c.a)(),hostname:"blade",organizationName:"Blade Industries",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(1e3,1100),moneyAvailable:Object(l.getRandomInt)(12e9,2e10),hackDifficulty:Object(l.getRandomInt)(90,95),serverGrowth:Object(l.getRandomInt)(60,75),numOpenPortsRequired:5});a.messages.push("beyond-man.lit"),v(a);var i=new h({ip:Object(c.a)(),hostname:"nwo",organizationName:"New World Order",requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(25e9,35e9),hackDifficulty:99,serverGrowth:Object(l.getRandomInt)(75,85),numOpenPortsRequired:5});i.messages.push("the-hidden-world.lit"),v(i);var r=new h({ip:Object(c.a)(),hostname:"clarkeinc",organizationName:"Clarke Incorporated",requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(15e9,25e9),hackDifficulty:Object(l.getRandomInt)(50,60),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});r.messages.push("beyond-man.lit"),r.messages.push("cost-of-immortality.lit"),v(r);var u=new h({ip:Object(c.a)(),hostname:"omnitek",organizationName:"OmniTek Incorporated",maxRam:256,requiredHackingSkill:Object(l.getRandomInt)(900,1100),moneyAvailable:Object(l.getRandomInt)(15e9,2e10),hackDifficulty:Object(l.getRandomInt)(90,99),serverGrowth:Object(l.getRandomInt)(95,99),numOpenPortsRequired:5});u.messages.push("coded-intelligence.lit"),u.messages.push("history-of-synthoids.lit"),v(u);var d=new h({ip:Object(c.a)(),hostname:"4sigma",organizationName:"FourSigma",requiredHackingSkill:Object(l.getRandomInt)(950,1200),moneyAvailable:Object(l.getRandomInt)(15e9,25e9),hackDifficulty:Object(l.getRandomInt)(60,70),serverGrowth:Object(l.getRandomInt)(75,99),numOpenPortsRequired:5});v(d);var p=new h({ip:Object(c.a)(),hostname:"kuai-gong",organizationName:"KuaiGong International",requiredHackingSkill:Object(l.getRandomInt)(1e3,1250),moneyAvailable:Object(l.getRandomInt)(2e10,3e10),hackDifficulty:Object(l.getRandomInt)(95,99),serverGrowth:Object(l.getRandomInt)(90,99),numOpenPortsRequired:5});v(p);var m=new h({ip:Object(c.a)(),hostname:"fulcrumtech",organizationName:"Fulcrum Technologies",maxRam:512,requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(14e8,18e8),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(80,99),numOpenPortsRequired:5});m.messages.push("simulated-reality.lit"),v(m);var g=new h({ip:Object(c.a)(),hostname:"fulcrumassets",organizationName:"Fulcrum Technologies Assets",requiredHackingSkill:Object(l.getRandomInt)(1200,1500),moneyAvailable:1e6,hackDifficulty:99,serverGrowth:1,numOpenPortsRequired:5});v(g),s.a.addIp(s.b.FulcrumSecretTechnologies,g.ip);var y=new h({ip:Object(c.a)(),hostname:"stormtech",organizationName:"Storm Technologies",requiredHackingSkill:Object(l.getRandomInt)(900,1050),moneyAvailable:Object(l.getRandomInt)(1e9,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});v(y);var f=new h({ip:Object(c.a)(),hostname:"defcomm",organizationName:"DefComm",requiredHackingSkill:Object(l.getRandomInt)(900,1e3),moneyAvailable:Object(l.getRandomInt)(8e8,95e7),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});v(f);var b=new h({ip:Object(c.a)(),hostname:"infocomm",organizationName:"InfoComm",requiredHackingSkill:Object(l.getRandomInt)(875,950),moneyAvailable:Object(l.getRandomInt)(6e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,90),serverGrowth:Object(l.getRandomInt)(35,75),numOpenPortsRequired:5});v(b);var _=new h({ip:Object(c.a)(),hostname:"helios",organizationName:"Helios Labs",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(55e7,75e7),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});_.messages.push("beyond-man.lit"),v(_);var k=new h({ip:Object(c.a)(),hostname:"vitalife",organizationName:"VitaLife",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(775,900),moneyAvailable:Object(l.getRandomInt)(7e8,8e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(60,80),numOpenPortsRequired:5});k.messages.push("A-Green-Tomorrow.lit"),v(k);var E=new h({ip:Object(c.a)(),hostname:"icarus",organizationName:"Icarus Microsystems",requiredHackingSkill:Object(l.getRandomInt)(850,925),moneyAvailable:Object(l.getRandomInt)(9e8,1e9),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(85,95),numOpenPortsRequired:5});v(E);var O=new h({ip:Object(c.a)(),hostname:"univ-energy",organizationName:"Universal Energy",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(11e8,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(80,90),numOpenPortsRequired:4});v(O);var C=new h({ip:Object(c.a)(),hostname:"titan-labs",organizationName:"Titan Laboratories",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(800,875),moneyAvailable:Object(l.getRandomInt)(75e7,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(60,80),numOpenPortsRequired:5});C.messages.push("coded-intelligence.lit"),v(C);var w=new h({ip:Object(c.a)(),hostname:"microdyne",organizationName:"Microdyne Technologies",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(800,875),moneyAvailable:Object(l.getRandomInt)(5e8,7e8),hackDifficulty:Object(l.getRandomInt)(65,75),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});w.messages.push("synthetic-muscles.lit"),v(w);var S=new h({ip:Object(c.a)(),hostname:"taiyang-digital",organizationName:"Taiyang Digital",requiredHackingSkill:Object(l.getRandomInt)(850,950),moneyAvailable:Object(l.getRandomInt)(8e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});S.messages.push("A-Green-Tomorrow.lit"),S.messages.push("brighter-than-the-sun.lit"),v(S);var T=new h({ip:Object(c.a)(),hostname:"galactic-cyber",organizationName:"Galactic Cybersystems",requiredHackingSkill:Object(l.getRandomInt)(825,875),moneyAvailable:Object(l.getRandomInt)(75e7,85e7),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});v(T);var R=new h({ip:Object(c.a)(),hostname:"aerocorp",organizationName:"AeroCorp",requiredHackingSkill:Object(l.getRandomInt)(850,925),moneyAvailable:Object(l.getRandomInt)(1e9,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(55,65),numOpenPortsRequired:5});R.messages.push("man-and-machine.lit"),v(R);var x=new h({ip:Object(c.a)(),hostname:"omnia",organizationName:"Omnia Cybersystems",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(850,950),moneyAvailable:Object(l.getRandomInt)(9e8,1e9),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(60,70),numOpenPortsRequired:5});x.messages.push("history-of-synthoids.lit"),v(x);var I=new h({ip:Object(c.a)(),hostname:"zb-def",organizationName:"ZB Defense Industries",requiredHackingSkill:Object(l.getRandomInt)(775,825),moneyAvailable:Object(l.getRandomInt)(9e8,11e8),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(65,75),numOpenPortsRequired:4});I.messages.push("synthetic-muscles.lit"),v(I);var P=new h({ip:Object(c.a)(),hostname:"applied-energetics",organizationName:"Applied Energetics",requiredHackingSkill:Object(l.getRandomInt)(775,850),moneyAvailable:Object(l.getRandomInt)(7e8,1e9),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(70,75),numOpenPortsRequired:4});v(P);var N=new h({ip:Object(c.a)(),hostname:"solaris",organizationName:"Solaris Space Systems",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(750,850),moneyAvailable:Object(l.getRandomInt)(7e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});N.messages.push("A-Green-Tomorrow.lit"),N.messages.push("the-failed-frontier.lit"),v(N);var A=new h({ip:Object(c.a)(),hostname:"deltaone",organizationName:"Delta One",requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(13e8,17e8),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});v(A);var M=new h({ip:Object(c.a)(),hostname:"global-pharm",organizationName:"Global Pharmaceuticals",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(750,850),moneyAvailable:Object(l.getRandomInt)(15e8,175e7),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(80,90),numOpenPortsRequired:4});M.messages.push("A-Green-Tomorrow.lit"),v(M);var L=new h({ip:Object(c.a)(),hostname:"nova-med",organizationName:"Nova Medical",requiredHackingSkill:Object(l.getRandomInt)(775,850),moneyAvailable:Object(l.getRandomInt)(11e8,125e7),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(65,85),numOpenPortsRequired:4});v(L);var B=new h({ip:Object(c.a)(),hostname:"zeus-med",organizationName:"Zeus Medical",requiredHackingSkill:Object(l.getRandomInt)(800,850),moneyAvailable:Object(l.getRandomInt)(13e8,15e8),hackDifficulty:Object(l.getRandomInt)(70,90),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});v(B);var j=new h({ip:Object(c.a)(),hostname:"unitalife",organizationName:"UnitaLife Group",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(775,825),moneyAvailable:Object(l.getRandomInt)(1e9,11e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:4});v(j);var D=new h({ip:Object(c.a)(),hostname:"lexo-corp",organizationName:"Lexo Corporation",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(650,750),moneyAvailable:Object(l.getRandomInt)(7e8,8e8),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(55,65),numOpenPortsRequired:4});v(D);var F=new h({ip:Object(c.a)(),hostname:"rho-construction",organizationName:"Rho Construction",requiredHackingSkill:Object(l.getRandomInt)(475,525),moneyAvailable:Object(l.getRandomInt)(5e8,7e8),hackDifficulty:Object(l.getRandomInt)(40,60),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:3});v(F);var H=new h({ip:Object(c.a)(),hostname:"alpha-ent",organizationName:"Alpha Enterprises",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(500,600),moneyAvailable:Object(l.getRandomInt)(6e8,75e7),hackDifficulty:Object(l.getRandomInt)(50,70),serverGrowth:Object(l.getRandomInt)(50,60),numOpenPortsRequired:4});H.messages.push("sector-12-crime.lit"),v(H);var W=new h({ip:Object(c.a)(),hostname:"aevum-police",organizationName:"Aevum Police Network",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(400,450),moneyAvailable:Object(l.getRandomInt)(2e8,4e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(30,50),numOpenPortsRequired:4});v(W);var G=new h({ip:Object(c.a)(),hostname:"rothman-uni",organizationName:"Rothman University Network",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(370,430),moneyAvailable:Object(l.getRandomInt)(175e6,25e7),hackDifficulty:Object(l.getRandomInt)(45,55),serverGrowth:Object(l.getRandomInt)(35,45),numOpenPortsRequired:3});G.messages.push("secret-societies.lit"),G.messages.push("the-failed-frontier.lit"),G.messages.push("tensions-in-tech-race.lit"),v(G);var U=new h({ip:Object(c.a)(),hostname:"zb-institute",organizationName:"ZB Institute of Technology Network",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(725,775),moneyAvailable:Object(l.getRandomInt)(8e8,11e8),hackDifficulty:Object(l.getRandomInt)(65,85),serverGrowth:Object(l.getRandomInt)(75,85),numOpenPortsRequired:5});v(U);var q=new h({ip:Object(c.a)(),hostname:"summit-uni",organizationName:"Summit University Network",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(425,475),moneyAvailable:Object(l.getRandomInt)(2e8,35e7),hackDifficulty:Object(l.getRandomInt)(45,65),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:3});q.messages.push("secret-societies.lit"),q.messages.push("the-failed-frontier.lit"),q.messages.push("synthetic-muscles.lit"),v(q);var K=new h({ip:Object(c.a)(),hostname:"syscore",organizationName:"SysCore Securities",requiredHackingSkill:Object(l.getRandomInt)(550,650),moneyAvailable:Object(l.getRandomInt)(4e8,6e8),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(60,70),numOpenPortsRequired:4});v(K);var V=new h({ip:Object(c.a)(),hostname:"catalyst",organizationName:"Catalyst Ventures",requiredHackingSkill:Object(l.getRandomInt)(400,450),moneyAvailable:Object(l.getRandomInt)(3e8,55e7),hackDifficulty:Object(l.getRandomInt)(60,70),serverGrowth:Object(l.getRandomInt)(25,55),numOpenPortsRequired:3});V.messages.push("tensions-in-tech-race.lit"),v(V);var Y=new h({ip:Object(c.a)(),hostname:"the-hub",organizationName:"The Hub",requiredHackingSkill:Object(l.getRandomInt)(275,325),moneyAvailable:Object(l.getRandomInt)(15e7,2e8),hackDifficulty:Object(l.getRandomInt)(35,45),serverGrowth:Object(l.getRandomInt)(45,55),numOpenPortsRequired:2});v(Y);var z=new h({ip:Object(c.a)(),hostname:"comptek",organizationName:"CompuTek",requiredHackingSkill:Object(l.getRandomInt)(300,400),moneyAvailable:Object(l.getRandomInt)(22e7,25e7),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(45,65),numOpenPortsRequired:3});z.messages.push("man-and-machine.lit"),v(z);var J=new h({ip:Object(c.a)(),hostname:"netlink",organizationName:"NetLink Technologies",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(375,425),moneyAvailable:275e6,hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(45,75),numOpenPortsRequired:3});J.messages.push("simulated-reality.lit"),v(J);var $=new h({ip:Object(c.a)(),hostname:"johnson-ortho",organizationName:"Johnson Orthopedics",requiredHackingSkill:Object(l.getRandomInt)(250,300),moneyAvailable:Object(l.getRandomInt)(7e7,85e6),hackDifficulty:Object(l.getRandomInt)(35,65),serverGrowth:Object(l.getRandomInt)(35,65),numOpenPortsRequired:2});v($);var X=new h({ip:Object(c.a)(),hostname:"foodnstuff",organizationName:"Food N Stuff Supermarket",maxRam:16,requiredHackingSkill:1,moneyAvailable:2e6,hackDifficulty:10,serverGrowth:5,numOpenPortsRequired:0});X.messages.push("sector-12-crime.lit"),v(X);var Q=new h({ip:Object(c.a)(),hostname:"sigma-cosmetics",organizationName:"Sigma Cosmetics",maxRam:16,requiredHackingSkill:5,moneyAvailable:23e5,hackDifficulty:10,serverGrowth:10,numOpenPortsRequired:0});v(Q);var Z=new h({ip:Object(c.a)(),hostname:"joesguns",organizationName:"Joe's Guns",maxRam:16,requiredHackingSkill:10,moneyAvailable:25e5,hackDifficulty:15,serverGrowth:20,numOpenPortsRequired:0});v(Z);var ee=new h({ip:Object(c.a)(),hostname:"zer0",organizationName:"ZER0 Nightclub",maxRam:32,requiredHackingSkill:75,moneyAvailable:75e5,hackDifficulty:25,serverGrowth:40,numOpenPortsRequired:1});v(ee);var te=new h({ip:Object(c.a)(),hostname:"nectar-net",organizationName:"Nectar Nightclub Network",maxRam:16,requiredHackingSkill:20,moneyAvailable:275e4,hackDifficulty:20,serverGrowth:25,numOpenPortsRequired:0});v(te);var ne=new h({ip:Object(c.a)(),hostname:"neo-net",organizationName:"Neo Nightclub Network",maxRam:32,requiredHackingSkill:50,moneyAvailable:5e6,hackDifficulty:25,serverGrowth:25,numOpenPortsRequired:1});ne.messages.push("the-hidden-world.lit"),v(ne);var ae=new h({ip:Object(c.a)(),hostname:"silver-helix",organizationName:"Silver Helix",maxRam:64,requiredHackingSkill:150,moneyAvailable:45e6,hackDifficulty:30,serverGrowth:30,numOpenPortsRequired:2});ae.messages.push("new-triads.lit"),v(ae);var ie=new h({ip:Object(c.a)(),hostname:"hong-fang-tea",organizationName:"HongFang Teahouse",maxRam:16,requiredHackingSkill:30,moneyAvailable:3e6,hackDifficulty:15,serverGrowth:20,numOpenPortsRequired:0});ie.messages.push("brighter-than-the-sun.lit"),v(ie);var re=new h({ip:Object(c.a)(),hostname:"harakiri-sushi",organizationName:"HaraKiri Sushi Bar Network",maxRam:16,requiredHackingSkill:40,moneyAvailable:4e6,hackDifficulty:15,serverGrowth:40,numOpenPortsRequired:0});v(re);var oe=new h({ip:Object(c.a)(),hostname:"phantasy",organizationName:"Phantasy Club",maxRam:32,requiredHackingSkill:100,moneyAvailable:24e6,hackDifficulty:20,serverGrowth:35,numOpenPortsRequired:2});v(oe);var se=new h({ip:Object(c.a)(),hostname:"max-hardware",organizationName:"Max Hardware Store",maxRam:32,requiredHackingSkill:80,moneyAvailable:1e7,hackDifficulty:15,serverGrowth:30,numOpenPortsRequired:1});v(se);var le=new h({ip:Object(c.a)(),hostname:"omega-net",organizationName:"Omega Software",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(180,220),moneyAvailable:Object(l.getRandomInt)(6e7,7e7),hackDifficulty:Object(l.getRandomInt)(25,35),serverGrowth:Object(l.getRandomInt)(30,40),numOpenPortsRequired:2});le.messages.push("the-new-god.lit"),v(le);var ce=new h({ip:Object(c.a)(),hostname:"crush-fitness",organizationName:"Crush Fitness",requiredHackingSkill:Object(l.getRandomInt)(225,275),moneyAvailable:Object(l.getRandomInt)(4e7,6e7),hackDifficulty:Object(l.getRandomInt)(35,45),serverGrowth:Object(l.getRandomInt)(27,33),numOpenPortsRequired:2});v(ce);var ue=new h({ip:Object(c.a)(),hostname:"iron-gym",organizationName:"Iron Gym Network",maxRam:32,requiredHackingSkill:100,moneyAvailable:2e7,hackDifficulty:30,serverGrowth:20,numOpenPortsRequired:1});v(ue);var de=new h({ip:Object(c.a)(),hostname:"millenium-fitness",organizationName:"Millenium Fitness Network",requiredHackingSkill:Object(l.getRandomInt)(475,525),moneyAvailable:25e7,hackDifficulty:Object(l.getRandomInt)(45,55),serverGrowth:Object(l.getRandomInt)(25,45),numOpenPortsRequired:3});v(de);var he=new h({ip:Object(c.a)(),hostname:"powerhouse-fitness",organizationName:"Powerhouse Fitness",requiredHackingSkill:Object(l.getRandomInt)(950,1100),moneyAvailable:9e8,hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(50,60),numOpenPortsRequired:5});v(he);var pe=new h({ip:Object(c.a)(),hostname:"snap-fitness",organizationName:"Snap Fitness",requiredHackingSkill:Object(l.getRandomInt)(675,800),moneyAvailable:45e7,hackDifficulty:Object(l.getRandomInt)(40,60),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:4});v(pe);var me=new h({ip:Object(c.a)(),hostname:"run4theh111z",organizationName:"The Runners",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(505,550),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:4});me.messages.push("simulated-reality.lit"),me.messages.push("the-new-god.lit"),v(me),s.a.addIp(s.b.BitRunnersServer,me.ip);var ge=new h({ip:Object(c.a)(),hostname:"I.I.I.I",organizationName:"I.I.I.I",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(340,365),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:3});ge.messages.push("democracy-is-dead.lit"),v(ge),s.a.addIp(s.b.TheBlackHandServer,ge.ip);var ye=new h({ip:Object(c.a)(),hostname:"avmnite-02h",organizationName:"NiteSec",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(202,220),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:2});ye.messages.push("democracy-is-dead.lit"),v(ye),s.a.addIp(s.b.NiteSecServer,ye.ip);var fe=new h({ip:Object(c.a)(),hostname:".",organizationName:".",maxRam:16,requiredHackingSkill:Object(l.getRandomInt)(505,550),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:4});v(fe),s.a.addIp(s.b.TheDarkArmyServer,fe.ip);var be=new h({ip:Object(c.a)(),hostname:"CSEC",organizationName:"CyberSec",maxRam:8,requiredHackingSkill:Object(l.getRandomInt)(51,60),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:1});be.messages.push("democracy-is-dead.lit"),v(be),s.a.addIp(s.b.CyberSecServer,be.ip);var ve=new h({ip:Object(c.a)(),hostname:"The-Cave",organizationName:"Helios",requiredHackingSkill:925,moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:5});ve.messages.push("alpha-omega.lit"),v(ve),s.a.addIp(s.b.DaedalusServer,ve.ip);var _e=new h({ip:Object(c.a)(),hostname:s.b.WorldDaemon,organizationName:s.b.WorldDaemon,requiredHackingSkill:3e3,moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:5});v(_e),s.a.addIp(s.b.WorldDaemon,_e.ip);for(var ke=[ue,X,Q,Z,ie,re],Ee=[se,te,ee,be],Oe=[le,oe,ae,ne],Ce=[ce,J,z,Y,$,ye],we=[V,K,q,U,G,ge],Se=[D,F,H,W,de],Te=[M,R,T,pe],Re=[A,j,x],xe=[B,N,O,E,f],Ie=[L,I,S,b],Pe=[P,w,C,me],Ne=[k,_,y,m],Ae=[p,d,u,fe],Me=[he,r,i,a,n],Le=[g,t,e,ve],Be=0;Bei.a.ServerMaxGrowthRate&&(r=i.a.ServerMaxGrowthRate);const s=n*(e.serverGrowth/100)*a.a.ServerGrowthRate;var l=Math.pow(r,s*o.a.hacking_grow_mult);l<1&&(console.log("WARN: serverGrowth calculated to be less than 1"),l=1);const c=e.moneyAvailable;if(e.moneyAvailable*=l,e.moneyMax&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),e.moneyMax&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),c!==e.moneyAvailable){let t=function(e,t){let n=1+(i.a.ServerBaseGrowthRate-1)/e.hackDifficulty;n>i.a.ServerMaxGrowthRate&&(n=i.a.ServerMaxGrowthRate);const a=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*o.a.hacking_grow_mult*a)}(e,e.moneyAvailable/c);t=Math.max(0,t),e.fortify(2*i.a.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/c}function g(e){e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(r.a.NukeProgram.name),e.scripts.forEach(function(e){e.updateRamUsage()}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")}h.prototype.setMaxRam=function(e){this.maxRam=e},h.prototype.getServerOnNetwork=function(e){if(!(e>this.serversOnNetwork.length))return y[this.serversOnNetwork[e]];console.log("Tried to get server on network that was out of range")},h.prototype.getScript=function(e){for(var t=0;t1e6&&(this.hackDifficulty=1e6)},h.prototype.fortify=function(e){this.hackDifficulty+=e,this.capDifficulty()},h.prototype.weaken=function(e){this.hackDifficulty-=e*a.a.ServerWeakenRate,this.capDifficulty()},h.prototype.toJSON=function(){return Object(u.Generic_toJSON)("Server",this)},h.fromJSON=function(e){return Object(u.Generic_fromJSON)(h,e.data)},u.Reviver.constructors.Server=h;let y={};function f(){for(var e in y)delete y[e];y={}}function b(e){y=JSON.parse(e,u.Reviver)}function v(e){var t=e.ip;if(Object(c.b)(t))throw console.log("IP of server that's being added: "+t),console.log("Hostname of the server thats being added: "+e.hostname),console.log("The server that already has this IP is: "+y[t].hostname),new Error("Error: Trying to add a server with an existing IP");y[t]=e}function _(e){for(var t in y)if(y.hasOwnProperty(t)&&y[t].hostname==e)return y[t];return null}function k(e){return Object(d.isValidIPAddress)(e)?void 0!==y[e]?y[e]:null:_(e)}function E(e,t,n){this.s=e,this.p=t,this.c=[],this.n=n,this.d=t.d+1,this.scrs=[],this.pgms=[],this.msgs=[]}E.prototype.createSubdir=function(e){new E(this.s,this,e)},E.prototype.getPath=function(e){for(var t=[],n=this;null!==n;)t.unshift(n.n,"/"),n=n.parent;return t.unshift("/"),t.join("")}},function(e,t,n){"use strict";function a(e,t){var n;return null==t?(console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0):"object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data&&"function"==typeof(n=a.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON?n.fromJSON(t):t}function i(e,t,n){var a,i,r;for(n||(n=Object.keys(t)),a={},i=0;i0&&t>=n;)++e,t-=n,n*=a.a.FactionReputationToFavorMult;return[e,t]},o.prototype.toJSON=function(){return Object(r.Generic_toJSON)("Company",this)},o.fromJSON=function(e){return Object(r.Generic_fromJSON)(o,e.data)},r.Reviver.constructors.Company=o,s.prototype.setPerformanceParameters=function(e,t,n,a,i,r,o=1){e+t+n+a+i+r==100?(this.hackingEffectiveness=e,this.strengthEffectiveness=t,this.defenseEffectiveness=n,this.dexterityEffectiveness=a,this.agilityEffectiveness=i,this.charismaEffectiveness=r,this.positionMultiplier=o):console.log("CompanyPosition.setPerformanceParameters() arguments do not total to 100")},s.prototype.setExperienceGains=function(e,t,n,a,i,r){this.hackingExpGain=e,this.strengthExpGain=t,this.defenseExpGain=n,this.dexterityExpGain=a,this.agilityExpGain=i,this.charismaExpGain=r},s.prototype.calculateJobPerformance=function(e,t,n,i,r,o){var s=this.hackingEffectiveness*e/a.a.MaxSkillLevel,l=this.strengthEffectiveness*t/a.a.MaxSkillLevel,c=this.defenseEffectiveness*n/a.a.MaxSkillLevel,u=this.dexterityEffectiveness*i/a.a.MaxSkillLevel,d=this.agilityEffectiveness*r/a.a.MaxSkillLevel,h=this.charismaEffectiveness*o/a.a.MaxSkillLevel,p=this.positionMultiplier*(s+l+c+u+d+h)/100;return isNaN(p)&&(console.log("ERROR: Code should not reach here"),p=(s+l+c+u+d+h)/100),p},s.prototype.isSoftwareJob=function(){return"Software Engineering Intern"==this.positionName||"Junior Software Engineer"==this.positionName||"Senior Software Engineer"==this.positionName||"Lead Software Developer"==this.positionName||"Head of Software"==this.positionName||"Head of Engineering"==this.positionName||"Vice President of Technology"==this.positionName||"Chief Technology Officer"==this.positionName},s.prototype.isITJob=function(){return"IT Intern"==this.positionName||"IT Analyst"==this.positionName||"IT Manager"==this.positionName||"Systems Administrator"==this.positionName},s.prototype.isSecurityEngineerJob=function(){return"Security Engineer"==this.positionName},s.prototype.isNetworkEngineerJob=function(){return"Network Engineer"==this.positionName||"Network Administrator"==this.positionName},s.prototype.isBusinessJob=function(){return"Business Intern"==this.positionName||"Business Analyst"==this.positionName||"Business Manager"==this.positionName||"Operations Manager"==this.positionName||"Chief Financial Officer"==this.positionName||"Chief Executive Officer"==this.positionName},s.prototype.isSecurityJob=function(){return"Security Guard"==this.positionName||"Police Officer"==this.positionName||"Security Officer"==this.positionName||"Security Supervisor"==this.positionName||"Head of Security"==this.positionName},s.prototype.isAgentJob=function(){return"Field Agent"==this.positionName||"Secret Agent"==this.positionName||"Special Operative"==this.positionName},s.prototype.isSoftwareConsultantJob=function(){return"Software Consultant"==this.positionName||"Senior Software Consultant"==this.positionName},s.prototype.isBusinessConsultantJob=function(){return"Business Consultant"==this.positionName||"Senior Business Consultant"==this.positionName},s.prototype.isPartTimeJob=function(){return!(!this.isSoftwareConsultantJob()&&!this.isBusinessConsultantJob()&&"Part-time Waiter"!=this.positionName&&"Part-time Employee"!=this.positionName)},s.prototype.toJSON=function(){return Object(r.Generic_toJSON)("CompanyPosition",this)},s.fromJSON=function(e){return Object(r.Generic_fromJSON)(s,e.data)},r.Reviver.constructors.CompanyPosition=s;let l={SoftwareIntern:new s("Software Engineering Intern",1,0,0,0,0,0,0,33),JuniorDev:new s("Junior Software Engineer",51,0,0,0,0,0,8e3,80),SeniorDev:new s("Senior Software Engineer",251,0,0,0,0,51,4e4,165),LeadDev:new s("Lead Software Developer",401,0,0,0,0,151,2e5,500),FreelanceDeveloper:new s("Freelance Developer",0,0,0,0,0,0,0,0),SoftwareConsultant:new s("Software Consultant",51,0,0,0,0,0,0,66),SeniorSoftwareConsultant:new s("Senior Software Consultant",251,0,0,0,0,51,0,132),ITIntern:new s("IT Intern",1,0,0,0,0,0,0,26),ITAnalyst:new s("IT Analyst",26,0,0,0,0,0,7e3,66),ITManager:new s("IT Manager",151,0,0,0,0,51,35e3,132),SysAdmin:new s("Systems Administrator",251,0,0,0,0,76,175e3,410),SecurityEngineer:new s("Security Engineer",151,0,0,0,0,26,35e3,121),NetworkEngineer:new s("Network Engineer",151,0,0,0,0,26,35e3,121),NetworkAdministrator:new s("Network Administrator",251,0,0,0,0,76,175e3,410),HeadOfSoftware:new s("Head of Software",501,0,0,0,0,251,4e5,800),HeadOfEngineering:new s("Head of Engineering",501,0,0,0,0,251,8e5,1650),VicePresident:new s("Vice President of Technology",601,0,0,0,0,401,16e5,2310),CTO:new s("Chief Technology Officer",751,0,0,0,0,501,32e5,2640),BusinessIntern:new s("Business Intern",1,0,0,0,0,1,0,46),BusinessAnalyst:new s("Business Analyst",6,0,0,0,0,51,8e3,100),BusinessManager:new s("Business Manager",51,0,0,0,0,101,4e4,200),OperationsManager:new s("Operations Manager",51,0,0,0,0,226,2e5,660),CFO:new s("Chief Financial Officer",76,0,0,0,0,501,8e5,1950),CEO:new s("Chief Executive Officer",101,0,0,0,0,751,32e5,3900),BusinessConsultant:new s("Business Consultant",6,0,0,0,0,51,0,88),SeniorBusinessConsultant:new s("Senior Business Consultant",51,0,0,0,0,226,0,525),PartTimeWaiter:new s("Part-time Waiter",0,0,0,0,0,0,0,20),PartTimeEmployee:new s("Part-time Employee",0,0,0,0,0,0,0,20),Waiter:new s("Waiter",0,0,0,0,0,0,0,22),Employee:new s("Employee",0,0,0,0,0,0,0,22),PoliceOfficer:new s("Police Officer",11,101,101,101,101,51,8e3,82),PoliceChief:new s("Police Chief",101,301,301,301,301,151,36e3,460),SecurityGuard:new s("Security Guard",0,51,51,51,51,1,0,50),SecurityOfficer:new s("Security Officer",26,151,151,151,151,51,8e3,195),SecuritySupervisor:new s("Security Supervisor",26,251,251,251,251,101,36e3,660),HeadOfSecurity:new s("Head of Security",51,501,501,501,501,151,144e3,1320),FieldAgent:new s("Field Agent",101,101,101,101,101,101,8e3,330),SecretAgent:new s("Secret Agent",201,251,251,251,251,201,32e3,990),SpecialOperative:new s("Special Operative",251,501,501,501,501,251,162e3,2e3),init:function(){l.SoftwareIntern.setPerformanceParameters(85,0,0,0,0,15,.9),l.SoftwareIntern.setExperienceGains(.05,0,0,0,0,.02),l.JuniorDev.setPerformanceParameters(85,0,0,0,0,15,1.1),l.JuniorDev.setExperienceGains(.1,0,0,0,0,.05),l.SeniorDev.setPerformanceParameters(80,0,0,0,0,20,1.3),l.SeniorDev.setExperienceGains(.4,0,0,0,0,.08),l.LeadDev.setPerformanceParameters(75,0,0,0,0,25,1.5),l.LeadDev.setExperienceGains(.8,0,0,0,0,.1),l.SoftwareConsultant.setPerformanceParameters(80,0,0,0,0,20,1),l.SoftwareConsultant.setExperienceGains(.08,0,0,0,0,.03),l.SeniorSoftwareConsultant.setPerformanceParameters(75,0,0,0,0,25,1.2),l.SeniorSoftwareConsultant.setExperienceGains(.25,0,0,0,0,.06),l.ITIntern.setPerformanceParameters(90,0,0,0,0,10,.9),l.ITIntern.setExperienceGains(.04,0,0,0,0,.01),l.ITAnalyst.setPerformanceParameters(85,0,0,0,0,15,1.1),l.ITAnalyst.setExperienceGains(.08,0,0,0,0,.02),l.ITManager.setPerformanceParameters(80,0,0,0,0,20,1.3),l.ITManager.setExperienceGains(.3,0,0,0,0,.1),l.SysAdmin.setPerformanceParameters(80,0,0,0,0,20,1.4),l.SysAdmin.setExperienceGains(.5,0,0,0,0,.05),l.SecurityEngineer.setPerformanceParameters(85,0,0,0,0,15,1.2),l.SecurityEngineer.setExperienceGains(.4,0,0,0,0,.05),l.NetworkEngineer.setPerformanceParameters(85,0,0,0,0,15,1.2),l.NetworkEngineer.setExperienceGains(.4,0,0,0,0,.05),l.NetworkAdministrator.setPerformanceParameters(80,0,0,0,0,20,1.3),l.NetworkAdministrator.setExperienceGains(.5,0,0,0,0,.1),l.HeadOfSoftware.setPerformanceParameters(75,0,0,0,0,25,1.6),l.HeadOfSoftware.setExperienceGains(1,0,0,0,0,.5),l.HeadOfEngineering.setPerformanceParameters(75,0,0,0,0,25,1.6),l.HeadOfEngineering.setExperienceGains(1.1,0,0,0,0,.5),l.VicePresident.setPerformanceParameters(70,0,0,0,0,30,1.75),l.VicePresident.setExperienceGains(1.2,0,0,0,0,.6),l.CTO.setPerformanceParameters(65,0,0,0,0,35,2),l.CTO.setExperienceGains(1.5,0,0,0,0,1),l.BusinessIntern.setPerformanceParameters(10,0,0,0,0,90,.9),l.BusinessIntern.setExperienceGains(.01,0,0,0,0,.08),l.BusinessAnalyst.setPerformanceParameters(15,0,0,0,0,85,1.1),l.BusinessAnalyst.setExperienceGains(.02,0,0,0,0,.15),l.BusinessManager.setPerformanceParameters(15,0,0,0,0,85,1.3),l.BusinessManager.setExperienceGains(.02,0,0,0,0,.3),l.OperationsManager.setPerformanceParameters(15,0,0,0,0,85,1.5),l.OperationsManager.setExperienceGains(.02,0,0,0,0,.4),l.CFO.setPerformanceParameters(10,0,0,0,0,90,1.6),l.CFO.setExperienceGains(.05,0,0,0,0,1),l.CEO.setPerformanceParameters(10,0,0,0,0,90,1.75),l.CEO.setExperienceGains(.1,0,0,0,0,1.5),l.BusinessConsultant.setPerformanceParameters(20,0,0,0,0,80,1),l.BusinessConsultant.setExperienceGains(.015,0,0,0,0,.15),l.SeniorBusinessConsultant.setPerformanceParameters(15,0,0,0,0,85,1.2),l.SeniorBusinessConsultant.setExperienceGains(.015,0,0,0,0,.3),l.PartTimeWaiter.setPerformanceParameters(0,10,0,10,10,70),l.PartTimeWaiter.setExperienceGains(0,.0075,.0075,.0075,.0075,.04),l.PartTimeEmployee.setPerformanceParameters(0,10,0,10,10,70),l.PartTimeEmployee.setExperienceGains(0,.0075,.0075,.0075,.0075,.03),l.Waiter.setPerformanceParameters(0,10,0,10,10,70),l.Waiter.setExperienceGains(0,.02,.02,.02,.02,.05),l.Employee.setPerformanceParameters(0,10,0,10,10,70),l.Employee.setExperienceGains(0,.02,.02,.02,.02,.04),l.SecurityGuard.setPerformanceParameters(5,20,20,20,20,15,1),l.SecurityGuard.setExperienceGains(.01,.04,.04,.04,.04,.02),l.PoliceOfficer.setPerformanceParameters(5,20,20,20,20,15,1),l.PoliceOfficer.setExperienceGains(.02,.08,.08,.08,.08,.04),l.PoliceChief.setPerformanceParameters(5,20,20,20,20,15,1.25),l.PoliceChief.setExperienceGains(.02,.1,.1,.1,.1,.1),l.SecurityOfficer.setPerformanceParameters(10,20,20,20,20,10,1.1),l.SecurityOfficer.setExperienceGains(.02,.1,.1,.1,.1,.05),l.SecuritySupervisor.setPerformanceParameters(10,15,15,15,15,30,1.25),l.SecuritySupervisor.setExperienceGains(.02,.12,.12,.12,.12,.1),l.HeadOfSecurity.setPerformanceParameters(10,15,15,15,15,30,1.4),l.HeadOfSecurity.setExperienceGains(.05,.15,.15,.15,.15,.15),l.FieldAgent.setPerformanceParameters(10,15,15,20,20,20,1),l.FieldAgent.setExperienceGains(.04,.08,.08,.08,.08,.05),l.SecretAgent.setPerformanceParameters(15,15,15,20,20,15,1.25),l.SecretAgent.setExperienceGains(.1,.15,.15,.15,.15,.1),l.SpecialOperative.setPerformanceParameters(15,15,15,20,20,15,1.5),l.SpecialOperative.setExperienceGains(.15,.2,.2,.2,.2,.15)}};function c(e){return null==e?null:e.positionName==l.SoftwareIntern.positionName?l.JuniorDev:e.positionName==l.JuniorDev.positionName?l.SeniorDev:e.positionName==l.SeniorDev.positionName?l.LeadDev:e.positionName==l.LeadDev.positionName?l.HeadOfSoftware:e.positionName==l.SoftwareConsultant.positionName?l.SeniorSoftwareConsultant:e.positionName==l.ITIntern.positionName?l.ITAnalyst:e.positionName==l.ITAnalyst.positionName?l.ITManager:e.positionName==l.ITManager.positionName?l.SysAdmin:e.positionName==l.SysAdmin.positionName?l.HeadOfEngineering:e.positionName==l.SecurityEngineer.positionName?l.HeadOfEngineering:e.positionName==l.NetworkEngineer.positionName?l.NetworkAdministrator:e.positionName==l.NetworkAdministrator.positionName?l.HeadOfEngineering:e.positionName==l.HeadOfSoftware.positionName?l.HeadOfEngineering:e.positionName==l.HeadOfEngineering.positionName?l.VicePresident:e.positionName==l.VicePresident.positionName?l.CTO:e.positionName==l.BusinessIntern.positionName?l.BusinessAnalyst:e.positionName==l.BusinessAnalyst.positionName?l.BusinessManager:e.positionName==l.BusinessManager.positionName?l.OperationsManager:e.positionName==l.OperationsManager.positionName?l.CFO:e.positionName==l.CFO.positionName?l.CEO:e.positionName==l.BusinessConsultant.positionName?l.SeniorBusinessConsultant:e.positionName==l.PoliceOfficer.positionName?l.PoliceChief:e.positionName==l.SecurityGuard.positionName?l.SecurityOfficer:e.positionName==l.SecurityOfficer.positionName?l.SecuritySupervisor:e.positionName==l.SecuritySupervisor.positionName?l.HeadOfSecurity:e.positionName==l.FieldAgent.positionName?l.SecretAgent:e.positionName==l.SecretAgent.positionName?l.SpecialOperative:null}function u(){var e=new o(i.a.AevumECorp,3,3,249);e.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumECorp)&&(e.favor=d[i.a.AevumECorp].favor,delete d[i.a.AevumECorp]),p(e);var t=new o(i.a.Sector12MegaCorp,3,3,249);t.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12MegaCorp)&&(t.favor=d[i.a.Sector12MegaCorp].favor,delete d[i.a.Sector12MegaCorp]),p(t);var n=new o(i.a.AevumBachmanAndAssociates,2.6,2.6,224);n.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumBachmanAndAssociates)&&(n.favor=d[i.a.AevumBachmanAndAssociates].favor,delete d[i.a.AevumBachmanAndAssociates]),p(n);var a=new o(i.a.Sector12BladeIndustries,2.75,2.75,224);a.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12BladeIndustries)&&(a.favor=d[i.a.Sector12BladeIndustries].favor,delete d[i.a.Sector12BladeIndustries]),p(a);var r=new o(i.a.VolhavenNWO,2.75,2.75,249);r.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenNWO)&&(r.favor=d[i.a.VolhavenNWO].favor,delete d[i.a.VolhavenNWO]),p(r);var s=new o(i.a.AevumClarkeIncorporated,2.25,2.25,224);s.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumClarkeIncorporated)&&(s.favor=d[i.a.AevumClarkeIncorporated].favor,delete d[i.a.AevumClarkeIncorporated]),p(s);var c=new o(i.a.VolhavenOmniTekIncorporated,2.25,2.25,224);c.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenOmniTekIncorporated)&&(c.favor=d[i.a.VolhavenOmniTekIncorporated].favor,delete d[i.a.VolhavenOmniTekIncorporated]),p(c);var u=new o(i.a.Sector12FourSigma,2.5,2.5,224);u.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12FourSigma)&&(u.favor=d[i.a.Sector12FourSigma].favor,delete d[i.a.Sector12FourSigma]),p(u);var h=new o(i.a.ChongqingKuaiGongInternational,2.2,2.2,224);h.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.ChongqingKuaiGongInternational)&&(h.favor=d[i.a.ChongqingKuaiGongInternational].favor,delete d[i.a.ChongqingKuaiGongInternational]),p(h);var g=new o(i.a.AevumFulcrumTechnologies,2,2,224);g.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.AevumFulcrumTechnologies)&&(g.favor=d[i.a.AevumFulcrumTechnologies].favor,delete d[i.a.AevumFulcrumTechnologies]),p(g);var y=new o(i.a.IshimaStormTechnologies,1.8,1.8,199);y.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.IshimaStormTechnologies)&&(y.favor=d[i.a.IshimaStormTechnologies].favor,delete d[i.a.IshimaStormTechnologies]),p(y);var f=new o(i.a.NewTokyoDefComm,1.75,1.75,199);f.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.CEO]),m(i.a.NewTokyoDefComm)&&(f.favor=d[i.a.NewTokyoDefComm].favor,delete d[i.a.NewTokyoDefComm]),p(f);var b=new o(i.a.VolhavenHeliosLabs,1.8,1.8,199);b.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.CEO]),m(i.a.VolhavenHeliosLabs)&&(b.favor=d[i.a.VolhavenHeliosLabs].favor,delete d[i.a.VolhavenHeliosLabs]),p(b);var v=new o(i.a.NewTokyoVitaLife,1.8,1.8,199);v.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.NewTokyoVitaLife)&&(v.favor=d[i.a.NewTokyoVitaLife].favor,delete d[i.a.NewTokyoVitaLife]),p(v);var _=new o(i.a.Sector12IcarusMicrosystems,1.9,1.9,199);_.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.Sector12IcarusMicrosystems)&&(_.favor=d[i.a.Sector12IcarusMicrosystems].favor,delete d[i.a.Sector12IcarusMicrosystems]),p(_);var k=new o(i.a.Sector12UniversalEnergy,2,2,199);k.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.Sector12UniversalEnergy)&&(k.favor=d[i.a.Sector12UniversalEnergy].favor,delete d[i.a.Sector12UniversalEnergy]),p(k);var E=new o(i.a.AevumGalacticCybersystems,1.9,1.9,199);E.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.AevumGalacticCybersystems)&&(E.favor=d[i.a.AevumGalacticCybersystems].favor,delete d[i.a.AevumGalacticCybersystems]),p(E);var O=new o(i.a.AevumAeroCorp,1.7,1.7,199);O.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumAeroCorp)&&(O.favor=d[i.a.AevumAeroCorp].favor,delete d[i.a.AevumAeroCorp]),p(O);var C=new o(i.a.VolhavenOmniaCybersystems,1.7,1.7,199);C.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenOmniaCybersystems)&&(C.favor=d[i.a.VolhavenOmniaCybersystems].favor,delete d[i.a.VolhavenOmniaCybersystems]),p(C);var w=new o(i.a.ChongqingSolarisSpaceSystems,1.7,1.7,199);w.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.ChongqingSolarisSpaceSystems)&&(w.favor=d[i.a.ChongqingSolarisSpaceSystems].favor,delete d[i.a.ChongqingSolarisSpaceSystems]),p(w);var S=new o(i.a.Sector12DeltaOne,1.6,1.6,199);S.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12DeltaOne)&&(S.favor=d[i.a.Sector12DeltaOne].favor,delete d[i.a.Sector12DeltaOne]),p(S);var T=new o(i.a.NewTokyoGlobalPharmaceuticals,1.8,1.8,224);T.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.NewTokyoGlobalPharmaceuticals)&&(T.favor=d[i.a.NewTokyoGlobalPharmaceuticals].favor,delete d[i.a.NewTokyoGlobalPharmaceuticals]),p(T);var R=new o(i.a.IshimaNovaMedical,1.75,1.75,199);R.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.IshimaNovaMedical)&&(R.favor=d[i.a.IshimaNovaMedical].favor,delete d[i.a.IshimaNovaMedical]),p(R);var x=new o(i.a.Sector12CIA,2,2,149);x.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12CIA)&&(x.favor=d[i.a.Sector12CIA].favor,delete d[i.a.Sector12CIA]),p(x);var I=new o(i.a.Sector12NSA,2,2,149);I.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12NSA)&&(I.favor=d[i.a.Sector12NSA].favor,delete d[i.a.Sector12NSA]),p(I);var P=new o(i.a.AevumWatchdogSecurity,1.5,1.5,124);P.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.AevumWatchdogSecurity)&&(P.favor=d[i.a.AevumWatchdogSecurity].favor,delete d[i.a.AevumWatchdogSecurity]),p(P);var N=new o(i.a.VolhavenLexoCorp,1.4,1.4,99);N.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.HeadOfSoftware,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.HeadOfSecurity]),m(i.a.VolhavenLexoCorp)&&(N.favor=d[i.a.VolhavenLexoCorp].favor,delete d[i.a.VolhavenLexoCorp]),p(N);var A=new o(i.a.AevumRhoConstruction,1.3,1.3,49);A.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.a.AevumRhoConstruction)&&(A.favor=d[i.a.AevumRhoConstruction].favor,delete d[i.a.AevumRhoConstruction]),p(A);var M=new o(i.a.Sector12AlphaEnterprises,1.5,1.5,99);M.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.a.Sector12AlphaEnterprises)&&(M.favor=d[i.a.Sector12AlphaEnterprises].favor,delete d[i.a.Sector12AlphaEnterprises]),p(M);var L=new o(i.a.AevumPolice,1.3,1.3,99);L.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SecurityGuard,l.PoliceOfficer]),m(i.a.AevumPolice)&&(L.favor=d[i.a.AevumPolice].favor,delete d[i.a.AevumPolice]),p(L);var B=new o(i.a.VolhavenSysCoreSecurities,1.3,1.3,124);B.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.VolhavenSysCoreSecurities)&&(B.favor=d[i.a.VolhavenSysCoreSecurities].favor,delete d[i.a.VolhavenSysCoreSecurities]),p(B);var j=new o(i.a.VolhavenCompuTek,1.2,1.2,74);j.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.VolhavenCompuTek)&&(j.favor=d[i.a.VolhavenCompuTek].favor,delete d[i.a.VolhavenCompuTek]),p(j);var D=new o(i.a.AevumNetLinkTechnologies,1.2,1.2,99);D.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.AevumNetLinkTechnologies)&&(D.favor=d[i.a.AevumNetLinkTechnologies].favor,delete d[i.a.AevumNetLinkTechnologies]),p(D);var F=new o(i.a.Sector12CarmichaelSecurity,1.2,1.2,74);F.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12CarmichaelSecurity)&&(F.favor=d[i.a.Sector12CarmichaelSecurity].favor,delete d[i.a.Sector12CarmichaelSecurity]),p(F);var H=new o(i.a.Sector12FoodNStuff,1,1,0);H.addPositions([l.Employee,l.PartTimeEmployee]),m(i.a.Sector12FoodNStuff)&&(H.favor=d[i.a.Sector12FoodNStuff].favor,delete d[i.a.Sector12FoodNStuff]),p(H);var W=new o(i.a.Sector12JoesGuns,1,1,0);W.addPositions([l.Employee,l.PartTimeEmployee]),m(i.a.Sector12JoesGuns)&&(W.favor=d[i.a.Sector12JoesGuns].favor,delete d[i.a.Sector12JoesGuns]),p(W);var G=new o(i.a.IshimaOmegaSoftware,1.1,1.1,49);G.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.CTO,l.CEO]),m(i.a.IshimaOmegaSoftware)&&(G.favor=d[i.a.IshimaOmegaSoftware].favor,delete d[i.a.IshimaOmegaSoftware]),p(G);var U=new o(i.a.NewTokyoNoodleBar,1,1,0);U.addPositions([l.Waiter,l.PartTimeWaiter]),m(i.a.NewTokyoNoodleBar)&&(U.favor=d[i.a.NewTokyoNoodleBar].favor,delete d[i.a.NewTokyoNoodleBar]),p(U)}let d={};function h(e){d=JSON.parse(e,r.Reviver)}function p(e){var t=e.companyName;d[t]=e}function m(e){return d.hasOwnProperty(e)}function g(e,t,n=!1){var a="",i=e.jobStatReqOffset,r=t.requiredHacking>0?t.requiredHacking+i:0,o=t.requiredStrength>0?t.requiredStrength+i:0,s=t.requiredDefense>0?t.requiredDefense+i:0,l=t.requiredDexterity>0?t.requiredDexterity+i:0,c=t.requiredDexterity>0?t.requiredDexterity+i:0,u=t.requiredCharisma>0?t.requiredCharisma+i:0,d=t.requiredReputation;return n?(a="Requires:
",a+=r.toString()+" hacking
",a+=o.toString()+" strength
",a+=s.toString()+" defense
",a+=l.toString()+" dexterity
",a+=c.toString()+" agility
",a+=u.toString()+" charisma
",a+=d.toString()+" reputation"):(a="(Requires ",r>0&&(a+=r+" 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, "),d>1&&(a+=d+" reputation, "),a=a.substring(0,a.length-2),a+=")"),a}},function(e,t,n){"use strict";n.d(t,"e",function(){return L}),n.d(t,"b",function(){return k}),n.d(t,"f",function(){return C}),n.d(t,"g",function(){return S}),n.d(t,"h",function(){return T}),n.d(t,"c",function(){return R}),n.d(t,"j",function(){return B}),n.d(t,"i",function(){return E}),n.d(t,"a",function(){return _}),n.d(t,"k",function(){return M}),n.d(t,"d",function(){return O});var a=n(18),i=n(16),r=n(1),o=n(6),s=n(86),l=(n(4),n(39)),c=n(0),u=n(22),d=n(8),h=n(97),p=n(27),m=n(3),g=n(10),y=n(14),f=n.n(y),b=n(2),v=n(15);function _(e=""){this.name=e,this.augmentations=[],this.isMember=!1,this.isBanned=!1,this.playerReputation=0,this.alreadyInvited=!1,this.favor=0,this.rolloverRep=0}_.prototype.getInfo=function(){const e=s.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},_.prototype.gainFavor=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);var e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.log("Error: invalid result from getFavorGain() function")},_.prototype.getFavorGain=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);for(var e=0,t=this.playerReputation+this.rolloverRep,n=r.a.FactionReputationToFavorBase*Math.pow(r.a.FactionReputationToFavorMult,this.favor);t>0&&t>=n;)++e,t-=n,n*=r.a.FactionReputationToFavorMult;return[e,t]},_.prototype.addAllAugmentations=function(){for(var e in this.augmentations.length=0,a.c)a.c.hasOwnProperty(e)&&this.augmentations.push(e)},_.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Faction",this)},_.fromJSON=function(e){return Object(g.Generic_fromJSON)(_,e.data)},g.Reviver.constructors.Faction=_;let k={};function E(e){k=JSON.parse(e,g.Reviver)}function O(e){return k.hasOwnProperty(e)}function C(){for(const e in s.FactionInfos)w(new _(e))}function w(e){if(!(e instanceof _))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");var t,n,a=e.name;O(a)&&(e.favor=k[a].favor,delete k[a]),n=(t=e).name,k[n]=t}function S(e){u.a.SuppressFactionInvites?(e.alreadyInvited=!0,c.a.factionInvitations.push(e.name),o.Engine.currentPage===o.Engine.Page.Factions&&o.Engine.loadFactionsContent()):Object(h.a)(e)}function T(e){e.isMember=!0,c.a.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];k[n].isBanned=!0}}function R(e){var t=k[e];if(null==t)throw new Error("Invalid factionName passed into displayFactionContent: "+e);var n=t.getInfo();Object(p.removeChildrenFromElement)(o.Engine.Display.factionContent);var a=[];a.push(Object(m.createElement)("h1",{innerText:e})),a.push(Object(m.createElement)("pre",{innerHTML:""+n.infoText+""})),a.push(Object(m.createElement)("p",{innerText:"---------------"}));var s=t.getFavorGain();2!=s.length&&(s=0),s=s[0],a.push(Object(m.createElement)("p",{innerText:"Reputation: "+Object(b.formatNumber)(t.playerReputation,4),tooltip:"You will earn "+Object(b.formatNumber)(s,0)+" faction favor upon resetting after installing an Augmentation"})),a.push(Object(m.createElement)("p",{innerText:"---------------"})),a.push(Object(m.createElement)("p",{innerText:"Faction Favor: "+Object(b.formatNumber)(t.favor,0),tooltip:"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the faction"})),a.push(Object(m.createElement)("p",{innerText:"---------------"})),a.push(Object(m.createElement)("pre",{id:"faction-work-description-text",innerText:"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. Note that you cannot use your terminal or create scripts when you are performing a task!"})),a.push(Object(m.createElement)("br"));var u=Object(m.createElement)("div",{id:"faction-hack-mission-div",class:"faction-work-div"}),h=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});u.appendChild(h),h.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Hacking Mission",clickListener:()=>{o.Engine.loadMissionContent();var e=new l.a(t.playerReputation,t);return Object(l.d)(!0,e),e.init(),!1}})),h.appendChild(Object(m.createElement)("p",{innerText:"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+)"})),a.push(u);var g=Object(m.createElement)("div",{id:"faction-hack-div",class:"faction-work-div"}),y=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});g.appendChild(y),y.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Hacking Contracts",clickListener:()=>(c.a.startFactionHackWork(t),!1)})),y.appendChild(Object(m.createElement)("p",{innerText:"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."})),a.push(g);var _=Object(m.createElement)("div",{id:"faction-fieldwork-div",class:"faction-work-div"}),E=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});_.appendChild(E),E.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Field Work",clickListener:()=>(c.a.startFactionFieldWork(t),!1)})),E.appendChild(Object(m.createElement)("p",{innerText:"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."})),a.push(_);var O=Object(m.createElement)("div",{id:"faction-securitywork-div",class:"faction-work-div"}),C=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});O.appendChild(C),C.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Security Work",clickListener:()=>(c.a.startFactionSecurityWork(t),!1)})),C.appendChild(Object(m.createElement)("p",{innerText:"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."})),a.push(O);var w=Object(m.createElement)("div",{id:"faction-donate-div",class:"faction-work-div"}),S=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});w.appendChild(S);var T=Object(m.createElement)("p",{innerText:"This donation will result in 0.000 reputation gain"}),x=Object(m.createElement)("input",{placeholder:"Donation amount",inputListener:()=>{let e=0;if(""!==x.value&&(e=parseFloat(x.value)),isNaN(e))T.innerText="Invalid donate amount entered!";else{var t=e/1e6*c.a.faction_rep_mult;T.innerText="This donation will result in "+Object(b.formatNumber)(t,3)+" reputation gain"}}});if(S.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Donate Money",clickListener:()=>{var n=parseFloat(x.value);if(isNaN(n)||n<0)Object(d.dialogBoxCreate)("Invalid amount entered!");else if(c.a.money.lt(n))Object(d.dialogBoxCreate)("You cannot afford to donate this much money!");else{c.a.loseMoney(n);var a=n/1e6*c.a.faction_rep_mult;t.playerReputation+=a,Object(d.dialogBoxCreate)("You just donated "+f()(n).format("$0.000a")+" to "+t.name+" to gain "+Object(b.formatNumber)(a,3)+" reputation"),R(e)}}})),S.appendChild(x),S.appendChild(T),a.push(w),a.push(Object(m.createElement)("pre",{innerHTML:"
As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.

"})),a.push(Object(m.createElement)("a",{class:"a-link-button",innerText:"Purchase Augmentations",clickListener:()=>(o.Engine.hideAllContent(),o.Engine.Display.factionAugmentationsContent.style.display="block",I(e),!1)})),2!=c.a.bitNodeN||"Slum Snakes"!=e&&"Tetrads"!=e&&"The Syndicate"!=e&&"The Dark Army"!=e&&"Speakers for the Dead"!=e&&"NiteSec"!=e&&"The Black Hand"!=e){if(!t.isMember)throw new Error("Not a member of this faction, cannot display faction information");w.style.display=t.favor>=Math.floor(r.a.BaseFavorToDonate*i.a.RepToDonateToFaction)?"inline":"none",u.style.display=n.offerHackingMission?"inline":"none",g.style.display=n.offerHackingWork?"inline":"none",_.style.display=n.offerFieldWork?"inline":"none",O.style.display=n.offerSecurityWork?"inline":"none";for(A=0;A{if(c.a.inGang())o.Engine.loadGangContent();else{var t=Object(v.d)(),n=Object(v.c)();t.innerHTML="Create Gang",n.innerHTML="Cancel",t.addEventListener("click",()=>{var t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0),c.a.startGang(e,t),document.getElementById("gang-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),o.Engine.loadGangContent(),Object(v.a)()}),n.addEventListener("click",()=>{Object(v.a)()}),Object(v.b)("Would you like to create a new Gang with "+e+"?

Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. There are NO differences between the Factions you can create a Gang with and each of these Factions have all Augmentations available")}}})),N.appendChild(Object(m.createElement)("p",{innerText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation."})),a.splice(7,1,P),c.a.inGang()&&c.a.gang.facName!=e&&(P.style.display="none");for(var A=0;A(o.Engine.loadFactionContent(),R(e),!1)})),n.push(Object(m.createElement)("h1",{innerText:"Faction Augmentations"})),n.push(Object(m.createElement)("p",{id:"faction-augmentations-page-desc",innerHTML:"Lists all Augmentations that are available to purchase from "+e+"

Augmentations are powerful upgrades that will enhance your abilities."})),n.push(Object(m.createElement)("br")),n.push(Object(m.createElement)("br"));var i=Object(m.createElement)("ul"),r=Object(m.createElement)("a",{innerText:"Sort by Cost",class:"a-link-button",clickListener:()=>{x="cost";var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.c[e],i=a.c[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseCost-i.baseCost}),Object(p.removeChildrenFromElement)(i),P(i,e,t)}}),s=Object(m.createElement)("a",{innerText:"Sort by Reputation",class:"a-link-button",clickListener:()=>{x="reputation";var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.c[e],i=a.c[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-i.baseRepRequirement}),Object(p.removeChildrenFromElement)(i),P(i,e,t)}}),l=Object(m.createElement)("a",{innerText:"Sort by Default Order",class:"a-link-button",clickListener:()=>{x="default",Object(p.removeChildrenFromElement)(i),P(i,t.augmentations,t)}});switch(n.push(r),n.push(s),n.push(l),x){case"cost":r.click();break;case"reputation":s.click();break;default:l.click()}n.push(i);for(var c=0;c(u.a.SuppressBuyAugmentationConfirmation?M(o,n):N(o,n),!1)});o.name==a.b.NeuroFluxGovernor&&(g.innerText+=" - Level "+L());var y=Object(m.createElement)("p",{display:"inline"}),v=o.baseRepRequirement*i.augmentationRepRequirementMult;A(o)?o.name!=a.b.NeuroFluxGovernor&&(o.owned||s)?(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="ALREADY OWNED"):n.playerReputation>=v?(g.setAttribute("class","a-link-button"),y.innerHTML="UNLOCKED - "+f()(o.baseCost*i.augmentationPriceMult).format("$0.000a")):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+Object(b.formatNumber)(v,1)+" faction reputation) - "+f()(o.baseCost*i.augmentationPriceMult).format("$0.000a"),y.style.color="red"):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+o.prereqs.join(",")+" as prerequisite(s))",y.style.color="red"),p.appendChild(g),h.appendChild(p),h.appendChild(y),d.appendChild(h),e.appendChild(d)}()}function N(e,t){const n=t.getInfo();var a=Object(v.d)(),i=Object(v.c)();a.innerHTML="Purchase",i.innerHTML="Cancel",a.addEventListener("click",function(){M(e,t)}),i.addEventListener("click",function(){Object(v.a)()}),Object(v.b)("

"+e.name+"


"+e.info+"


Would you like to purchase the "+e.name+" Augmentation for $"+Object(b.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function A(e){var t=!0;if(e.prereqs&&e.prereqs.length>0)for(var n=0;n
This is the first BitNode that you play through. It has no special modifications or mechanics.

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:

Level 1: 16%
Level 2: 24%
Level 3: 28%"),r.BitNode2=new i(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.

Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050's. 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.

In this BitNode:

The maximum amount of money available on a server is significantly decreased
The amount of money gained from crimes and Infiltration is tripled
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
Every Augmentation in the game will be available through the Factions listed above
For every Faction NOT listed above, reputation gains are halved
You will no longer gain passive reputation with Factions

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 increases the player's crime success rate, crime money, and charisma multipliers by:

Level 1: 20%
Level 2: 30%
Level 3: 35%"),r.BitNode3=new i(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.

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.

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:

The price and reputation cost of all Augmentations is tripled
The starting and maximum amount of money on servers is reduced by 75%
Server growth rate is reduced by 80%
You will start out with $150b so that you can start your corporation
You now only need 75 favour with a faction in order to donate to it, rather than 150

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:
Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode4=new i(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.

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.

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.

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."),r.BitNode5=new i(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.

In this BitNode:

The base security level of servers is doubled
The starting money on servers is halved, but the maximum money remains the same
Most methods of earning money now give significantly less
Infiltration gives 50% more reputation and money
Corporations have 50% lower valuations and are therefore less profitable
Augmentations are more expensive
Hacking experience gain rates are reduced

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.

In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will also raise all of your hacking-related multipliers by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode6=new i(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.

In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:

Hacking and Hacknet Nodes will be significantly less profitable
Your hacking level is reduced by 50%
Hacking experience gain from scripts is reduced by 75%
Corporations have 80% lower valuations and are therefore less profitable
Working for companies is 50% less profitable
Crimes and Infiltration are 50% less profitable

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:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode7=new i(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.

In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore:

The rank you gain from Bladeburner contracts/operations is reduced by 40%
Bladeburner skills cost twice as many skill points
Augmentations are 3x more expensive
Hacking and Hacknet Nodes will be significantly less profitable
Your hacking level is reduced by 50%
Hacking experience gain from scripts is reduced by 75%
Corporations have 80% lower valuations and are therefore less profitable
Working for companies is 50% less profitable
Crimes and Infiltration are 50% less profitable

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:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode8=new i(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.

In this BitNode:

You start with $100 million
The only way to earn money is by trading on the stock market
You start with a WSE membership and access to the TIX API
You are able to short stocks and place different types of orders (limit/stop)
You can immediately donate to factions to gain reputation

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:

Level 1: Permanent access to WSE and TIX API
Level 2: Ability to short stocks in other BitNodes
Level 3: Ability to use limit/stop orders in other BitNodes

This Source-File also increases your hacking growth multipliers by:
Level 1: 12%
Level 2: 18%
Level 3: 21%"),r.BitNode9=new i(9,"Do Androids Dream?","COMING SOON"),r.BitNode10=new i(10,"MegaCorp","COMING SOON"),r.BitNode11=new i(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.

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.

In this BitNode:

The starting and maximum amount of money available on servers is significantly decreased
The growth rate of servers is halved
Weakening a server is twice as effective
Company wages are decreased by 50%
Corporation valuations are 99% lower and are therefore significantly less profitable
Hacknet Node production is significantly decreased
Crime and Infiltration are more lucrative
Augmentations are twice as expensive

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:

Level 1: 24%
Level 2: 36%
Level 3: 42%"),r.BitNode12=new i(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.

Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give your Souce-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 will increase all of your multipliers by 1%. This effect is multiplicative with itself. In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)"),r.BitNode13=new i(13,"fOS","COMING SOON"),r.BitNode14=new i(14,"","COMING SOON"),r.BitNode15=new i(15,"","COMING SOON"),r.BitNode16=new i(16,"","COMING SOON"),r.BitNode17=new i(17,"","COMING SOON"),r.BitNode18=new i(18,"","COMING SOON"),r.BitNode19=new i(19,"","COMING SOON"),r.BitNode20=new i(20,"","COMING SOON"),r.BitNode21=new i(21,"","COMING SOON"),r.BitNode22=new i(22,"","COMING SOON"),r.BitNode23=new i(23,"","COMING SOON"),r.BitNode24=new i(24,"","COMING SOON")}let s={HackingLevelMultiplier:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerGrowthRate:1,ServerWeakenRate:1,ServerStartingSecurity:1,ManualHackMoney:1,ScriptHackMoney:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,CompanyWorkExpGain:1,ClassGymExpGain:1,FactionWorkExpGain:1,HackExpGain:1,CrimeExpGain:1,FactionWorkRepGain:1,FactionPassiveRepGain:1,RepToDonateToFaction:1,AugmentationRepCost:1,AugmentationMoneyCost:1,InfiltrationMoney:1,InfiltrationRep:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1};function l(){for(var e in null==a.a.bitNodeN&&(a.a.bitNodeN=1),s)s.hasOwnProperty(e)&&(s[e]=1);switch(a.a.bitNodeN){case 1:break;case 2:s.ServerMaxMoney=.2,s.ServerStartingMoney=.4,s.CrimeMoney=3,s.InfiltrationMoney=3,s.FactionWorkRepGain=.5,s.FactionPassiveRepGain=0;break;case 3:s.RepToDonateToFaction=.5,s.AugmentationRepCost=3,s.AugmentationMoneyCost=3,s.ServerMaxMoney=.2,s.ServerStartingMoney=.2,s.ServerGrowthRate=.2,s.ScriptHackMoney=.2,s.CompanyWorkMoney=.25,s.CrimeMoney=.25,s.HacknetNodeMoney=.25;break;case 4:s.ServerMaxMoney=.15,s.ServerStartingMoney=.75,s.ScriptHackMoney=.2,s.CompanyWorkMoney=.1,s.CrimeMoney=.2,s.HacknetNodeMoney=.05,s.CompanyWorkExpGain=.5,s.ClassGymExpGain=.5,s.FactionWorkExpGain=.5,s.HackExpGain=.4,s.CrimeExpGain=.5,s.FactionWorkRepGain=.75;break;case 5:s.ServerMaxMoney=2,s.ServerStartingSecurity=2,s.ServerStartingMoney=.5,s.ScriptHackMoney=.15,s.HacknetNodeMoney=.2,s.CrimeMoney=.5,s.InfiltrationRep=1.5,s.InfiltrationMoney=1.5,s.AugmentationMoneyCost=2,s.HackExpGain=.5,s.CorporationValuation=.5;break;case 6:s.HackingLevelMultiplier=.5,s.ServerMaxMoney=.5,s.ServerStartingMoney=.5,s.ServerStartingSecurity=1.5,s.ScriptHackMoney=.5,s.CompanyWorkMoney=.5,s.CrimeMoney=.5,s.InfiltrationMoney=.5,s.CorporationValuation=.2,s.HacknetNodeMoney=.2,s.FactionPassiveRepGain=0,s.HackExpGain=.25;break;case 7:s.BladeburnerRank=.6,s.BladeburnerSkillCost=2,s.AugmentationMoneyCost=3,s.HackingLevelMultiplier=.5,s.ServerMaxMoney=.5,s.ServerStartingMoney=.5,s.ServerStartingSecurity=1.5,s.ScriptHackMoney=.5,s.CompanyWorkMoney=.5,s.CrimeMoney=.5,s.InfiltrationMoney=.5,s.CorporationValuation=.2,s.HacknetNodeMoney=.2,s.FactionPassiveRepGain=0,s.HackExpGain=.25;break;case 8:s.ScriptHackMoney=0,s.ManualHackMoney=0,s.CompanyWorkMoney=0,s.CrimeMoney=0,s.HacknetNodeMoney=0,s.InfiltrationMoney=0,s.RepToDonateToFaction=0,s.CorporationValuation=0;break;case 11:s.ServerMaxMoney=.1,s.ServerStartingMoney=.1,s.ServerGrowthRate=.5,s.ServerWeakenRate=2,s.CrimeMoney=3,s.CompanyWorkMoney=.5,s.HacknetNodeMoney=.1,s.AugmentationMoneyCost=2,s.InfiltrationMoney=2.5,s.InfiltrationRep=2.5,s.CorporationValuation=.01;break;case 12:for(var t=0,n=0;n
This augmentation increases all of the player's combat stats by 8%."});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),I(C.HemoRecirculator)&&delete E[C.HemoRecirculator],O(t);var n=new k({name:C.Targeting1,moneyCost:3e6,repCost:2e3,info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies.

This augmentation increases the player's dexterity by 10%."});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.Targeting1)&&delete E[C.Targeting1],O(n);var r=new k({name:C.Targeting2,moneyCost:85e5,repCost:3500,info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 20%.",prereqs:[C.Targeting1]});r.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.Targeting2)&&delete E[C.Targeting2],O(r);var s=new k({name:C.Targeting3,moneyCost:23e6,repCost:11e3,info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 30%.",prereqs:[C.Targeting2]});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),I(C.Targeting3)&&delete E[C.Targeting3],O(s);var l=new k({name:C.SyntheticHeart,moneyCost:575e6,repCost:3e5,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood at much higher efficiencies than a normal human heart.

This augmentation increases the player's agility and strength by 50%."});l.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),I(C.SyntheticHeart)&&delete E[C.SyntheticHeart],O(l);var u=new k({name:C.SynfibrilMuscle,repCost:175e3,moneyCost:225e6,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'.

This augmentation increases the player's strength and defense by 30%."});u.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),I(C.SynfibrilMuscle)&&delete E[C.SynfibrilMuscle],O(u);var d=new k({name:C.CombatRib1,repCost:3e3,moneyCost:475e4,info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.

This augmentation increases the player's strength and defense by 10%."});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.CombatRib1)&&delete E[C.CombatRib1],O(d);var h=new k({name:C.CombatRib2,repCost:7500,moneyCost:13e6,info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.

This augmentation increases the player's strength and defense by 14%.",prereqs:[C.CombatRib1]});h.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.CombatRib2)&&delete E[C.CombatRib2],O(h);var p=new k({name:C.CombatRib3,repCost:14e3,moneyCost:24e6,info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream

.This augmentation increases the player's strength and defense by 18%.",prereqs:[C.CombatRib2]});p.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),I(C.CombatRib3)&&delete E[C.CombatRib3],O(p);var m=new k({name:C.NanofiberWeave,repCost:15e3,moneyCost:25e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.

This augmentation increases the player's strength and defense by 20%."});m.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),I(C.NanofiberWeave)&&delete E[C.NanofiberWeave],O(m);var g=new k({name:C.SubdermalArmor,repCost:35e4,moneyCost:65e7,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-related or electrical traumas.

This augmentation increases the player's defense by 120%."});g.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),I(C.SubdermalArmor)&&delete E[C.SubdermalArmor],O(g);var y=new k({name:C.WiredReflexes,repCost:500,moneyCost:5e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the body's ability to send signals through neurons. This results in increased reflex speed.

This augmentation increases the player's agility and dexterity by 5%."});y.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),I(C.WiredReflexes)&&delete E[C.WiredReflexes],O(y);var b=new k({name:C.GrapheneBoneLacings,repCost:45e4,moneyCost:85e7,info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing their density and tensile strength.

This augmentation increases the player's strength and defense by 70%."});b.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),I(C.GrapheneBoneLacings)&&delete E[C.GrapheneBoneLacings],O(b);var v=new k({name:C.BionicSpine,repCost:18e3,moneyCost:25e6,info:"An artificial spine created from plasteel and carbon fibers that completely replaces the organic spine. Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in greatly improved senses and reaction speeds.

This augmentation increases all of the player's combat stats by 15%."});v.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),I(C.BionicSpine)&&delete E[C.BionicSpine],O(v);var _=new k({name:C.GrapheneBionicSpine,repCost:65e4,moneyCost:12e8,info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases all of the player's combat stats by 60%.",prereqs:[C.BionicSpine]});_.addToFactions(["Fulcrum Secret Technologies","ECorp"]),I(C.GrapheneBionicSpine)&&delete E[C.GrapheneBionicSpine],O(_);var w=new k({name:C.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.

This augmentation increases the player's agility by 60%."});w.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),I(C.BionicLegs)&&delete E[C.BionicLegs],O(w);var T=new k({name:C.GrapheneBionicLegs,repCost:3e5,moneyCost:9e8,info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases the player's agility by 150%.",prereqs:[C.BionicLegs]});T.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),I(C.GrapheneBionicLegs)&&delete E[C.GrapheneBionicLegs],O(T);var R=new k({name:C.SpeechProcessor,repCost:3e3,moneyCost:1e7,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.

This augmentation increases the player's charisma by 20%."});R.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),I(C.SpeechProcessor)&&delete E[C.SpeechProcessor],O(R);let x=new k({name:C.TITN41Injection,repCost:1e4,moneyCost:38e6,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.

This augmentation increases the player's charisma and charisma experience gain rate by 15%."});x.addToFactions(["Silhouette"]),I(C.TITN41Injection)&&delete E[C.TITN41Injection],O(x);var P=new k({name:C.EnhancedSocialInteractionImplant,repCost:15e4,moneyCost:275e6,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 expression, body language, and the voice's tone/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.

This augmentation increases the player's charisma and charisma experience gain rate by 60%."});P.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),I(C.EnhancedSocialInteractionImplant)&&delete E[C.EnhancedSocialInteractionImplant],O(P);var N=new k({name:C.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.

This augmentation increases the player's hacking skill by 5%."});N.addToFactions(["CyberSec","NiteSec"]),I(C.BitWire)&&delete E[C.BitWire],O(N);var A=new k({name:C.ArtificialBioNeuralNetwork,repCost:11e4,moneyCost:6e8,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimick the way a biological brain solves a problem, which 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 its user to solve much more complex problems at a much faster rate.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player's gains from hacking by 15%.
Increases the player's hacking skill by 12%."});A.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),I(C.ArtificialBioNeuralNetwork)&&delete E[C.ArtificialBioNeuralNetwork],O(A);var M=new k({name:C.ArtificialSynapticPotentiation,repCost:2500,moneyCost:16e6,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.

This augmentation:
Increases the player's hacking speed by 2%
Increases the player's hacking chance by 5%.
Increases the player's hacking experience gain rate by 5%."});M.addToFactions(["The Black Hand","NiteSec"]),I(C.ArtificialSynapticPotentiation)&&delete E[C.ArtificialSynapticPotentiation],O(M);var L=new k({name:C.EnhancedMyelinSheathing,repCost:4e4,moneyCost:275e6,info:"Electrical signals are used to induce a new, artificial form of myelinogensis 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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the player's hacking skill by 8%.
Increases the player's hacking experience gain rate by 10%."});L.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),I(C.EnhancedMyelinSheathing)&&delete E[C.EnhancedMyelinSheathing],O(L);var B=new k({name:C.SynapticEnhancement,repCost:800,moneyCost:15e5,info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.

This augmentation increases the player's hacking speed by 3%."});B.addToFactions(["CyberSec"]),I(C.SynapticEnhancement)&&delete E[C.SynapticEnhancement],O(B);var j=new k({name:C.NeuralRetentionEnhancement,repCost:8e3,moneyCost:5e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening its ability to retain information.

This augmentation increases the player's hacking experience gain rate by 25%."});j.addToFactions(["NiteSec"]),I(C.NeuralRetentionEnhancement)&&delete E[C.NeuralRetentionEnhancement],O(j);var D=new k({name:C.DataJack,repCost:45e3,moneyCost:9e7,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.

This augmentation increases the amount of money the player gains from hacking by 25%."});D.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),I(C.DataJack)&&delete E[C.DataJack],O(D);var F=new k({name:C.ENM,repCost:6e3,moneyCost:5e7,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.

This augmentation increases the player's hacking skill by 8%."});F.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),I(C.ENM)&&delete E[C.ENM],O(F);var H=new k({name:C.ENMCore,repCost:1e5,moneyCost:5e8,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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%.
Increases the player's chance of successfully performing a hack by 3%.
Increases the player's hacking experience gain rate by 7%.
Increases the player's hacking skill by 7%.",prereqs:[C.ENM]});H.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),I(C.ENMCore)&&delete E[C.ENMCore],O(H);var W=new k({name:C.ENMCoreV2,repCost:4e5,moneyCost:9e8,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 the information on a network by re-routing traffic, spoofing IP addresses, or altering the data inside network packets.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 30%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking experience gain rate by 15%.
Increases the player's hacking skill by 8%.",prereqs:[C.ENMCore]});W.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),I(C.ENMCoreV2)&&delete E[C.ENMCoreV2],O(W);var G=new k({name:C.ENMCoreV3,repCost:7e5,moneyCost:15e8,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.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 25%.
Increases the player's hacking skill by 10%.",prereqs:[C.ENMCoreV2]});G.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMCoreV3)&&delete E[C.ENMCoreV3],O(G);var U=new k({name:C.ENMAnalyzeEngine,repCost:25e4,moneyCost:12e8,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.

This augmentation increases the player's hacking speed by 10%.",prereqs:[C.ENM]});U.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMAnalyzeEngine)&&delete E[C.ENMAnalyzeEngine],O(U);var q=new k({name:C.ENMDMA,repCost:4e5,moneyCost:14e8,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.

This augmentation:
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 20%.",prereqs:[C.ENM]});q.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMDMA)&&delete E[C.ENMDMA],O(q);var K=new k({name:C.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 12%."});K.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),I(C.Neuralstimulator)&&delete E[C.Neuralstimulator],O(K);var V=new k({name:C.NeuralAccelerator,repCost:8e4,moneyCost:35e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.

This augmentation:
Increases the player's hacking skill by 10%.
Increases the player's hacking experience gain rate by 15%.
Increases the amount of money the player gains from hacking by 20%."});V.addToFactions(["BitRunners"]),I(C.NeuralAccelerator)&&delete E[C.NeuralAccelerator],O(V);var Y=new k({name:C.CranialSignalProcessorsG1,repCost:4e3,moneyCost:14e6,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.

This augmentation:
Increases the player's hacking speed by 1%.
Increases the player's hacking skill by 5%."});Y.addToFactions(["CyberSec"]),I(C.CranialSignalProcessorsG1)&&delete E[C.CranialSignalProcessorsG1],O(Y);var z=new k({name:C.CranialSignalProcessorsG2,repCost:7500,moneyCost:25e6,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking skill by 7%.",prereqs:[C.CranialSignalProcessorsG1]});z.addToFactions(["CyberSec","NiteSec"]),I(C.CranialSignalProcessorsG2)&&delete E[C.CranialSignalProcessorsG2],O(z);var J=new k({name:C.CranialSignalProcessorsG3,repCost:2e4,moneyCost:11e7,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 15%.
Increases the player's hacking skill by 9%.",prereqs:[C.CranialSignalProcessorsG2]});J.addToFactions(["NiteSec","The Black Hand","BitRunners"]),I(C.CranialSignalProcessorsG3)&&delete E[C.CranialSignalProcessorsG3],O(J);var $=new k({name:C.CranialSignalProcessorsG4,repCost:5e4,moneyCost:22e7,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 20%.
Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[C.CranialSignalProcessorsG3]});$.addToFactions(["The Black Hand","BitRunners"]),I(C.CranialSignalProcessorsG4)&&delete E[C.CranialSignalProcessorsG4],O($);var X=new k({name:C.CranialSignalProcessorsG5,repCost:1e5,moneyCost:45e7,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.

This augmentation:
Increases the player's hacking skill by 30%.
Increases the amount of money the player gains from hacking by 25%.
Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[C.CranialSignalProcessorsG4]});X.addToFactions(["BitRunners"]),I(C.CranialSignalProcessorsG5)&&delete E[C.CranialSignalProcessorsG5],O(X);var Q=new k({name:C.NeuronalDensification,repCost:75e3,moneyCost:275e6,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.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 10%.
Increases the player's hacking speed by 3%."});Q.addToFactions(["Clarke Incorporated"]),I(C.NeuronalDensification)&&delete E[C.NeuronalDensification],O(Q);var Z=new k({name:C.NuoptimalInjectorImplant,repCost:2e3,moneyCost:4e6,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.

This augmentation increases the amount of reputation the player gains when working for a company by 20%."});Z.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Ishima","Clarke Incorporated","Four Sigma","Bachman & Associates"]),I(C.NuoptimalInjectorImplant)&&delete E[C.NuoptimalInjectorImplant],O(Z);var ee=new k({name:C.SpeechEnhancement,repCost:1e3,moneyCost:25e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.

This augmentation:
Increases the player's charisma by 10%.
Increases the amount of reputation the player gains when working for a company by 10%."});ee.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Four Sigma","Bachman & Associates"]),I(C.SpeechEnhancement)&&delete E[C.SpeechEnhancement],O(ee);var te=new k({name:C.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.

This augmentation:
Increases all experience gains by 5%.
Increases the amount of money the player gains from working by 20%.
Increases the amount of reputation the player gains when working for a company by 10%."});te.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),I(C.FocusWire)&&delete E[C.FocusWire],O(te);var ne=new k({name:C.PCDNI,repCost:15e4,moneyCost:75e7,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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 30%.
Increases the player's hacking skill by 8%."});ne.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),I(C.PCDNI)&&delete E[C.PCDNI],O(ne);var ae=new k({name:C.PCDNIOptimizer,repCost:2e5,moneyCost:9e8,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 the connected computer.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 75%.
Increases the player's hacking skill by 10%.",prereqs:[C.PCDNI]});ae.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),I(C.PCDNIOptimizer)&&delete E[C.PCDNIOptimizer],O(ae);var ie=new k({name:C.PCDNINeuralNetwork,repCost:6e5,moneyCost:15e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The NeuroNet Injector upgrade allows the user to use his/her own brain's processing power to aid the computer in computational tasks.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 100%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 5%.",prereqs:[C.PCDNI]});ie.addToFactions(["Fulcrum Secret Technologies"]),I(C.PCDNINeuralNetwork)&&delete E[C.PCDNINeuralNetwork],O(ie);var re=new k({name:C.ADRPheromone1,repCost:1500,moneyCost:35e5,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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 10%
Increases the amount of reputation the player gains for a faction by 10%."});re.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),I(C.ADRPheromone1)&&delete E[C.ADRPheromone1],O(re);var oe=new k({name:C.ADRPheromone2,repCost:25e3,moneyCost:11e7,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.

This augmentation:
Increases the amount of reputation the player gains for a faction and company by 20%."});oe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),I(C.ADRPheromone2)&&delete E[C.ADRPheromone2],O(oe);var se=new k({name:C.HacknetNodeCPUUpload,repCost:1500,moneyCost:22e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 15%.
Decreases the cost of purchasing a Hacknet Node by 15%."});se.addToFactions(["Netburners"]),I(C.HacknetNodeCPUUpload)&&delete E[C.HacknetNodeCPUUpload],O(se);var le=new k({name:C.HacknetNodeCacheUpload,repCost:1e3,moneyCost:11e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of leveling up a Hacknet Node by 15%."});le.addToFactions(["Netburners"]),I(C.HacknetNodeCacheUpload)&&delete E[C.HacknetNodeCacheUpload],O(le);var ce=new k({name:C.HacknetNodeNICUpload,repCost:750,moneyCost:9e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of purchasing a Hacknet Node by 10%."});ce.addToFactions(["Netburners"]),I(C.HacknetNodeNICUpload)&&delete E[C.HacknetNodeNICUpload],O(ce);var ue=new k({name:C.HacknetNodeKernelDNI,repCost:3e3,moneyCost:8e6,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 the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 25%."});ue.addToFactions(["Netburners"]),I(C.HacknetNodeKernelDNI)&&delete E[C.HacknetNodeKernelDNI],O(ue);var de=new k({name:C.HacknetNodeCoreDNI,repCost:5e3,moneyCost:12e6,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 the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 45%."});de.addToFactions(["Netburners"]),I(C.HacknetNodeCoreDNI)&&delete E[C.HacknetNodeCoreDNI],O(de);var he=new k({name:C.NeuroFluxGovernor,repCost:500,moneyCost:75e4,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.

This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation increases ALL of the player's multipliers by 1%."}),pe=Object(o.e)();he.level=pe-1,ct=Math.pow(i.a.NeuroFluxGovernorLevelMult,he.level),he.baseRepRequirement=500*ct*i.a.AugmentationRepMultiplier*a.a.AugmentationRepCost,he.baseCost=75e4*ct*i.a.AugmentationCostMultiplier*a.a.AugmentationMoneyCost,I(C.NeuroFluxGovernor)&&delete E[C.NeuroFluxGovernor],he.addToAllFactions(),O(he);var me=new k({name:C.Neurotrainer1,repCost:400,moneyCost:8e5,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.

This augmentation increases the player's experience gain rate for all stats by 10%."});me.addToFactions(["CyberSec"]),I(C.Neurotrainer1)&&delete E[C.Neurotrainer1],O(me);var ge=new k({name:C.Neurotrainer2,repCost:4e3,moneyCost:9e6,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.

This augmentation increases the player's experience gain rate for all stats by 15%."});ge.addToFactions(["BitRunners","NiteSec"]),I(C.Neurotrainer2)&&delete E[C.Neurotrainer2],O(ge);var ye=new k({name:C.Neurotrainer3,repCost:1e4,moneyCost:26e6,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.

This augmentation increases the player's experience gain rate for all stats by 20%."});ye.addToFactions(["NWO","Four Sigma"]),I(C.Neurotrainer3)&&delete E[C.Neurotrainer3],O(ye);var fe=new k({name:C.Hypersight,repCost:6e4,moneyCost:55e7,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 wells, thus providing 'x-ray vision'-like capabilities.

This augmentation:
Increases the player's dexterity by 40%.
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%."});fe.addToFactions(["Blade Industries","KuaiGong International"]),I(C.Hypersight)&&delete E[C.Hypersight],O(fe);var be=new k({name:C.LuminCloaking1,repCost:600,moneyCost:1e6,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 from the naked eye.

This augmentation:
Increases the player's agility by 5%
Increases the amount of money the player gains from crimes by 10%."});be.addToFactions(["Slum Snakes","Tetrads"]),I(C.LuminCloaking1)&&delete E[C.LuminCloaking1],O(be);var ve=new k({name:C.LuminCloaking2,repCost:2e3,moneyCost:6e6,info:"This is a more advanced version of the LuminCloaking-V2 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.

This augmentation:
Increases the player's agility by 10%
Increases the player's defense by 10%
Increases the amount of money the player gains from crimes by 25%.",prereqs:[C.LuminCloaking1]});ve.addToFactions(["Slum Snakes","Tetrads"]),I(C.LuminCloaking2)&&delete E[C.LuminCloaking2],O(ve);var _e=new k({name:C.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.

This augmentation:
Increases the player's dexterity by 10%.
Increases the player's dexterity experience gain rate by 15%.
Increases the amount of money the player gains from crimes by 25%."});_e.addToFactions(["Slum Snakes"]),I(C.SmartSonar)&&delete E[C.SmartSonar],O(_e);var ke=new k({name:C.PowerRecirculator,repCost:1e4,moneyCost:36e6,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.

This augmentation:
Increases all of the player's stats by 5%.
Increases the player's experience gain rate for all stats by 10%."});ke.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),I(C.PowerRecirculator)&&delete E[C.PowerRecirculator],O(ke);var Ee=new k({name:C.QLink,repCost:75e4,moneyCost:13e8,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.

This augmentation:
Increases the player's hacking speed by 10%.
Increases the player's chance of successfully performing a hack by 30%.
Increases the amount of money the player gains from hacking by 100%."});Ee.addToFactions(["Illuminati"]),I(C.QLink)&&delete E[C.QLink],O(Ee);var Oe=new k({name:C.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Oe.addToFactions(["Daedalus"]),I(C.TheRedPill)&&delete E[C.TheRedPill],O(Oe);var Ce=new k({name:C.SPTN97,repCost:5e5,moneyCost:975e6,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.

This augmentation:
Increases all of the player's combat stats by 75%.
Increases the player's hacking skill by 15%."});Ce.addToFactions(["The Covenant"]),I(C.SPTN97)&&delete E[C.SPTN97],O(Ce);var we=new k({name:C.HiveMind,repCost:6e5,moneyCost:11e8,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."});we.addToFactions(["ECorp"]),I(C.HiveMind)&&delete E[C.HiveMind],O(we);var Se=new k({name:C.CordiARCReactor,repCost:45e4,moneyCost:1e9,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 amount of clean energy for the body.

This augmentation:
Increases all of the player's combat stats by 35%.
Increases all of the player's combat stat experience gain rate by 35%."});Se.addToFactions(["MegaCorp"]),I(C.CordiARCReactor)&&delete E[C.CordiARCReactor],O(Se);var Te=new k({name:C.SmartJaw,repCost:15e4,moneyCost:55e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.

This augmentation:
Increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 50%.
Increases the amount of reputation the player gains for a company by 25%.
Increases the amount of reputation the player gains for a faction by 25%."});Te.addToFactions(["Bachman & Associates"]),I(C.SmartJaw)&&delete E[C.SmartJaw],O(Te);var Re=new k({name:C.Neotra,repCost:225e3,moneyCost:575e6,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.

This augmentation increases the player's strength and defense by 55%."});Re.addToFactions(["Blade Industries"]),I(C.Neotra)&&delete E[C.Neotra],O(Re);var xe=new k({name:C.Xanipher,repCost:35e4,moneyCost:85e7,info:"A concoction of advanced nanobots that is orally ingested into the body. These nanobots induce physiological change and significantly improve the body's functionining in all aspects.

This augmentation:
Increases all of the player's stats by 20%.
Increases the player's experience gain rate for all stats by 15%."});xe.addToFactions(["NWO"]),I(C.Xanipher)&&delete E[C.Xanipher],O(xe);var Ie=new k({name:C.nextSENS,repCost:175e3,moneyCost:385e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.

This augmentation increases all of the player's stats by 20%."});Ie.addToFactions(["Clarke Incorporated"]),I(C.nextSENS)&&delete E[C.nextSENS],O(Ie);var Pe=new k({name:C.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.

This augmentation:
Increases the player's hacking skill by 20%.
Increases the player's hacking experience gain rate by 25%."});Pe.addToFactions(["OmniTek Incorporated"]),I(C.OmniTekInfoLoad)&&delete E[C.OmniTekInfoLoad],O(Pe);var Ne=new k({name:C.PhotosyntheticCells,repCost:225e3,moneyCost:55e7,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.

This augmentation increases the player's strength, defense, and agility by 40%."});Ne.addToFactions(["KuaiGong International"]),I(C.PhotosyntheticCells)&&delete E[C.PhotosyntheticCells],O(Ne);var Ae=new k({name:C.Neurolink,repCost:35e4,moneyCost:875e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 20%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking speed by 5%.
Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset."});Ae.addToFactions(["BitRunners"]),I(C.Neurolink)&&delete E[C.Neurolink],O(Ae);var Me=new k({name:C.TheBlackHand,repCost:4e4,moneyCost:11e7,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 just by touching them.

This augmentation:
Increases the player's strength and dexterity by 15%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 10%."});Me.addToFactions(["The Black Hand"]),I(C.TheBlackHand)&&delete E[C.TheBlackHand],O(Me);var Le=new k({name:C.CRTX42AA,repCost:18e3,moneyCost:45e6,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.

This augmentation:
Improves the player's hacking skill by 8%.
Improves the player's hacking experience gain rate by 15%."});Le.addToFactions(["NiteSec"]),I(C.CRTX42AA)&&delete E[C.CRTX42AA],O(Le);var Be=new k({name:C.Neuregen,repCost:15e3,moneyCost:75e6,info:"A drug that genetically modifies the neurons in the brain. The result is that these neurons never die and continuously regenerate and strengthen themselves.

This augmentation increases the player's hacking experience gain rate by 40%."});Be.addToFactions(["Chongqing"]),I(C.Neuregen)&&delete E[C.Neuregen],O(Be);var je=new k({name:C.CashRoot,repCost:5e3,moneyCost:25e6,info:"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.

This augmentation:
Lets the player start with $1,000,000 after a reset.
Lets the player start with the BruteSSH.exe program after a reset."});je.addToFactions(["Sector-12"]),I(C.CashRoot)&&delete E[C.CashRoot],O(je);var De=new k({name:C.NutriGen,repCost:2500,moneyCost:5e5,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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 20%."});De.addToFactions(["New Tokyo"]),I(C.NutriGen)&&delete E[C.NutriGen],O(De);var Fe=new k({name:C.INFRARet,repCost:3e3,moneyCost:6e6,info:"A retina implant consisting of a tiny chip that sits behind the retina. This implant lets people visually detect infrared radiation.

This augmentation:
Increases the player's crime success rate by 25%.
Increases the amount of money the player gains from crimes by 10%.
Increases the player's dexterity by 10%."});Fe.addToFactions(["Ishima"]),I(C.INFRARet)&&delete E[C.INFRARet],O(Fe);var He=new k({name:C.DermaForce,repCost:6e3,moneyCost:1e7,info:"A synthetic skin is grafted onto the body. The skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.

This augmentation increases the player's defense by 40%."});He.addToFactions(["Volhaven"]),I(C.DermaForce)&&delete E[C.DermaForce],O(He);var We=new k({name:C.GrapheneBrachiBlades,repCost:9e4,moneyCost:5e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material to make them much stronger and lighter.

This augmentation:
Increases the player's strength and defense by 40%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 30%.",prereqs:[C.BrachiBlades]});We.addToFactions(["Speakers for the Dead"]),I(C.GrapheneBrachiBlades)&&delete E[C.GrapheneBrachiBlades],O(We);var Ge=new k({name:C.GrapheneBionicArms,repCost:2e5,moneyCost:75e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them much stronger and lighter.

This augmentation increases the player's strength and dexterity by 85%.",prereqs:[C.BionicArms]});Ge.addToFactions(["The Dark Army"]),I(C.GrapheneBionicArms)&&delete E[C.GrapheneBionicArms],O(Ge);var Ue=new k({name:C.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.

This augmentation:
Increases the player's strength and defense by 15%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 15%."});Ue.addToFactions(["The Syndicate"]),I(C.BrachiBlades)&&delete E[C.BrachiBlades],O(Ue);var qe=new k({name:C.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.

This augmentation increases the user's strength and dexterity by 30%."});qe.addToFactions(["Tetrads"]),I(C.BionicArms)&&delete E[C.BionicArms],O(qe);var Ke=new k({name:C.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.

This augmentation:
Increases the amount of money the player earns at a company by 10%.
Increases the amount of reputation the player gains when working for a company or faction by 15%."});Ke.addToFactions(["Tian Di Hui"]),I(C.SNA)&&delete E[C.SNA],O(Ke),2===c.a.bitNodeN&&(console.log("Adding all augmentations to crime factions for Bit node 2"),o.b["Slum Snakes"].addAllAugmentations(),o.b.Tetrads.addAllAugmentations(),o.b["The Syndicate"].addAllAugmentations(),o.b["The Dark Army"].addAllAugmentations(),o.b["Speakers for the Dead"].addAllAugmentations(),o.b.NiteSec.addAllAugmentations(),o.b["The Black Hand"].addAllAugmentations());if(Object(o.d)("Bladeburners")){var Ve=new k({name:C.EsperEyewear,repCost:500,moneyCost:33e6,info:"Ballistic-grade protective and retractable eyewear that was designed specially 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, laser, flash, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD and assist the user in field missions.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 3%.
Increases the player's dexterity by 3%."});Ve.addToFactions(["Bladeburners"]),S(Ve);var Ye=new k({name:C.EMS4Recombination,repCost:1e3,moneyCost:55e6,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, and improve reflexes and memory-recall among other things.

This augmentation:
Increases the player's sucess chance in Bladeburner contracts/operations by 3%.
Increases the player's effectiveness in Bladeburner Field Analysis by 5%.
Increases the player's Bladeburner stamina gain rate by 1%."});Ye.addToFactions(["Bladeburners"]),S(Ye);var ze=new k({name:C.OrionShoulder,repCost:2500,moneyCost:11e7,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.

This augmentation:
Increases the player's defense by 5%.
Increases the player's strength and dexterity by 3%.
Increases the player's success chance in Bladeburner contracts/operations by 4%."});ze.addToFactions(["Bladeburners"]),S(ze);var Je=new k({name:C.HyperionV1,repCost:5e3,moneyCost:55e7,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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 5%."});Je.addToFactions(["Bladeburners"]),S(Je);var $e=new k({name:C.HyperionV2,repCost:1e4,moneyCost:11e8,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-efficiency, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 7%.",prereqs:[C.HyperionV1]});$e.addToFactions(["Bladeburners"]),S($e);var Xe=new k({name:C.GolemSerum,repCost:12500,moneyCost:22e8,info:"A serum that permanently enhances many aspects of a human's capabilities, including strength, speed, immune system performance, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.

This augmentation:
Increases all of the player's combat stats by 5%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});Xe.addToFactions(["Bladeburners"]),S(Xe);var Qe=new k({name:C.VangelisVirus,repCost:7500,moneyCost:55e7,info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 4%.
Increases the player's dexterity experience gain rate by 5%."});Qe.addToFactions(["Bladeburners"]),S(Qe);var Ze=new k({name:C.VangelisVirus3,repCost:15e3,moneyCost:22e8,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into the human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced agility/reflexes.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's defense and dexterity experience gain rate by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[C.VangelisVirus]});Ze.addToFactions(["Bladeburners"]),S(Ze);var et=new k({name:C.INTERLINKED,repCost:1e4,moneyCost:11e8,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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 4%.
Increases the player's Bladeburner max stamina by 10%."});et.addToFactions(["Bladeburners"]),S(et);var tt=new k({name:C.BladeRunner,repCost:8e3,moneyCost:165e7,info:"A cybernetic foot augmentation that was specially 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.

This augmentation:
Increases the player's agility by 5%.
Increases the player's Bladeburner max stamina by 5%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});tt.addToFactions(["Bladeburners"]),S(tt);var nt=new k({name:C.BladeArmor,repCost:5e3,moneyCost:275e6,info:"A powered exoskeleton suit (exosuit) 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 strength and agility.

This augmentation:
Increases all of the player's combat stats by 2%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's success chance in Bladeburner contracts/operations by 3%."});nt.addToFactions(["Bladeburners"]),S(nt);var at=new k({name:C.BladeArmorPowerCells,repCost:7500,moneyCost:55e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 5%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's Bladeburner max stamina by 5%.",prereqs:[C.BladeArmor]});at.addToFactions(["Bladeburners"]),S(at);var it=new k({name:C.BladeArmorEnergyShielding,repCost:8500,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.

This augmentation:
Increases the player's defense by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[C.BladeArmor]});it.addToFactions(["Bladeburners"]),S(it);var rt=new k({name:C.BladeArmorUnibeam,repCost:12500,moneyCost:33e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision an accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[C.BladeArmor]});rt.addToFactions(["Bladeburners"]),S(rt);var ot=new k({name:C.BladeArmorOmnibeam,repCost:25e3,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use multiple-fiber system. The upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[C.BladeArmorUnibeam]});ot.addToFactions(["Bladeburners"]),S(ot);var st=new k({name:C.BladeArmorIPU,repCost:6e3,moneyCost:22e7,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[C.BladeArmor]});st.addToFactions(["Bladeburners"]),S(st);var lt=new k({name:C.BladesSimulacrum,repCost:6e3,moneyCost:75e9,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 specially weaponized by Bladeburner units to be used against Synthoids.

This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."});lt.addToFactions(["Bladeburners"]),S(lt)}var ct=Math.pow(i.a.MultipleAugMultiplier,c.a.queuedAugmentations.length);for(var e in E)E.hasOwnProperty(e)&&(E[e].baseCost*=ct);c.a.reapplyAllAugmentations()}function S(e){if(!(e instanceof k))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;I(t)&&delete E[t],O(e)}function T(e,t=!1){switch(E[e.name].owned=!0,e.name){case C.Targeting1:c.a.dexterity_mult*=1.1;break;case C.Targeting2:c.a.dexterity_mult*=1.2;break;case C.Targeting3:c.a.dexterity_mult*=1.3;break;case C.SyntheticHeart:c.a.agility_mult*=1.5,c.a.strength_mult*=1.5;break;case C.SynfibrilMuscle:c.a.strength_mult*=1.3,c.a.defense_mult*=1.3;break;case C.CombatRib1:c.a.strength_mult*=1.1,c.a.defense_mult*=1.1;break;case C.CombatRib2:c.a.strength_mult*=1.14,c.a.defense_mult*=1.14;break;case C.CombatRib3:c.a.strength_mult*=1.18,c.a.defense_mult*=1.18;break;case C.NanofiberWeave:c.a.strength_mult*=1.2,c.a.defense_mult*=1.2;break;case C.SubdermalArmor:c.a.defense_mult*=2.2;break;case C.WiredReflexes:c.a.agility_mult*=1.05,c.a.dexterity_mult*=1.05;break;case C.GrapheneBoneLacings:c.a.strength_mult*=1.7,c.a.defense_mult*=1.7;break;case C.BionicSpine:c.a.strength_mult*=1.15,c.a.defense_mult*=1.15,c.a.agility_mult*=1.15,c.a.dexterity_mult*=1.15;break;case C.GrapheneBionicSpine:c.a.strength_mult*=1.6,c.a.defense_mult*=1.6,c.a.agility_mult*=1.6,c.a.dexterity_mult*=1.6;break;case C.BionicLegs:c.a.agility_mult*=1.6;break;case C.GrapheneBionicLegs:c.a.agility_mult*=2.5;break;case C.EnhancedSocialInteractionImplant:c.a.charisma_mult*=1.6,c.a.charisma_exp_mult*=1.6;break;case C.TITN41Injection:c.a.charisma_mult*=1.15,c.a.charisma_exp_mult*=1.15;break;case C.SpeechProcessor:c.a.charisma_mult*=1.2;break;case C.BitWire:c.a.hacking_mult*=1.05;break;case C.ArtificialBioNeuralNetwork:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.12;break;case C.ArtificialSynapticPotentiation:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.05;break;case C.EnhancedMyelinSheathing:c.a.hacking_speed_mult*=1.03,c.a.hacking_exp_mult*=1.1,c.a.hacking_mult*=1.08;break;case C.SynapticEnhancement:c.a.hacking_speed_mult*=1.03;break;case C.NeuralRetentionEnhancement:c.a.hacking_exp_mult*=1.25;break;case C.DataJack:c.a.hacking_money_mult*=1.25;break;case C.ENM:c.a.hacking_mult*=1.08;break;case C.ENMCore:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.1,c.a.hacking_chance_mult*=1.03,c.a.hacking_exp_mult*=1.07,c.a.hacking_mult*=1.07;break;case C.ENMCoreV2:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.3,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.15,c.a.hacking_mult*=1.08;break;case C.ENMCoreV3:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.25,c.a.hacking_mult*=1.1;break;case C.ENMAnalyzeEngine:c.a.hacking_speed_mult*=1.1;break;case C.ENMDMA:c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.2;break;case C.Neuralstimulator:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.12;break;case C.NeuralAccelerator:c.a.hacking_mult*=1.1,c.a.hacking_exp_mult*=1.15,c.a.hacking_money_mult*=1.2;break;case C.CranialSignalProcessorsG1:c.a.hacking_speed_mult*=1.01,c.a.hacking_mult*=1.05;break;case C.CranialSignalProcessorsG2:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_mult*=1.07;break;case C.CranialSignalProcessorsG3:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.09;break;case C.CranialSignalProcessorsG4:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.2,c.a.hacking_grow_mult*=1.25;break;case C.CranialSignalProcessorsG5:c.a.hacking_mult*=1.3,c.a.hacking_money_mult*=1.25,c.a.hacking_grow_mult*=1.75;break;case C.NeuronalDensification:c.a.hacking_mult*=1.15,c.a.hacking_exp_mult*=1.1,c.a.hacking_speed_mult*=1.03;break;case C.NuoptimalInjectorImplant:c.a.company_rep_mult*=1.2;break;case C.SpeechEnhancement:c.a.company_rep_mult*=1.1,c.a.charisma_mult*=1.1;break;case C.FocusWire:c.a.hacking_exp_mult*=1.05,c.a.strength_exp_mult*=1.05,c.a.defense_exp_mult*=1.05,c.a.dexterity_exp_mult*=1.05,c.a.agility_exp_mult*=1.05,c.a.charisma_exp_mult*=1.05,c.a.company_rep_mult*=1.1,c.a.work_money_mult*=1.2;break;case C.PCDNI:c.a.company_rep_mult*=1.3,c.a.hacking_mult*=1.08;break;case C.PCDNIOptimizer:c.a.company_rep_mult*=1.75,c.a.hacking_mult*=1.1;break;case C.PCDNINeuralNetwork:c.a.company_rep_mult*=2,c.a.hacking_mult*=1.1,c.a.hacking_speed_mult*=1.05;break;case C.ADRPheromone1:c.a.company_rep_mult*=1.1,c.a.faction_rep_mult*=1.1;break;case C.ADRPheromone2:c.a.company_rep_mult*=1.2,c.a.faction_rep_mult*=1.2;break;case C.HacknetNodeCPUUpload:c.a.hacknet_node_money_mult*=1.15,c.a.hacknet_node_purchase_cost_mult*=.85;break;case C.HacknetNodeCacheUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_level_cost_mult*=.85;break;case C.HacknetNodeNICUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_purchase_cost_mult*=.9;break;case C.HacknetNodeKernelDNI:c.a.hacknet_node_money_mult*=1.25;break;case C.HacknetNodeCoreDNI:c.a.hacknet_node_money_mult*=1.45;break;case C.NeuroFluxGovernor:if(c.a.hacking_chance_mult*=1.01,c.a.hacking_speed_mult*=1.01,c.a.hacking_money_mult*=1.01,c.a.hacking_grow_mult*=1.01,c.a.hacking_mult*=1.01,c.a.strength_mult*=1.01,c.a.defense_mult*=1.01,c.a.dexterity_mult*=1.01,c.a.agility_mult*=1.01,c.a.charisma_mult*=1.01,c.a.hacking_exp_mult*=1.01,c.a.strength_exp_mult*=1.01,c.a.defense_exp_mult*=1.01,c.a.dexterity_exp_mult*=1.01,c.a.agility_exp_mult*=1.01,c.a.charisma_exp_mult*=1.01,c.a.company_rep_mult*=1.01,c.a.faction_rep_mult*=1.01,c.a.crime_money_mult*=1.01,c.a.crime_success_mult*=1.01,c.a.hacknet_node_money_mult*=1.01,c.a.hacknet_node_purchase_cost_mult*=.99,c.a.hacknet_node_ram_cost_mult*=.99,c.a.hacknet_node_core_cost_mult*=.99,c.a.hacknet_node_level_cost_mult*=.99,c.a.work_money_mult*=1.01,!t){E[e.name].level=e.level;for(var n=0;n"):console.log("ERROR. Invalid augmentation")}if(c.a.queuedAugmentations=[],Object(m.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:
"+t+"
You wake up in your home...you feel different..."),Object(u.a)(),e&&Object(v.isString)(e)){var i=c.a.getHomeComputer();for(n=0;ni.maxRam-i.ramUsed)return;var o=new h.b(r,[]);o.threads=1,i.runningScripts.push(o),Object(l.c)(o,i)}}}function I(e){return E.hasOwnProperty(e)}function P(){Object(_.removeChildrenFromElement)(r.Engine.Display.augmentationsContent),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("h1",{innerText:"Purchased Augmentations"}));var e="\n";(6===c.a.bitNodeN||s.c)&&(e="Bladeburner Progress\n\n"),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("pre",{width:"70%",whiteSpace:"pre-wrap",display:"block",innerText:"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\nWARNING: Installing your Augmentations resets most of your progress, including:\n\nStats/Skill levels and Experience\nMoney\nScripts on every computer but your home computer\nPurchased servers\nHacknet Nodes\nFaction/Company reputation\nStocks\n"+e+"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)."})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",innerText:"Install Augmentations",tooltip:"'I never asked for this'",clickListener:()=>(x(),!1)})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button flashing-button",innerText:"Backup Save (Export)",tooltip:"It's always a good idea to backup/export your save!",clickListener:()=>(d.b.exportGame(),!1)}));for(var t=Object(b.createElement)("ul",{class:"augmentations-list"}),n=0;n{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{Object(_.removeChildrenFromElement)(u);var e=c.a.sourceFiles.slice(),t=c.a.augmentations.slice();e.sort((e,t)=>e.n-t.n),t.sort((e,t)=>e.name<=t.name?-1:1),A(u,e),N(u,t)}})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source Files based on when you acquired them (same as default)",clickListener:()=>{Object(_.removeChildrenFromElement)(u),A(u,c.a.sourceFiles),N(u,c.a.augmentations)}})),A(u,c.a.sourceFiles),N(u,c.a.augmentations),r.Engine.Display.augmentationsContent.appendChild(u)}function N(e,t){for(var n=0;nLevel "+t[n].lvl+" / "+o,panelText:i.info});e.appendChild(r[0])}}},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return c});var a=n(10);let i={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"};function r(){}r.prototype.addIp=function(e,t){this[e]=t},r.prototype.toJSON=function(){return Object(a.Generic_toJSON)("SpecialServerIpsMap",this)},r.fromJSON=function(e){return Object(a.Generic_fromJSON)(r,e.data)},a.Reviver.constructors.SpecialServerIpsMap=r;let o=new r;function s(){for(var e in o)delete o[e];o=null,o=new r}function l(e){o=JSON.parse(e,a.Reviver)}function c(){o=new r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(44),i=n(55);t.removeElementById=function(e){try{const t=a.getElementById(e);i.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"c",function(){return d}),n.d(t,"d",function(){return h});var a=n(1),i=n(0),r=n(3);function o(e){return function(){return i.a.hacking_skill>=e}}function s(e,t){this.name=e,this.create=t}s.prototype.htmlID=function(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)};const l={NukeProgram:new s("NUKE.exe",{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:o(1),time:a.a.MillisecondsPerFiveMinutes}),BruteSSHProgram:new s("BruteSSH.exe",{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:o(50),time:2*a.a.MillisecondsPerFiveMinutes}),FTPCrackProgram:new s("FTPCrack.exe",{level:100,tooltip:"This program cracks open FTP ports",req:o(100),time:a.a.MillisecondsPerHalfHour}),RelaySMTPProgram:new s("relaySMTP.exe",{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:o(250),time:a.a.MillisecondsPer2Hours}),HTTPWormProgram:new s("HTTPWorm.exe",{level:500,tooltip:"This virus opens up HTTP ports",req:o(500),time:a.a.MillisecondsPer4Hours}),SQLInjectProgram:new s("SQLInject.exe",{level:750,tooltip:"This virus opens SQL ports",req:o(750),time:a.a.MillisecondsPer8Hours}),DeepscanV1:new s("DeepscanV1.exe",{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:o(75),time:a.a.MillisecondsPerQuarterHour}),DeepscanV2:new s("DeepscanV2.exe",{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:o(400),time:a.a.MillisecondsPer2Hours}),ServerProfiler:new s("ServerProfiler.exe",{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:o(75),time:a.a.MillisecondsPerHalfHour}),AutoLink:new s("AutoLink.exe",{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:o(25),time:a.a.MillisecondsPerQuarterHour}),BitFlume:new s("b1t_flum3.exe",{level:5,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(){return i.a.sourceFiles.length>0&&i.a.hacking_skill>=5},time:a.a.MillisecondsPerFiveMinutes/5}),Flight:new s("fl1ght.exe")},c={};function u(){for(const e in c){const t=l[e];c[e].style.display="none",!i.a.hasProgram(t.name)&&t.create.req()&&(c[e].style.display="inline-block")}}function d(){var e=0;for(const t in l)void 0!==l[t].create&&(i.a.hasProgram(l[t].name)||l[t].create.req()&&e++);return!1===i.a.firstProgramAvailable&&e>0&&(i.a.firstProgramAvailable=!0,document.getElementById("create-program-tab").style.display="list-item",document.getElementById("hacking-menu-header").click(),document.getElementById("hacking-menu-header").click()),e}function h(){var e=document.getElementById("create-program-list");for(const t in l){if(void 0===l[t].create)continue;const n=Object(r.createElement)("a",{class:"a-link-button",id:l[t].htmlID(),innerText:l[t].name,tooltip:l[t].create.tooltip});c[t]=n,e.appendChild(n)}for(const e in c){const t=l[e];c[e].addEventListener("click",function(){return i.a.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return r});var a=n(6);let i={CodeInstructionRunTime:25,MaxLogCapacity:50,MaxPortCapacity:50,SuppressMessages:!1,SuppressFactionInvites:!1,SuppressTravelConfirmation:!1,SuppressBuyAugmentationConfirmation:!1,AutosaveInterval:60,DisableHotkeys:!1,ThemeHighlightColor:"#ffffff",ThemeFontColor:"#66ff33",ThemeBackgroundColor:"#000000",EditorTheme:"Monokai",EditorKeybinding:"ace"};function r(e){i=JSON.parse(e)}function o(){i.CodeInstructionRunTime=50,i.MaxLogCapacity=50,i.MaxPortCapacity=50,i.SuppressMessages=!1,i.SuppressFactionInvites=!1,i.SuppressTravelConfirmation=!1,i.SuppressBuyAugmentationConfirmation=!1,i.AutosaveInterval=60,i.DisableHotkeys=!1}function s(){var e=document.getElementById("settingsNSExecTimeRangeValLabel"),t=document.getElementById("settingsNSLogRangeValLabel"),n=document.getElementById("settingsNSPortRangeValLabel"),r=document.getElementById("settingsSuppressMessages"),o=document.getElementById("settingsSuppressFactionInvites"),s=document.getElementById("settingsSuppressTravelConfirmation"),l=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),c=document.getElementById("settingsAutosaveIntervalValLabel"),u=document.getElementById("settingsDisableHotkeys");e.innerHTML=i.CodeInstructionRunTime+"ms",t.innerHTML=i.MaxLogCapacity,n.innerHTML=i.MaxPortCapacity,r.checked=i.SuppressMessages,o.checked=i.SuppressFactionInvites,s.checked=i.SuppressTravelConfirmation,l.checked=i.SuppressBuyAugmentationConfirmation,c.innerHTML=i.AutosaveInterval,u.checked=i.DisableHotkeys;var d=document.getElementById("settingsNSExecTimeRangeVal"),h=document.getElementById("settingsNSLogRangeVal"),p=document.getElementById("settingsNSPortRangeVal"),m=document.getElementById("settingsAutosaveIntervalVal");d.value=i.CodeInstructionRunTime,h.value=i.MaxLogCapacity,p.value=i.MaxPortCapacity,m.value=i.AutosaveInterval,d.oninput=function(){e.innerHTML=this.value+"ms",i.CodeInstructionRunTime=this.value},h.oninput=function(){t.innerHTML=this.value,i.MaxLogCapacity=this.value},p.oninput=function(){n.innerHTML=this.value,i.MaxPortCapacity=this.value},m.oninput=function(){c.innerHTML=this.value,i.AutosaveInterval=Number(this.value),0===Number(this.value)?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*Number(this.value)},r.onclick=function(){i.SuppressMessages=this.checked},o.onclick=function(){i.SuppressFactionInvites=this.checked},s.onclick=function(){i.SuppressTravelConfirmation=this.checked},l.onclick=function(){i.SuppressBuyAugmentationConfirmation=this.checked,console.log("sup buy: "+i.SuppressBuyAugmentationConfirmation)},u.onclick=function(){i.DisableHotkeys=this.checked},null!=i.ThemeHighlightColor&&null!=i.ThemeFontColor&&null!=i.ThemeBackgroundColor?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeHighlightColor)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeFontColor)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeBackgroundColor)&&(document.body.style.setProperty("--my-highlight-color",i.ThemeHighlightColor),document.body.style.setProperty("--my-font-color",i.ThemeFontColor),document.body.style.setProperty("--my-background-color",i.ThemeBackgroundColor)):console.log("ERROR: Cannot find Theme Settings")}},function(e,t,n){"use strict";n.d(t,"b",function(){return E}),n.d(t,"h",function(){return O}),n.d(t,"a",function(){return C}),n.d(t,"f",function(){return x}),n.d(t,"d",function(){return I}),n.d(t,"c",function(){return P}),n.d(t,"g",function(){return N}),n.d(t,"e",function(){return S});var a=n(51),i=n(1),r=n(6),o=n(96),s=n(83),l=n(7),c=n(34),u=n(84),d=n(56),h=n(9),p=n(22),m=n(78),g=n(37),y=n(8),f=n(69),b=n(40),v=n(62),_=n(2);const k=n(111);function E(e){this.name=e.filename,this.running=!1,this.serverIp=null,this.code=e.scriptRef.code,this.env=new s.a(this),this.env.set("args",e.args.slice()),this.output="",this.ramUsage=0,this.scriptRef=e,this.errorMessage="",this.args=e.args.slice(),this.delay=null,this.fnWorker=null,this.checkingRam=!1,this.loadedFns={},this.disableLogs={},this.dynamicRamUsage=i.a.ScriptBaseRamCost,this.dynamicLoadedFns={}}E.prototype.getServer=function(){return h.b[this.serverIp]},E.prototype.getScript=function(){let e=this.getServer();for(var t=0;t{if(t instanceof Error)throw e.errorMessage=Object(l.d)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(l.b)(t))throw e.errorMessage=t,e;throw t})}function R(e){var t,n,a=e.code;e.running=!0;try{let i=function(e,t){var n=Object(g.parse)(e,{ecmaVersion:6,allowReserved:!0,sourceType:"module"}),a=t.getServer();if(null==a)throw new Error("Failed to find underlying Server object for script");var i="",r=!1;if(k.simple(n,{ImportDeclaration:e=>{r=!0;let t=e.source.value,n=function(e){for(let t=0;t{n.push(e.id.name),a.push(e)}}),i="var "+t+";\n(function (namespace) {\n",a.forEach(e=>{i+=Object(m.generate)(e),i+="\n"}),n.forEach(e=>{i+="namespace."+e+" = "+e,i+="\n"}),i+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];k.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{i+=Object(m.generate)(e),i+="\n"})}}}),!r)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=(i.match(/\n/g)||[]).length-o;return e=Object(m.generate)(n),{code:e=i+e,lineOffset:s}}(a,e);t=i.code,n=i.lineOffset}catch(t){return Object(y.dialogBoxCreate)("Error processing Imports in "+e.name+":
"+t),e.env.stopFlag=!0,void(e.running=!1)}var i;try{i=new o.a(t,function(t,n){var a=Object(c.a)(e);for(let e in a){let i=a[e];if("function"==typeof i)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"run"===e||"exec"===e){let a=function(){let e=[];for(let t=0;t"+t),e.env.stopFlag=!0,void(e.running=!1)}return new Promise(function(t,n){try{!function a(){try{if(e.env.stopFlag)return n(e);i.step()?window.setTimeout(a,p.a.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(l.b)(t)||(t=Object(l.d)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(_.isString)(t)?(e.errorMessage=t,n(e)):n(t instanceof E?t:e)}})}function x(){for(var e=!1,t=O.length-1;t>=0;t--)if(0==O[t].running&&1==O[t].env.stopFlag){e=!0;var n=O[t].serverIp,i=O[t].name;h.b[n].ramUsed=0;for(let e=0;eServer Ip: "+n+"
Script name: "+a+"
Args:"+Object(b.arrayToString)(e.args)+"
"+i),e.scriptRef.log("Script crashed with runtime error")}else e.scriptRef.log("Script killed");e.running=!1,e.env.stopFlag=!0}else{if(Object(l.b)(e))return Object(y.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.log("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(y.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.log(e)}else console.log("Script returning with value: "+e[1])})}setTimeout(x,6e3)}function I(e,t){for(var n=0;nt.maxRam-t.ramUsed)Object(y.dialogBoxCreate)("Not enough RAM to run script "+e.filename+" with args "+Object(b.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.)");else{t.ramUsed=Object(v.roundToTwo)(t.ramUsed+i);var r=new E(e);r.serverIp=t.ip,r.ramUsage=i,Object(a.a)(r),O.push(r)}}function N(e=1){for(var t=e*r.Engine._idleSpeed/1e3,n=0;ne.playerShares&&(t=e.playerShares),0===t)return!1;var n=e.price*t-a.a.StockMarketCommission;return l.a.gainMoney(n),e.playerShares-=t,0==e.playerShares&&(e.playerAvgPx=0),$(e),Object(c.dialogBoxCreate)("Sold "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. After commissions, you gained a total of $"+Object(m.formatNumber)(n,2)),!0}function B(e,t,n=null){var i=n instanceof s.b;if(null==e||isNaN(t)||t<0)return i?n.scriptRef.log("ERROR: shortStock() failed because of invalid arguments."):Object(c.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;if(0===(t=Math.round(t)))return!1;var r=e.price*t;if(l.a.money.lt(r+a.a.StockMarketCommission))return i?n.scriptRef.log("ERROR: shortStock() failed because you do not have money to purchase this short position. You need "+p()(r+a.a.StockMarketCommission).format("($0.000a)")):Object(c.dialogBoxCreate)("You do not have enough money to purchase this short position. You need $"+Object(m.formatNumber)(r+a.a.StockMarketCommission,2)+"."),!1;var o=e.playerShortShares*e.playerAvgShortPx;l.a.loseMoney(r+a.a.StockMarketCommission);var u=o+r;return e.playerShortShares+=t,e.playerAvgShortPx=u/e.playerShortShares,$(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.shortStock&&n.scriptRef.log("Bought a short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at "+p()(e.price).format("($0.000a)")+" per share. Paid "+p()(a.a.StockMarketCommission).format("($0.000a)")+" in commission fees."):Object(c.dialogBoxCreate)("Bought a short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. You also paid $"+Object(m.formatNumber)(a.a.StockMarketCommission,2)+" in commission fees."),!0}function j(e,t,n=null){var i=n instanceof s.b;if(null==e||isNaN(t)||t<0)return i?n.scriptRef.log("ERROR: sellShort() failed because of invalid arguments."):Object(c.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;var r=t*e.playerAvgShortPx,o=(e.playerAvgShortPx-e.price)*t-a.a.StockMarketCommission;return isNaN(o)&&(o=0),l.a.gainMoney(r+o),i&&(n.scriptRef.onlineMoneyMade+=o,l.a.scriptProdSinceLastAug+=o),e.playerShortShares-=t,0===e.playerShortShares&&(e.playerAvgShortPx=0),$(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.sellShort&&n.scriptRef.log("Sold your short position of "+t+" shares of "+e.symbol+" at "+p()(e.price).format("($0.000a)")+" per share. After commissions, you gained a total of "+p()(r+o).format("($0.000a)")):Object(c.dialogBoxCreate)("Sold your short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. After commissions, you gained a total of $"+Object(m.formatNumber)(r+o,2)),!0}function D(){var e=Math.random();for(var t in S)if(S.hasOwnProperty(t)){var n=S[t];if(!(n instanceof v))continue;var a=e*n.mv/100;isNaN(a)&&(a=.02);var r=50;n.b?(r=(r+n.otlkMag)/100,isNaN(r)&&(r=.5)):(r=(r-n.otlkMag)/100,isNaN(r)&&(r=.5)),n.price>=b&&(r=-1,n.b=!1);var o=Math.random();o=o.price&&C(o);break;case _.LimitSell:case _.StopBuy:o.pos===k.Long&&e.price>=o.price?C(o):o.pos===k.Short&&e.price<=o.price&&C(o);break;case _.StopSell:o.pos===k.Long&&e.price<=o.price?C(o):o.pos===k.Short&&e.price>=o.price&&C(o);break;default:return void console.log("Invalid order type: "+o.type)}}}else{var s={};for(var l in S)if(S.hasOwnProperty(l)){if(!((e=S[l])instanceof v))continue;s[e.symbol]=[]}S.Orders=s}}function H(e){W=e}var W=!1,G=!1,U=a.a.StockMarketCommission;function q(){null==l.a.hasWseAccount&&(l.a.hasWseAccount=!1),null==l.a.hasTixApiAccess&&(l.a.hasTixApiAccess=!1);var e=Object(u.clearEventListeners)("stock-market-buy-account");e.innerText="Buy WSE Account - $"+Object(m.formatNumber)(a.a.WSEAccountCost,2).toString(),!l.a.hasWseAccount&&l.a.money.gte(a.a.WSEAccountCost)?e.setAttribute("class","a-link-button"):l.a.hasWseAccount?(e.innerText="WSE Account - Purchased",e.setAttribute("class","a-link-button-bought")):e.setAttribute("class","a-link-button-inactive"),e.addEventListener("click",function(){return l.a.hasWseAccount=!0,P(),N(),l.a.loseMoney(a.a.WSEAccountCost),q(),!1});var t=Object(u.clearEventListeners)("stock-market-buy-tix-api");if(t.innerText="Buy Trade Information eXchange (TIX) API Access - $"+Object(m.formatNumber)(a.a.TIXAPICost,2).toString(),!l.a.hasTixApiAccess&&l.a.money.gte(a.a.TIXAPICost)?t.setAttribute("class","a-link-button"):l.a.hasTixApiAccess?(t.innerText="Trade Information eXchange (TIX) API Access - Purchased",t.setAttribute("class","a-link-button-bought")):t.setAttribute("class","a-link-button-inactive"),t.addEventListener("click",function(){return l.a.hasTixApiAccess=!0,l.a.loseMoney(a.a.TIXAPICost),q(),!1}),null!=(o=document.getElementById("stock-market-list")))if(l.a.hasWseAccount){if(!W&&l.a.hasWseAccount){console.log("Creating Stock Market UI"),document.getElementById("stock-market-commission").innerHTML="Commission Fees: Every transaction you make has a $"+Object(m.formatNumber)(a.a.StockMarketCommission,2)+" commission fee.

WARNING: When you reset after installing Augmentations, the Stock Market is reset. This means all your positions are lost, so make sure to sell your stocks before installing Augmentations!",Object(u.clearEventListeners)("stock-market-investopedia").addEventListener("click",function(){return Object(c.dialogBoxCreate)("When making a transaction on the stock market, there are two types of positions: Long and Short. A Long position is the typical scenario where you buy a stock and earn a profit if the price of that stock increases. Meanwhile, a Short position is the exact opposite. In a Short position you purchase shares of a stock and earn a profit if the price of that stock decreases. This is also called 'shorting' a stock.

NOTE: Shorting stocks is not available immediately, and must be unlocked later on in the game.

There are three different types of orders you can make to buy or sell stocks on the exchange: Market Order, Limit Order, and Stop Order. Note that Limit Orders and Stop Orders are not available immediately, and must be unlocked later on in the game.

When you place a Market Order to buy or sell a stock, the order executes immediately at whatever the current price of the stock is. For example if you choose to short a stock with 5000 shares using a Market Order, you immediately purchase those 5000 shares in a Short position at whatever the current market price is for that stock.

A Limit Order is an order that only executes under certain conditions. A Limit Order is used to buy or sell a stock at a specified price or better. For example, lets say you purchased a Long position of 100 shares of some stock at a price of $10 per share. You can place a Limit Order to sell those 100 shares at $50 or better. The Limit Order will execute when the price of the stock reaches a value of $50 or higher.

A Stop Order is the opposite of a Limit Order. It is used to buy or sell a stock at a specified price (before the price gets 'worse'). For example, lets say you purchased a Short position of 100 shares of some stock at a price of $100 per share. The current price of the stock is $80 (a profit of $20 per share). You can place a Stop Order to sell the Short position if the stock's price reaches $90 or higher. This can be used to lock in your profits and limit any losses.

Here is a summary of how each order works and when they execute:

In a LONG Position:

A Limit Order to buy will execute if the stock's price <= order's price
A Limit Order to sell will execute if the stock's price >= order's price
A Stop Order to buy will execute if the stock's price >= order's price
A Stop Order to sell will execute if the stock's price <= order's price

In a SHORT Position:

A Limit Order to buy will execute if the stock's price >= order's price
A Limit Order to sell will execute if the stock's price <= order's price
A Stop Order to buy will execute if the stock's price <= order's price
A Stop Order to sell will execute if the stock's price >= order's price."),!1});var n=Object(u.clearEventListeners)("stock-market-mode");n&&(n.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",n.addEventListener("click",K));var i=Object(u.clearEventListeners)("stock-market-expand-tickers"),r=Object(u.clearEventListeners)("stock-market-collapse-tickers"),o=document.getElementById("stock-market-list");for(var s in i&&i.addEventListener("click",()=>{for(var e=o.getElementsByClassName("accordion-header"),t=0;t{for(var e=o.getElementsByClassName("accordion-header"),t=0;tDisplays all stocks on the WSE",t.addEventListener("click",V));e.firstChild;)e.removeChild(e.firstChild);var n=S.Orders;if(null==n){var a={};for(var i in S)if(S.hasOwnProperty(i)){if(!((r=S[i])instanceof v))continue;a[r.symbol]=[]}S.Orders=a}for(var i in S)if(S.hasOwnProperty(i)){var r;if(!((r=S[i])instanceof v))continue;var o=n[r.symbol];if(0===r.playerShares&&0===r.playerShortShares&&0===o.length)continue;Y(r)}z()}}function V(){G=!1;var e=document.getElementById("stock-market-list");if(null!=e){var t=Object(u.clearEventListeners)("stock-market-mode");for(t&&(t.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",t.addEventListener("click",K));e.firstChild;)e.removeChild(e.firstChild);for(var n in S)if(S.hasOwnProperty(n)){var a=S[n];if(!(a instanceof v))continue;Y(a)}z()}}function Y(e){if(e instanceof v){var t="stock-market-ticker-"+e.symbol,n=document.createElement("li"),a=document.createElement("button");a.classList.add("accordion-header"),a.setAttribute("id",t+"-hdr"),a.innerHTML=e.name+" - "+e.symbol+" - $"+e.price;var i=document.createElement("div");i.classList.add("accordion-panel"),i.setAttribute("id",t+"-panel");var r=document.createElement("input"),s=document.createElement("select"),u=document.createElement("select"),d=document.createElement("span"),h=document.createElement("span"),p=document.createElement("span"),m=document.createElement("span"),g=document.createElement("p"),y=document.createElement("ul");r.classList.add("stock-market-input"),r.placeholder="Quantity (Shares)",r.setAttribute("id",t+"-qty-input"),r.setAttribute("onkeydown","return ( event.ctrlKey || event.altKey || (4734 && event.keyCode<40) || (event.keyCode==46) )"),s.classList.add("stock-market-input"),s.setAttribute("id",t+"-pos-selector");var b=document.createElement("option");if(b.text="Long",s.add(b),8===l.a.bitNodeN||o.f&&o.h>=2){var O=document.createElement("option");O.text="Short",s.add(O)}u.classList.add("stock-market-input"),u.setAttribute("id",t+"-order-selector");var C=document.createElement("option");if(C.text="Market Order",u.add(C),8===l.a.bitNodeN||o.f&&o.h>=3){var w=document.createElement("option");w.text="Limit Order",u.add(w);var S=document.createElement("option");S.text="Stop Order",u.add(S)}d.classList.add("stock-market-input"),d.classList.add("a-link-button"),d.innerHTML="Buy",d.addEventListener("click",()=>{var n=s.options[s.selectedIndex].text;n="Long"===n?k.Long:k.Short;var a=u.options[u.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===k.Long?M(e,i):B(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Buy "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(f.h)());t="Limit Order"===a?_.LimitBuy:_.StopBuy,E(e,i,r,t,n),Object(f.f)()}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),h.classList.add("stock-market-input"),h.classList.add("a-link-button"),h.innerHTML="Sell",h.addEventListener("click",()=>{var n=s.options[s.selectedIndex].text;n="Long"===n?k.Long:k.Short;var a=u.options[u.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===k.Long?L(e,i):j(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Sell "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(f.h)());t="Limit Order"===a?_.LimitSell:_.StopSell,Object(f.f)(),E(e,i,r,t,n)}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),p.classList.add("stock-market-input"),p.classList.add("a-link-button"),p.innerHTML="Buy MAX",p.addEventListener("click",()=>{var t=s.options[s.selectedIndex].text;t="Long"===t?k.Long:k.Short;var n=u.options[u.selectedIndex].text,a=l.a.money.toNumber();switch(n){case"Market Order":var i=Math.floor((a-U)/e.price);t===k.Long?M(e,i):B(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Buy "+n,o.innerText="Cancel Order",r.addEventListener("click",()=>{var i,r=Number(Object(f.h)());i="Limit Order"===n?_.LimitBuy:_.StopBuy;var o=Math.floor((a-U)/r);E(e,o,r,i,t),Object(f.f)()}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+n);break;default:console.log("ERROR: Invalid order type")}return!1}),m.classList.add("stock-market-input"),m.classList.add("a-link-button"),m.innerHTML="Sell ALL",m.addEventListener("click",()=>{var t=s.options[s.selectedIndex].text;switch(t="Long"===t?k.Long:k.Short,u.options[u.selectedIndex].text){case"Market Order":if(t===k.Long){var n=e.playerShares;L(e,n)}else{n=e.playerShortShares;j(e,n,null)}break;case"Limit Order":case"Stop Order":Object(c.dialogBoxCreate)("ERROR: 'Sell All' only works for Market Orders");break;default:console.log("ERROR: Invalid order type")}return!1}),g.setAttribute("id",t+"-position-text"),g.classList.add("stock-market-position-text"),e.posTxtEl=g,y.setAttribute("id",t+"-order-list"),y.classList.add("stock-market-order-list"),i.appendChild(r),i.appendChild(s),i.appendChild(u),i.appendChild(d),i.appendChild(h),i.appendChild(p),i.appendChild(m),i.appendChild(g),i.appendChild(y),n.appendChild(a),n.appendChild(i),document.getElementById("stock-market-list").appendChild(n),J(e,!0),$(e),X(e)}else console.log("Invalid stock in createStockSticker()")}function z(){var e=document.getElementById("stock-market-list").getElementsByClassName("accordion-header");if(null!=e)for(var t=0;t0||e.playerShortShares>0)&&$(e);var a=document.getElementById(n+"-hdr");null!=a?(a.innerHTML=e.name+" - "+e.symbol+" - $"+Object(m.formatNumber)(e.price,2),null!=t&&(a.style.color=t?"#66ff33":"red")):G||console.log("ERROR: Couldn't find ticker element for stock: "+e.symbol)}}function $(e){if(i.Engine.currentPage===i.Engine.Page.StockMarket){if(!(e instanceof v))return console.log("Invalid stock in updateStockPlayerPosition():"),void console.log(e);var t="stock-market-ticker-"+e.symbol;if(G){if(0===e.playerShares&&0===e.playerShortShares&&S.Orders&&S.Orders[e.symbol]&&0===S.Orders[e.symbol].length)return Object(y.removeElementById)(t+"-hdr"),void Object(y.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return Y(e),void z()}if(e.posTxtEl instanceof Element||(e.posTxtEl=document.getElementById(t+"-position-text")),null!=e.posTxtEl){var n=e.playerShares*e.playerAvgPx,a=(e.price-e.playerAvgPx)*e.playerShares,r=a/n;isNaN(r)&&(r=0);var s=e.playerShortShares*e.playerAvgShortPx,c=(e.playerAvgShortPx-e.price)*e.playerShortShares,u=c/s;isNaN(u)&&(u=0),e.posTxtEl.innerHTML="

Long Position: Shares in the long position will increase in value if the price of the corresponding stock increases


Shares: "+Object(m.formatNumber)(e.playerShares,0)+"
Average Price: "+p()(e.playerAvgPx).format("$0.000a")+" (Total Cost: "+p()(n).format("$0.000a")+")
Profit: "+p()(a).format("$0.000a")+" ("+Object(m.formatNumber)(100*r,2)+"%)

",(8===l.a.bitNodeN||o.f&&o.h>=2)&&(e.posTxtEl.innerHTML+="

Short Position: Shares in short position will increase in value if the price of the corresponding stock decreases


Shares: "+Object(m.formatNumber)(e.playerShortShares,0)+"
Average Price: "+p()(e.playerAvgShortPx).format("$0.000a")+" (Total Cost: "+p()(s).format("$0.000a")+")
Profit: "+p()(c).format("$0.000a")+" ("+Object(m.formatNumber)(100*u,2)+"%)

Orders:

")}else console.log("ERROR: Could not find stock position element for: "+e.symbol)}}function X(e){if(i.Engine.currentPage===i.Engine.Page.StockMarket){var t="stock-market-ticker-"+e.symbol,n=document.getElementById(t+"-order-list");if(null!=n){var a=S.Orders;if(null!=a){var r=a[e.symbol];if(null!=r){if(G){if(0===e.playerShares&&0===e.playerShortShares&&S.Orders&&S.Orders[e.symbol]&&0===S.Orders[e.symbol].length)return Object(y.removeElementById)(t+"-hdr"),void Object(y.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return Y(e),void z()}for(;n.firstChild;)n.removeChild(n.firstChild);for(var o=0;o'+t+""),B()}function M(t){e("#terminal-input").before(''+t+""),B()}function L(t){e("#terminal-input").before(''+t+""),B()}function B(){var e=document.getElementById("terminal-container");e.scrollTop=e.scrollHeight}function j(){A("Bitburner v"+i.a.Version)}var D={TAB:9,ENTER:13,CTRL:17,UPARROW:38,DOWNARROW:40,A:65,B:66,C:67,D:68,E:69,F:70,H:72,J:74,K:75,L:76,M:77,N:78,O:79,P:80,R:82,S:83,U:85,W:87};e(document).keydown(function(t){if(s.Engine.currentPage==s.Engine.Page.Terminal){var n=document.getElementById("terminal-input-text-box");if(null==n||t.ctrlKey||t.shiftKey||n.focus(),t.keyCode===D.ENTER){t.preventDefault();var i=e("input[class=terminal-input]").val();if(A("["+(l.a.ENABLE_TIMESTAMPS?Object(R.getTimestamp)()+" ":"")+f.a.getCurrentServer().hostname+" ~]> "+i),i.length>0){W.resetTerminalInput();const e=i.split(";");for(let t=0;tu)&&(W.commandHistoryIndex=u),0!=r&&--W.commandHistoryIndex;var c=W.commandHistory[W.commandHistoryIndex];n.value=c,setTimeout(function(){n.selectionStart=n.selectionEnd=1e4},0)}if(t.keyCode===D.DOWNARROW||l.a.ENABLE_BASH_HOTKEYS&&t.keyCode===D.M&&t.ctrlKey){if(l.a.ENABLE_BASH_HOTKEYS&&t.preventDefault(),null==n)return;var u;r=W.commandHistoryIndex;if(0==(u=W.commandHistory.length))return;if((r<0||r>u)&&(W.commandHistoryIndex=u),r==u||r==u-1)W.commandHistoryIndex=u,n.value="";else{++W.commandHistoryIndex;c=W.commandHistory[W.commandHistoryIndex];n.value=c}}if(t.keyCode===D.TAB){if(t.preventDefault(),null==n)return;var d=n.value;if(""==d)return;const e=d.lastIndexOf(";");-1!==e&&(d=d.slice(e+1));var p=(d=(d=d.trim()).replace(/\s\s+/g," ")).split(" "),m=p.length-2;m<-1&&(m=0);var g=function(e,t=0){var n=[];n=n.concat(Object.keys(a.b));var i=f.a.getCurrentServer();if((e=e.toLowerCase()).startsWith("./")&&-1==t){for(var r=0;r=0;--i)n[i].toLowerCase().startsWith(e.toLowerCase())||n.splice(i,1);else for(var i=n.length-1;i>=0;--i)n[i].toLowerCase().startsWith(t.toLowerCase())||n.splice(i,1);var r="";if(0==n.length)return;if(1==n.length){r=""==t?n[0]+" ":e+" "+n[0];const a=document.getElementById("terminal-input-text-box"),i=a.value,o=i.lastIndexOf(";");a.value=-1===o?r:a.value.slice(0,o+1)+" "+r,document.getElementById("terminal-input-text-box").focus()}else{for(var o=Object(C.longestCommonStart)(n),s="",i=0;i "+e),A(s)):(document.getElementById("terminal-input-text-box").value=o,document.getElementById("terminal-input-text-box").focus()):o==t?(A("> "+e+" "+t),A(s)):(document.getElementById("terminal-input-text-box").value=e+" "+o,document.getElementById("terminal-input-text-box").focus())}}(i,y,g),n.focus()}l.a.ENABLE_BASH_HOTKEYS&&(t.keyCode===D.A&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("home")),t.keyCode===D.E&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("end")),t.keyCode===D.B&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("prevchar")),t.keyCode===D.B&&t.altKey&&(t.preventDefault(),W.moveTextCursor("prevword")),t.keyCode===D.F&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("nextchar")),t.keyCode===D.F&&t.altKey&&(t.preventDefault(),W.moveTextCursor("nextword")),t.keyCode!==D.H&&t.keyCode!==D.D||!t.ctrlKey||(W.modifyInput("backspace"),t.preventDefault()))}});let F=!1,H=!1;e(document).ready(function(){s.Engine.currentPage===s.Engine.Page.Terminal&&e(".terminal-input").focus()}),e(document).keydown(function(e){if(s.Engine.currentPage==s.Engine.Page.Terminal)if(17==e.which)F=!0;else if(e.shiftKey)H=!0;else if(F||H);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),F=!1,H=!1}}),e(document).keyup(function(e){s.Engine.currentPage==s.Engine.Page.Terminal&&(17==e.which&&(F=!1),e.shiftKey&&(H=!1))});let W={hackFlag:!1,analyzeFlag:!1,commandHistory:[],commandHistoryIndex:0,resetTerminalInput:function(){document.getElementById("terminal-input-td").innerHTML="
["+f.a.getCurrentServer().hostname+' ~]$
',document.getElementById("terminal-input-header").style.display="inline"},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,i=(t.selectionEnd,t.value);switch(e.toLowerCase()){case"backspace":a>0&&a<=n+1&&(t.value=i.substr(0,a-1)+i.substr(a));break;case"deletewordbefore":for(var r=a-1;r>0;--r)if(" "===i.charAt(r))return void(t.value=i.substr(0,r)+i.substr(a));break;case"deletewordafter":for(r=a+1;r<=text.length+1;++r)if(" "===i.charAt(r))return void(t.value=i.substr(0,a)+i.substr(r))}}catch(e){console.log("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;t.selectionEnd;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 i=a-2;i>=0;--i)if(" "===t.value.charAt(i))return void t.setSelectionRange(i+1,i+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(a+1,a+1);break;case"nextword":for(i=a+1;i<=n;++i)if(" "===t.value.charAt(i))return void t.setSelectionRange(i,i);t.setSelectionRange(n,n);break;default:console.log("WARNING: Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.log("Exception in Terminal.moveTextCursor: "+e)}},finishAction:function(e=!1){W.hackFlag?W.finishHack(e):W.analyzeFlag&&W.finishAnalyze(e)},finishHack:function(t=!1){if(0==t){var n=f.a.getCurrentServer(),a=f.a.calculateHackingChance(),r=Math.random();console.log("Hack success chance: "+a+", rand: "+r);var o=f.a.calculateExpGain(),s=o/4;if(r50&&W.commandHistory.splice(0,1)),W.commandHistoryIndex=W.commandHistory.length,(t=Object(a.h)(t)).startsWith("./")&&(t="run "+t.slice(2));var n=t.split(" ");if(n.length>1&&(n=[n.shift(),n.join(" ")]),0!=n.length)if(u.b){var i=Object(_.c)("foodnstuff");if(null==i)throw new Error("Could not get foodnstuff server");switch(u.a){case u.e.TerminalHelp:"help"==n[0]?(A(c.TerminalHelpText),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalLs:"ls"==n[0]?(W.executeListCommand(n),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalScan:"scan"==n[0]?(W.executeScanCommand(n),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalScanAnalyze1:1==n.length&&"scan-analyze"==n[0]?(W.executeScanAnalyzeCommand(1),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalScanAnalyze2:2==n.length&&"scan-analyze"==n[0]&&"2"==n[1]?(W.executeScanAnalyzeCommand(2),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalConnect:if(2==n.length){if("connect"!=n[0]||"foodnstuff"!=n[1]&&n[1]!=i.ip)return void A("Wrong command! Try again!");f.a.getCurrentServer().isConnectedTo=!1,f.a.currentServer=i.ip,f.a.getCurrentServer().isConnectedTo=!0,A("Connected to foodnstuff"),Object(u.c)()}else A("Bad command. Please follow the tutorial");break;case u.e.TerminalAnalyze:if("analyze"==n[0]){if(1!=n.length)return void A("Incorrect usage of analyze command. Usage: analyze");W.analyzeFlag=!0,A("Analyzing system..."),L("Time left:"),M("["),f.a.analyze(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0),Object(u.c)()}else A("Bad command. Please follow the tutorial");break;case u.e.TerminalNuke:2==n.length&&"run"==n[0]&&"NUKE.exe"==n[1]?(i.hasAdminRights=!0,A("NUKE successful! Gained root access to foodnstuff"),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalManualHack:1==n.length&&"hack"==n[0]?(W.hackFlag=!0,L("Time left:"),M("["),f.a.hack(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalCreateScript:2==n.length&&"nano"==n[0]&&"foodnstuff.script"==n[1]?(s.Engine.loadScriptEditorContent("foodnstuff.script",""),Object(u.c)()):A("Bad command. Please follow the tutorial");case u.e.TerminalFree:1==n.length&&"free"==n[0]&&(W.executeFreeCommand(n),Object(u.c)());break;case u.e.TerminalRunScript:2==n.length&&"run"==n[0]&&"foodnstuff.script"==n[1]?(W.runScript("foodnstuff.script"),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.ActiveScriptsToTerminal:if(2==n.length&&"tail"==n[0]&&"foodnstuff.script"==n[1]){if(null==(ce=Object(v.d)("foodnstuff.script",[],f.a.getCurrentServer())))return void A("Error: No such script exists");Object(x.a)(ce),Object(u.c)()}else A("Bad command. Please follow the tutorial");break;default:return void A("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var p=f.a.getCurrentServer();switch(n[0].toLowerCase()){case"alias":if(1==n.length)return void Object(a.f)();if(2==n.length)if(n[1].startsWith("-g ")){var g=n[1].substring(3);if(Object(a.e)(g,!0))return}else if(Object(a.e)(n[1]))return;A('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!=n.length)return void A("Incorrect usage of analyze command. Usage: analyze");W.analyzeFlag=!0,A("Analyzing system..."),L("Time left:"),M("["),f.a.analyze(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0);break;case"buy":E.a.hasOwnProperty("Darkweb Server")?Object(o.c)(n):A("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":if(2!=n.length)return void A("Incorrect usage of cat command. Usage: cat [file]");if(!(q=n[1]).endsWith(".msg")&&!q.endsWith(".lit")&&!q.endsWith(".txt"))return void A("Error: Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");for(var y=0;yf.a.hacking_skill?A("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):(W.hackFlag=!0,L("Time left:"),M("["),f.a.hack(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0));break;case"help":if(1!=n.length&&2!=n.length)return void A("Incorrect usage of help command. Usage: help");if(1==n.length)A(c.TerminalHelpText);else{var D=n[1],F=c.HelpTexts[D];if(null==F)return void A("Error: No help topics match '"+D+"'");A(F)}break;case"home":if(1!=n.length)return void A("Incorrect usage of home command. Usage: home");f.a.getCurrentServer().isConnectedTo=!1,f.a.currentServer=f.a.getHomeComputer().ip,f.a.getCurrentServer().isConnectedTo=!0,A("Connected to home"),W.resetTerminalInput();break;case"hostname":if(1!=n.length)return void A("Incorrect usage of hostname command. Usage: hostname");A(f.a.getCurrentServer().hostname);break;case"ifconfig":if(1!=n.length)return void A("Incorrect usage of ifconfig command. Usage: ifconfig");A(f.a.getCurrentServer().ip);break;case"kill":if(n.length<2)return void A("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");for(b=(le=n[1].split(" "))[0],w=[],y=1;y=0;--y)Object(m.d)(p.runningScripts[y],p.ip);A("Killing all running scripts. May take up to a few minutes for the scripts to die...");break;case"ls":W.executeListCommand(n);break;case"lscpu":A(f.a.getCurrentServer().cpuCores+" Core(s)");break;case"mem":if(2!=n.length)return void A("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");var H=1;if(-1!=(b=n[1]).indexOf(" -t ")){if(3!=(le=b.split(" ")).length)return void A("Invalid use of run command. Usage: mem [script] [-t] [number threads]");if(H=Math.round(Number(le[2])),isNaN(H)||H<1)return void A("Invalid number of threads specified. Number of threads must be greater than 1");b=le[0]}var G=f.a.getCurrentServer();for(y=0;y');X.includes(".script")||X.includes(".js")||X.includes(".ns")?W.runScript(X):W.runProgram(X)}break;case"scan":W.executeScanCommand(n);break;case"scan-analyze":if(1==n.length)W.executeScanAnalyzeCommand(1);else if(2==n.length){var Q,Z=!1;if(n[1].endsWith("-a")&&(Z=!0,n[1]=n[1].replace("-a","")),Q=0===n[1].length?1:Number(n[1]),isNaN(Q)||Q<0)return void A("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(Q>3&&!f.a.hasProgram(r.a.DeepscanV1.name)&&!f.a.hasProgram(r.a.DeepscanV2.name))return void A("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(Q>5&&!f.a.hasProgram(r.a.DeepscanV2.name))return void A("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(Q>10)return void A("You cannot scan-analyze with that high of a depth. Maximum depth is 10");W.executeScanAnalyzeCommand(Q,Z)}else A("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");break;case"scp":if(2!=n.length)return void A("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");if(2!=(w=n[1].split(" ")).length)return void A("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");var ee=w[0];if(!ee.endsWith(".lit")&&!Object(v.e)(ee)&&!ee.endsWith(".txt"))return void A("Error: scp only works for .script, .txt, and .lit files");var te=Object(_.e)(w[1]);if(null==te)return void A("Invalid destination. "+w[1]+" not found");T=te.ip,G=f.a.getCurrentServer();if(ee.endsWith(".lit")){var ne=!1;for(y=0;ye)){n[s.ip]=1;for(var c=s.serversOnNetwork.length-1;c>=0;--c)a.push(s.getServerOnNetwork(c)),i.push(l+1);if(0!=l){var u=Array(4*(l-1)+1).join("-");f.a.hasProgram(r.a.AutoLink.name)?A(""+u+"> "+s.hostname+""):A(""+u+">"+s.hostname+"");var d=u+"--",h="NO";s.hasAdminRights&&(h="YES"),A(d+"Root Access: "+h+", Required hacking skill: "+s.requiredHackingSkill),A(d+"Number of open ports required to NUKE: "+s.numOpenPortsRequired),A(d+"RAM: "+s.maxRam),A(" ")}}}var p=document.getElementsByClassName("scan-analyze-link");for(c=0;c1?t[0]:e,f.a.hasProgram(n)?W.executeProgram(e):A("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){var t=f.a.getCurrentServer(),n=e.split(" ");n.length>1&&(e=n[0]);const a={};a[r.a.NukeProgram.name]=(e=>{if(!e.hasAdminRights)return e.openPortCount>=f.a.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void A("NUKE successful! Gained root access to "+f.a.getCurrentServer().hostname)):void A("NUKE unsuccessful. Not enough ports have been opened");A("You already have root access to this computer. There is no reason to run NUKE.exe")}),a[r.a.BruteSSHProgram.name]=(e=>{e.sshPortOpen?A("SSH Port (22) is already open!"):(e.sshPortOpen=!0,A("Opened SSH Port(22)!"),e.openPortCount++)}),a[r.a.FTPCrackProgram.name]=(e=>{e.ftpPortOpen?A("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,A("Opened FTP Port (21)!"),e.openPortCount++)}),a[r.a.RelaySMTPProgram.name]=(e=>{e.smtpPortOpen?A("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,A("Opened SMTP Port (25)!"),e.openPortCount++)}),a[r.a.HTTPWormProgram.name]=(e=>{e.httpPortOpen?A("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,A("Opened HTTP Port (80)!"),e.openPortCount++)}),a[r.a.SQLInjectProgram.name]=(e=>{e.sqlPortOpen?A("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,A("Opened SQL Port (1433)!"),e.openPortCount++)}),a[r.a.ServerProfiler.name]=((e,t)=>{if(2!==t.length)return void A("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const n=Object(_.e)(t[1]);null!=n?(A(n.hostname+":"),A("Server base security level: "+n.baseDifficulty),A("Server current security level: "+n.hackDifficulty),A("Server growth rate: "+n.serverGrowth),A("Netscript hack() execution time: "+Object(C.formatNumber)(Object(p.j)(n),1)+"s"),A("Netscript grow() execution time: "+Object(C.formatNumber)(Object(p.h)(n)/1e3,1)+"s"),A("Netscript weaken() execution time: "+Object(C.formatNumber)(Object(p.l)(n)/1e3,1)+"s")):A("Invalid server IP/hostname")}),a[r.a.AutoLink.name]=(()=>{A("This executable cannot be run."),A("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),A("When using scan-analyze, click on a server's hostname to connect to it.")}),a[r.a.DeepscanV1.name]=(()=>{A("This executable cannot be run."),A("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}),a[r.a.DeepscanV2.name]=(()=>{A("This executable cannot be run."),A("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}),a[r.a.Flight.name]=(()=>{if(!(f.a.augmentations.length>=30&&f.a.money.gt(1e11)&&(f.a.hacking_skill>=2500||f.a.strength>=1500&&f.a.defense>=1500&&f.a.dexterity>=1500&&f.a.agility>=1500)))return A("Augmentations: "+f.a.augmentations.length+" / 30"),A("Money: "+y()(f.a.money.toNumber()).format("($0.000a)")+" / "+y()(1e11).format("($0.000a)")),A("One path below must be fulfilled..."),A("----------HACKING PATH----------"),A("Hacking skill: "+f.a.hacking_skill+" / 2500"),A("----------COMBAT PATH----------"),A("Strength: "+f.a.strength+" / 1500"),A("Defense: "+f.a.defense+" / 1500"),A("Dexterity: "+f.a.dexterity+" / 1500"),void A("Agility: "+f.a.agility+" / 1500");A("We will contact you."),A("-- Daedalus --")}),a[r.a.BitFlume.name]=(()=>{const e=Object(I.d)(),t=Object(I.c)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",function(){return Object(b.a)(f.a.bitNodeN,!0),Object(I.a)()}),t.addEventListener("click",function(){return Object(I.a)()}),Object(I.b)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.

Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.")}),a.hasOwnProperty(e)?a[e](t,n):A("Invalid executable. Cannot be run")},runScript:function(e){var t=f.a.getCurrentServer(),n=1,a=[],i=e.split(" ");if(i.length<=0&&A("This is a bug. Please contact developer"),e=i[0],i.length>1)if(i.length>=3&&"-t"==i[1]){if(n=Math.round(Number(i[2])),isNaN(n)||n<1)return void A("Invalid number of threads specified. Number of threads must be greater than 0");for(var r=3;ru)return void A("This machine does not have enough RAM to run this script with "+n+" threads. Script requires "+c+"GB of RAM");A("Running script with "+n+" thread(s) and args: "+Object(T.arrayToString)(a)+"."),A("May take a few seconds to start up the process...");var d=new v.b(l,a);return d.threads=n,t.runningScripts.push(d),void Object(m.c)(d,t)}A("ERROR: No such script")}else A("ERROR: This script is already running. Cannot run multiple instances")}}}).call(this,n(53))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(32),i=n(44);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=a.isString(e)?i.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";(function(e){n.d(t,"a",function(){return V});var a=n(18),i=n(16),r=n(1),o=n(6),s=n(12),l=n(4),c=n(0),u=n(47),d=n(25),h=n(64),p=n(8),m=n(27),g=n(10),y=n(14),f=n.n(y),b=n(43),v=n(46),_=n(59),k=n(3),E=n(36),O=n(42),C=n(2),w=n(5),S=n(55),T=n(20),R=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],x=1e9,I="bladeburner-active-action",P=[],N=0,A={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
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 M(e={}){this.name=e.name?e.name:l.a.Sector12,this.pop=e.pop?e.pop:Object(w.getRandomInt)(8e8,1.2*x),this.popEst=this.pop*(Math.random()+.5),this.comms=e.comms?e.comms:Object(w.getRandomInt)(1,40),this.commsEst=this.comms+Object(w.getRandomInt)(-2,2),this.commsEst<0&&(this.commsEst=0),this.chaos=0}function L(e={name:"foo",desc:"foo"}){if(!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(this.name=e.name,!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");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.weaponAbility&&(this.weaponAbility=e.weaponAbility),e.gunAbility&&(this.gunAbility=e.gunAbility)}e(document).keydown(function(e){if(o.Engine.currentPage===o.Engine.Page.Bladeburner){if(!(c.a.bladeburner instanceof V))return;if(e.keyCode===d.a.ENTER){e.preventDefault();var t=Y.consoleInput.value;t.length>0&&(c.a.bladeburner.postToConsole("> "+t),c.a.bladeburner.resetConsoleInput(),c.a.bladeburner.executeConsoleCommands(t))}if(e.keyCode===d.a.UPARROW){if(null==Y.consoleInput)return;var n=N;if(0===(i=P.length))return;(n<0||n>i)&&(N=i),0!==n&&--N;var a=P[N];Y.consoleInput.value=a,setTimeout(function(){Y.consoleInput.selectionStart=Y.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===d.a.DOWNARROW){if(null==Y.consoleInput)return;var i;n=N;if(0==(i=P.length))return;if((n<0||n>i)&&(N=i),n==i||n==i-1)N=i,Y.consoleInput.value="";else{a=P[++N];Y.consoleInput.value=a}}}}),M.prototype.improvePopulationEstimateByCount=function(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEstthis.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}},M.prototype.changeChaosByCount=function(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))},M.prototype.changeChaosByPercentage=function(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");if(0!==e){var t=this.chaos*(e/100);this.chaos+=t,this.chaos<0&&(this.chaos=0)}},M.prototype.toJSON=function(){return Object(g.Generic_toJSON)("City",this)},M.fromJSON=function(e){return Object(g.Generic_fromJSON)(M,e.data)},g.Reviver.constructors.City=M,L.prototype.calculateCost=function(e){return Math.floor((this.baseCost+e*this.costInc)*i.a.BladeburnerSkillCost)};var B={},j={BladesIntuition:"Blade's Intuition",Reaper:"Reaper",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",Overclock:"Overclock",EvasiveSystem:"Evasive System",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Datamancer:"Datamancer",Tracer:"Tracer",CybersEdge:"Cyber's Edge"};function D(e={}){this.name=e.name?e.name:"",this.desc=e.desc?e.desc:"",this.level=1,this.maxLevel=1,this.autoLevel=!0,this.baseDifficulty=e.baseDifficulty?Object(b.addOffset)(e.baseDifficulty,10):100,this.difficultyFac=e.difficultyFac?e.difficultyFac:1.01,this.rewardFac=e.rewardFac?e.rewardFac:1.02,this.successes=0,this.failures=0,this.rankGain=e.rankGain?e.rankGain:0,e.rankLoss&&(this.rankLoss=e.rankLoss),e.hpLoss&&(this.hpLoss=e.hpLoss,this.hpLost=0),this.isStealth=!!e.isStealth,this.isKill=!!e.isKill,this.count=e.count?e.count:Object(w.getRandomInt)(1e3,25e3),this.countGrowth=e.countGrowth?e.countGrowth:Object(w.getRandomInt)(1,5);this.weights=e.weights?e.weights:{hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7};var t=0;for(var n in this.weights)this.weights.hasOwnProperty(n)&&(t+=this.weights[n]);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(var a in this.decays=e.decays?e.decays:{hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9},this.decays)if(this.decays.hasOwnProperty(a)&&this.decays[a]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}D.prototype.getDifficulty=function(){var e=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(e))throw new Error("Calculated NaN in Action.getDifficulty()");return e},D.prototype.getSuccessChance=function(e,t={}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");var n=this.getDifficulty(),a=0;for(var i in this.weights)if(this.weights.hasOwnProperty(i)){var r=c.a.queryStatFromString(i),o="eff"+i.charAt(0).toUpperCase()+i.slice(1),s=e.skillMultipliers[o];null==s&&(console.log("ERROR: Failed to find Bladeburner Skill multiplier for: "+i),s=1),a+=this.weights[i]*Math.pow(s*r,this.decays[i])}(a*=e.calculateStaminaPenalty(),this instanceof U||this instanceof q)&&(this.teamCount&&this.teamCount>0&&(this.teamCount=Math.min(this.teamCount,e.teamSize),a*=Math.pow(this.teamCount,.05)));if(!(this instanceof q)){var l=e.getCurrentCity();if(t.est?a*=l.popEst/x:a*=l.pop/x,l.chaos>50){var u=l.chaos-50+1;n*=Math.pow(u,.1)}if(this instanceof U&&"Raid"===this.name&&l.comms<=0)return 0}if(a*=e.skillMultipliers.successChanceAll,(this instanceof U||this instanceof q)&&(a*=e.skillMultipliers.successChanceOperation),this instanceof G&&(a*=e.skillMultipliers.successChanceContract),this.isStealth&&(a*=e.skillMultipliers.successChanceStealth),this.isKill&&(a*=e.skillMultipliers.successChanceKill),a*=c.a.bladeburner_success_chance_mult,isNaN(a))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,a/n)},D.prototype.attempt=function(e){return Math.random()=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel},D.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Action",this)},D.fromJSON=function(e){return Object(g.Generic_fromJSON)(D,e.data)},g.Reviver.constructors.Action=D;var F={},H=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7});function W(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function G(e={}){D.call(this,e)}function U(e={}){D.call(this,e),this.reqdRank=e.reqdRank?e.reqdRank:100,this.teamCount=e.teamCount?e.teamCount:0}function q(e={}){U.call(this,e),this.count=1,this.countGrowth=0}W.prototype.toJSON=function(){return Object(g.Generic_toJSON)("ActionIdentifier",this)},W.fromJSON=function(e){return Object(g.Generic_fromJSON)(W,e.data)},g.Reviver.constructors.ActionIdentifier=W,G.prototype=Object.create(D.prototype),G.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Contract",this)},G.fromJSON=function(e){return Object(g.Generic_fromJSON)(G,e.data)},g.Reviver.constructors.Contract=G,U.prototype=Object.create(D.prototype),U.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Operation",this)},U.fromJSON=function(e){return Object(g.Generic_fromJSON)(U,e.data)},g.Reviver.constructors.Operation=U,q.prototype=Object.create(D.prototype),q.prototype.toJSON=function(){return Object(g.Generic_toJSON)("BlackOperation",this)},q.fromJSON=function(e){return Object(g.Generic_fromJSON)(q,e.data)},g.Reviver.constructors.BlackOperation=q;var K={};function V(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.storedCycles=0,this.randomEventCounter=Object(w.getRandomInt)(300,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t,n=H.Idle;this.action=new W({type:n}),this.cities={};for(var a=0;a
Does NOT require stamina."}),F[t="Recruitment"]=new D({name:t,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.

Does NOT require stamina."}),K["Operation Typhoon"]=new q({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.

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}),K["Operation Zero"]=new q({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. It's leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.

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}),K["Operation X"]=new q({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.

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}),K["Operation Titan"]=new q({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.

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}),K["Operation Ares"]=new q({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.

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}),K["Operation Archangel"]=new q({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.

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}),K["Operation Juggernaut"]=new q({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.

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}),K["Operation Red Dragon"]=new q({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.

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}),K["Operation K"]=new q({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.

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 eliminateanyone 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}),K["Operation Deckard"]=new q({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.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}),K["Operation Tyrell"]=new q({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.

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}),K["Operation Wallace"]=new q({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.

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}),K["Operation Shoulder of Orion"]=new q({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.

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}),K["Operation Hyron"]=new q({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.

I do not need to remind you why sentient-level AIs pose a serious thread to all of mankind.

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}),K["Operation Morpheus"]=new q({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.

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}),K["Operation Ion Storm"]=new q({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.

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}),K["Operation Annihilus"]=new q({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}),K["Operation Ultron"]=new q({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.

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.

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).

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}),K["Operation Centurion"]=new q({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

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.

It seems that the universe is not without a sense of irony.

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}}),K["Operation Vindictus"]=new q({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.

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}}),K["Operation Daedalus"]=new q({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}}),this.initializeDomElementRefs(),e.new&&this.create()}V.prototype.prestige=function(){this.resetAction();var e=s.b.Bladeburners;this.rank>=25&&Object(s.h)(e)},V.prototype.create=function(){this.contracts.Tracking=new G({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

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:Object(w.getRandomInt)(300,800),countGrowth:Object(w.getRandomInt)(1,5),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 G({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

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:Object(w.getRandomInt)(200,750),countGrowth:Object(w.getRandomInt)(1,3),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 G({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.

Successfully copmleting 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:Object(w.getRandomInt)(300,900),countGrowth:Object(w.getRandomInt)(1,4),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 U({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.

Successful Investigation ops will increase the accuracy of your synthoid data.

You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2,rankLoss:.2,count:Object(w.getRandomInt)(50,400),countGrowth:1,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 U({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.

Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4,rankLoss:.4,hpLoss:2,count:Object(w.getRandomInt)(50,300),countGrowth:1,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 U({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,rankLoss:.5,hpLoss:2.5,count:Object(w.getRandomInt)(25,400),countGrowth:.75,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 U({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:50,rankLoss:2.5,hpLoss:50,count:Object(w.getRandomInt)(25,150),countGrowth:.2,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 U({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:20,rankLoss:2,hpLoss:10,count:Object(w.getRandomInt)(25,250),countGrowth:.1,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 U({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:40,rankLoss:4,hpLoss:5,count:Object(w.getRandomInt)(25,200),countGrowth:.1,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})},V.prototype.storeCycles=function(e=1){this.storedCycles+=e},V.prototype.process=function(){if(!1===u.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(u.a)(c.a.bitNodeN);if(!1===a.c[a.b.BladesSimulacrum].owned&&c.a.isWorking&&(this.action.type!==H.Idle&&Object(p.dialogBoxCreate)("Your Bladeburner action was cancelled because you started doing something else"),this.resetAction()),this.storedCycles>=5){var e=Math.floor(this.storedCycles/5);for(var t in e=Math.min(e,5),this.storedCycles-=5*e,this.calculateMaxStamina(),this.stamina+=this.calculateStaminaGainPerSecond()*e,this.stamina=Math.min(this.maxStamina,this.stamina),this.contracts)if(this.contracts.hasOwnProperty(t)){var n=this.contracts[t];n.count+=e*n.countGrowth/300}for(var i in this.operations)if(this.operations.hasOwnProperty(i)){var r=this.operations[i];r.count+=e*r.countGrowth/300}for(var s=0;s=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=this.automateActionHigh,this.startAction(this.action)))),o.Engine.currentPage===o.Engine.Page.Bladeburner&&this.updateContent()}},V.prototype.calculateMaxStamina=function(){var e=c.a.agility*this.skillMultipliers.effAgi,t=Math.pow(e,.8)+this.staminaBonus;if(t*=this.skillMultipliers.stamina,t*=c.a.bladeburner_max_stamina_mult,isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");this.maxStamina=t},V.prototype.calculateStaminaGainPerSecond=function(){var e=c.a.agility*this.skillMultipliers.effAgi;return(.0085+this.maxStamina/7e4)*Math.pow(e,.17)*(this.skillMultipliers.stamina*c.a.bladeburner_stamina_gain_mult)},V.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},V.prototype.changeRank=function(e){if(isNaN(e))throw new Error("NaN passed into Bladeburner.changeRank()");this.rank+=e,this.rank<0&&(this.rank=0),this.maxRank=Math.max(this.rank,this.maxRank);if(Object(s.d)("Bladeburners")){var t=s.b.Bladeburners;if(!(t instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");if(t.isMember){var n=1+t.favor/100;t.playerReputation+=2*e*c.a.faction_rep_mult*n}}var a=4*(this.totalSkillPoints+1);if(this.maxRank>=a){var i=Math.floor((this.maxRank-a)/4+1);this.skillPoints+=i,this.totalSkillPoints+=i}},V.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof M))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},V.prototype.resetSkillMultipliers=function(){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,weaponAbility:1,gunAbility:1}},V.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=B[e];if(null==t)throw new Error("Could not find Skill Object for: "+e);var n=this.skills[e];if(null==n||n<=0)continue;for(var a=Object.keys(this.skillMultipliers),i=0;i=this.actionTimeToComplete?this.completeAction():void 0}},V.prototype.completeAction=function(){switch(this.action.type){case H.Contract:case H.Operation:try{var e=this.action.type===H.Operation;if(null==(m=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=m.getDifficulty(),n=Math.pow(t,.28)+t/650,a=Math.pow(m.rewardFac,m.level-1);if(this.stamina-=.285*n,this.stamina<0&&(this.stamina=0),m.attempt(this)){this.gainActionStats(m,!0),++m.successes,--m.count;var s=0;if(e||(s=4e4*a,c.a.gainMoney(s)),e?m.setMaxLevel(2.5):m.setMaxLevel(3),m.rankGain){var l=Object(b.addOffset)(m.rankGain*a*i.a.BladeburnerRank,10);this.changeRank(l),e&&this.logging.ops?this.log(m.name+" successfully completed! Gained "+Object(C.formatNumber)(l,3)+" rank"):!e&&this.logging.contracts&&this.log(m.name+" contract successfully completed! Gained "+Object(C.formatNumber)(l,3)+" rank and "+f()(s).format("$0.000a"))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(m,!1),++m.failures;var d=0,h=0;m.rankLoss&&(d=Object(b.addOffset)(m.rankLoss*a,10),this.changeRank(-1*d)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(b.addOffset)(h,10)),this.hpLost+=h,c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp));var p="";d>0&&(p+="Lost "+Object(C.formatNumber)(d,3)+" rank."),h>0&&(p+="Took "+Object(C.formatNumber)(h,0)+" damage."),e&&this.logging.ops?this.log(m.name+" failed! "+p):!e&&this.logging.contracts&&this.log(m.name+" contract failed! "+p),e?this.completeOperation(!1):this.completeContract(!1)}m.autoLevel&&(m.level=m.maxLevel),this.startAction(this.action)}catch(e){Object(O.a)(e)}break;case H.BlackOp:case H.BlackOperation:try{var m;if(null==(m=this.getActionObject(this.action))||!(m instanceof q))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=m.getDifficulty(),n=Math.pow(t,.28)+t/650;this.stamina-=.285*n,this.stamina<0&&(this.stamina=0);var g,y=m.teamCount;if(m.attempt(this)){this.gainActionStats(m,!0),m.count=0,this.blackops[m.name]=!0;var v=0;if(m.rankGain&&(v=Object(b.addOffset)(m.rankGain*i.a.BladeburnerRank,10),this.changeRank(v)),g=Math.ceil(y/2),"Operation Daedalus"===m.name)return this.resetAction(),Object(u.a)(c.a.bitNodeN);o.Engine.currentPage===o.Engine.Page.Bladeburner&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(m.name+" successful! Gained "+Object(C.formatNumber)(v,1)+" rank")}else{this.gainActionStats(m,!1);var _=0;h=0;m.rankLoss&&(_=Object(b.addOffset)(m.rankLoss,10),this.changeRank(-1*_)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(b.addOffset)(h,10)),c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp)),g=Math.floor(y),this.logging.blackops&&this.log(m.name+" failed! Lost "+Object(C.formatNumber)(_,1)+" rank and took "+Object(C.formatNumber)(h,0)+" damage")}if(this.resetAction(),y>=1){var k=Object(w.getRandomInt)(1,g);this.teamSize-=k,this.teamLost+=k,this.logging.blackops&&this.log("You lost "+Object(C.formatNumber)(k,0)+" team members during "+m.name)}}catch(e){Object(O.a)(e)}break;case H.Training:this.stamina-=.1425;var E=30*c.a.strength_exp_mult,S=30*c.a.defense_exp_mult,T=30*c.a.dexterity_exp_mult,R=30*c.a.agility_exp_mult,x=.04*this.skillMultipliers.stamina;c.a.gainStrengthExp(E),c.a.gainDefenseExp(S),c.a.gainDexterityExp(T),c.a.gainAgilityExp(R),this.staminaBonus+=x,this.logging.general&&this.log("Training completed. Gained: "+Object(C.formatNumber)(E,1)+" str exp, "+Object(C.formatNumber)(S,1)+" def exp, "+Object(C.formatNumber)(T,1)+" dex exp, "+Object(C.formatNumber)(R,1)+" agi exp, "+Object(C.formatNumber)(x,3)+" max stamina"),this.startAction(this.action);break;case H.FieldAnalysis:case H["Field Analysis"]:var I=.04*Math.pow(c.a.hacking_skill,.3)+.04*Math.pow(c.a.intelligence,.9)+.02*Math.pow(c.a.charisma,.3);if(I*=c.a.bladeburner_analysis_mult,isNaN(I)||I<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var P=20*c.a.hacking_exp_mult,N=20*c.a.charisma_exp_mult;c.a.gainHackingExp(P),c.a.gainIntelligenceExp(.001),c.a.gainCharismaExp(N),this.changeRank(.1),console.log("DEBUG: Field Analysis effectiveness is "+I*this.skillMultipliers.successChanceEstimate),this.getCurrentCity().improvePopulationEstimateByPercentage(I*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(C.formatNumber)(P,1)+" hacking exp, and "+Object(C.formatNumber)(N,1)+" charisma exp"),this.startAction(this.action);break;case H.Recruitment:var A=this.getRecruitmentSuccessChance();if(console.log("Bladeburner recruitment success chance: "+A),Math.random()=1){n=e?Math.ceil(a/2):Math.floor(a);var i=Object(w.getRandomInt)(0,n);this.teamSize-=i,this.teamLost+=i,this.logging.ops&&i>0&&this.log("Lost "+Object(C.formatNumber)(i,0)+" team members during this "+t.name)}var r=this.getCurrentCity();switch(t.name){case"Investigation":e?(r.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(r.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&r.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByCount(.1);break;case"Raid":if(e)r.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--r.comms,--r.commsEst;else{var o=Object(w.getRandomInt)(-3,-1);r.changePopulationByPercentage(o,{nonZero:!0})}r.changeChaosByPercentage(Object(w.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&r.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByPercentage(Object(w.getRandomInt)(-3,-1));break;case"Assassination":e&&r.changePopulationByCount(-1,{estChange:-1}),r.changeChaosByPercentage(Object(w.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},V.prototype.getRecruitmentTime=function(){var e=c.a.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(300-t))},V.prototype.getRecruitmentSuccessChance=function(){return Math.pow(c.a.charisma,.45)/(this.teamSize+1)},V.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),a=Math.pow(n,.28)+n/650,i=this.actionTimeToComplete,r=t?1:.5,o=1*i*r*a,s=.001*i*r*a;c.a.gainHackingExp(o*e.weights.hack*c.a.hacking_exp_mult),c.a.gainStrengthExp(o*e.weights.str*c.a.strength_exp_mult),c.a.gainDefenseExp(o*e.weights.def*c.a.defense_exp_mult),c.a.gainDexterityExp(o*e.weights.dex*c.a.dexterity_exp_mult),c.a.gainAgilityExp(o*e.weights.agi*c.a.agility_exp_mult),c.a.gainCharismaExp(o*e.weights.cha*c.a.charisma_exp_mult),c.a.gainIntelligenceExp(s*e.weights.int)},V.prototype.randomEvent=function(){var e=Math.random(),t=R[Object(w.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof M))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var a=R[Object(w.getRandomInt)(0,5)];a===t;)a=R[Object(w.getRandomInt)(0,5)];var i=this.cities[a];if(!(n instanceof M&&i instanceof M))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,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;r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++i.comms;r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop-=o,i.pop+=o,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){r=Object(w.getRandomInt)(8,24)/100,o=Math.round(n.pop*r);n.pop+=o,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+Object(w.getRandomInt)(5,10)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){r=Object(w.getRandomInt)(5,20)/100,o=Math.round(n.pop*r);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},V.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.log("ERROR: Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()0&&(r*=Object(w.getRandomInt)(2,4),--a.comms,++n.comms);var o=Math.round(a.pop*r);a.pop-=o,n.pop+=o};var Y={};V.prototype.initializeDomElementRefs=function(){Y={bladeburnerDiv:null,overviewConsoleParentDiv:null,overviewDiv:null,actionAndSkillsDiv:null,currentTab:null,consoleDiv:null,consoleTable:null,consoleInputRow:null,consoleInputCell:null,consoleInputHeader:null,consoleInput:null,overviewRank:null,overviewStamina:null,overviewStaminaHelpTip:null,overviewGen1:null,overviewEstPop:null,overviewEstPopHelpTip:null,overviewEstComms:null,overviewChaos:null,overviewSkillPoints:null,overviewBonusTime:null,overviewAugSuccessMult:null,overviewAugMaxStaminaMult:null,overviewAugStaminaGainMult:null,overviewAugAnalysisMult:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},V.prototype.createContent=function(){Y.bladeburnerDiv=Object(k.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),Y.overviewConsoleParentDiv=Object(k.createElement)("div",{height:"60%",display:"block",position:"relative"}),Y.overviewDiv=Object(k.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),Y.actionAndSkillsDiv=Object(k.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),Y.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),Y.consoleDiv=Object(k.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(Y.consoleInput instanceof Element&&Y.consoleInput.focus(),!1)}),Y.consoleTable=Object(k.createElement)("table",{class:"bladeburner-console-table"}),Y.consoleInputRow=Object(k.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),Y.consoleInputCell=Object(k.createElement)("td",{class:"bladeburner-console-input-cell"}),Y.consoleInputHeader=Object(k.createElement)("pre",{innerText:"> "}),Y.consoleInput=Object(k.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{Y.consoleInput.value=Y.consoleInput.value}}),Y.consoleInputCell.appendChild(Y.consoleInputHeader),Y.consoleInputCell.appendChild(Y.consoleInput),Y.consoleInputRow.appendChild(Y.consoleInputCell),Y.consoleTable.appendChild(Y.consoleInputRow),Y.consoleDiv.appendChild(Y.consoleTable),Y.overviewConsoleParentDiv.appendChild(Y.overviewDiv),Y.overviewConsoleParentDiv.appendChild(Y.consoleDiv),Y.bladeburnerDiv.appendChild(Y.overviewConsoleParentDiv),Y.bladeburnerDiv.appendChild(Y.actionAndSkillsDiv),document.getElementById("entire-game-container").appendChild(Y.bladeburnerDiv),this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands"),Y.consoleInput.focus()},V.prototype.clearContent=function(){Y.bladeburnerDiv instanceof Element&&(Object(m.removeChildrenFromElement)(Y.bladeburnerDiv),Object(S.removeElement)(Y.bladeburnerDiv)),Object(_.clearObject)(Y),this.initializeDomElementRefs()},V.prototype.createOverviewContent=function(){if(null==Y.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");Y.overviewRank=Object(k.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),Y.overviewStamina=Object(k.createElement)("p",{display:"inline-block"}),Y.overviewStaminaHelpTip=Object(k.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(p.dialogBoxCreate)("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.

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).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),Y.overviewGen1=Object(k.createElement)("p",{display:"block"}),Y.overviewEstPop=Object(k.createElement)("p",{innerText:"Est. Synthoid Population: ",display:"inline-block",tooltip:"This is your Bladeburner division's estimate of how many Synthoids exist in your current city."}),Y.overviewEstPopHelpTip=Object(k.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(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.

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.

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.")}}),Y.overviewEstComms=Object(k.createElement)("p",{innerText:"Est. Synthoid Communities: ",display:"inline-block",tooltip:"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city."}),Y.overviewChaos=Object(k.createElement)("p",{innerText:"City Chaos: ",display:"inline-block",tooltip:"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."}),Y.overviewBonusTime=Object(k.createElement)("p",{innerText:"Bonus time: ",display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed."}),Y.overviewSkillPoints=Object(k.createElement)("p",{display:"block"}),Y.overviewAugSuccessMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugMaxStaminaMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugStaminaGainMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugAnalysisMult=Object(k.createElement)("p",{display:"block"}),Y.overviewDiv.appendChild(Y.overviewRank),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewStamina),Y.overviewDiv.appendChild(Y.overviewStaminaHelpTip),Y.overviewDiv.appendChild(Y.overviewGen1),Y.overviewDiv.appendChild(Y.overviewEstPop),Y.overviewDiv.appendChild(Y.overviewEstPopHelpTip),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewEstComms),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewChaos),Object(v.appendLineBreaks)(Y.overviewDiv,2),Y.overviewDiv.appendChild(Y.overviewBonusTime),Y.overviewDiv.appendChild(Y.overviewSkillPoints),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewAugSuccessMult),Y.overviewDiv.appendChild(Y.overviewAugMaxStaminaMult),Y.overviewDiv.appendChild(Y.overviewAugStaminaGainMult),Y.overviewDiv.appendChild(Y.overviewAugAnalysisMult),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Object(k.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(e),!1)})),t.push(Object(k.createElement)("p",{innerText:"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"}));for(var n=0;n(n.city=R[a],Object(T.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(E.createPopup)(e,t)}}));if(Object(s.d)("Bladeburners")){var e=s.b.Bladeburners;if(!(e instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");Y.overviewDiv.appendChild(Object(k.createElement)("a",{innerText:"Faction",class:"a-link-button",display:"inline-block",tooltip:"Apply to the Bladeburner Faction, or go to the faction page if you are already a member",clickListener:()=>(e.isMember?(o.Engine.loadFactionContent(),Object(s.c)("Bladeburners")):this.rank>=25?(Object(s.h)(e),Object(p.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(m.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()):Object(p.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}Y.overviewDiv.appendChild(Object(k.createElement)("br")),Y.overviewDiv.appendChild(Object(k.createElement)("br")),this.updateOverviewContent()},V.prototype.createActionAndSkillsContent=function(){null==Y.currentTab&&(Y.currentTab="general"),Object(m.removeChildrenFromElement)(Y.actionAndSkillsDiv),Object(_.clearObject)(Y.generalActions),Object(_.clearObject)(Y.contracts),Object(_.clearObject)(Y.operations),Object(_.clearObject)(Y.blackops),Object(_.clearObject)(Y.skills);for(var e=Y.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n(Y.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(Y.actionsAndSkillsDesc=Object(k.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(m.removeChildrenFromElement)(Y.actionsAndSkillsList),Y.actionsAndSkillsList=Object(k.createElement)("ul"),e){case"general":this.createGeneralActionsContent();break;case"contracts":this.createContractsContent();break;case"operations":this.createOperationsContent();break;case"blackops":this.createBlackOpsContent();break;case"skills":this.createSkillsContent();break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}this.updateContent(),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsDesc),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsList)},V.prototype.createGeneralActionsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",F)F.hasOwnProperty(e)&&(Y.generalActions[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.generalActions[e]))},V.prototype.createContractsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="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.

You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.",this.contracts)this.contracts.hasOwnProperty(e)&&(Y.contracts[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.contracts[e]))},V.prototype.createOperationsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="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.

Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.

For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.

You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.",this.operations)this.operations.hasOwnProperty(e)&&(Y.operations[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.operations[e]))},V.prototype.createBlackOpsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");Y.actionsAndSkillsDesc.innerHTML="Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.

Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.";var e=[];for(var t in K)K.hasOwnProperty(t)&&e.push(K[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=0;n
Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.

";for(var e=Object.keys(this.skillMultipliers),t=0;t";break;case"successChanceStealth":Y.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"
";break;case"successChanceKill":Y.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"
";break;case"successChanceContract":Y.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"
";break;case"successChanceOperation":Y.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"
";break;case"successChanceEstimate":Y.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"
";break;case"actionTime":Y.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"
";break;case"effHack":Y.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"
";break;case"effStr":Y.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"
";break;case"effDef":Y.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"
";break;case"effDex":Y.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"
";break;case"effAgi":Y.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"
";break;case"effCha":Y.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"
";break;case"effInt":Y.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"
";break;case"stamina":Y.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"
";break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+e[t])}}for(var a in Y.skillPointsDisplay=Object(k.createElement)("p",{innerHTML:"
Skill Points: "+Object(C.formatNumber)(this.skillPoints,0)+""}),Y.actionAndSkillsDiv.appendChild(Y.skillPointsDisplay),B)B.hasOwnProperty(a)&&(Y.skills[a]=Object(k.createElement)("div",{class:"bladeburner-action",name:a}),Y.actionsAndSkillsList.appendChild(Y.skills[a]))},V.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},V.prototype.updateOverviewContent=function(){o.Engine.currentPage===o.Engine.Page.Bladeburner&&(Y.overviewRank.childNodes[0].nodeValue="Rank: "+Object(C.formatNumber)(this.rank,2),Y.overviewStamina.innerText="Stamina: "+Object(C.formatNumber)(this.stamina,3)+" / "+Object(C.formatNumber)(this.maxStamina,3),Y.overviewGen1.innerHTML="Stamina Penalty: "+Object(C.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%

Team Size: "+Object(C.formatNumber)(this.teamSize,0)+"
Team Members Lost: "+Object(C.formatNumber)(this.teamLost,0)+"

Num Times Hospitalized: "+this.numHosp+"
Money Lost From Hospitalizations: "+f()(this.moneyLost).format("$0.000a")+"

Current City: "+this.city+"
",Y.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+f()(this.getCurrentCity().popEst).format("0.000a"),Y.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(C.formatNumber)(this.getCurrentCity().comms,0),Y.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(C.formatNumber)(this.getCurrentCity().chaos),Y.overviewSkillPoints.innerText="Skill Points: "+Object(C.formatNumber)(this.skillPoints,0),Y.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+this.storedCycles/5,Y.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_success_chance_mult,1)+"%",Y.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_max_stamina_mult,1)+"%",Y.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_stamina_gain_mult,1)+"%",Y.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_analysis_mult,1)+"%")},V.prototype.updateActionAndSkillsContent=function(){switch(null==Y.currentTab&&(Y.currentTab="general"),Y.currentTab.toLowerCase()){case"general":for(var e=Object.keys(Y.generalActions),t=0;t";var m=Object.keys(Y.skills);for(t=0;t(this.action.type=H[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},V.prototype.updateContractsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:i})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=H.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3)+" successes needed for next level"})),e.appendChild(Object(k.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)})),e.appendChild(Object(k.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)}));var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*a,1)+"%\nTime Required (s): "+Object(C.formatNumber)(o,0)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(k.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(k.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase contract level when possible"}));var l=Object(k.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateOperationsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:i})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=H.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(k.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(k.createElement)("p",{innerText:"Enter the amount of team members you would like to take on these operations. 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."}),i=Object(k.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(k.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(p.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateOperationsUIElement(e,t)),Object(T.removeElementById)(n),!1}}),o=Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(n),!1)});Object(E.createPopup)(n,[a,i,r,o])}}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(2.5)+" successes needed for next level"})),e.appendChild(Object(k.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)})),e.appendChild(Object(k.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)}));t.getDifficulty();var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*a,1)+"%\nTime Required(s): "+Object(C.formatNumber)(o,1)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(k.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(k.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase operation level when possible"}));var l=Object(k.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateBlackOpsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=null!=this.blackops[t.name],i=t.getSuccessChance(this,{est:!0}),r=(t.getDifficulty(),t.getActionTime(this)),o=this.rank>=t.reqdRank;if(a)e.appendChild(Object(k.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var s=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:s})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=H.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(k.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(k.createElement)("p",{innerText:"Enter the amount of team members you would like to take on this BlackOp. 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."}),i=Object(k.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(k.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(p.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateBlackOpsUIElement(e,t)),Object(T.removeElementById)(n),!1}}),o=Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(n),!1)});Object(E.createPopup)(n,[a,i,r,o])}}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("p",{display:"inline-block",innerHTML:"
"+t.desc+"

"})),e.appendChild(Object(k.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(C.formatNumber)(t.reqdRank,0)+"
"})),e.appendChild(Object(k.createElement)("p",{display:"inline-block",innerHTML:"Estimated Success Chance: "+Object(C.formatNumber)(100*i,1)+"%\nTime Required(s): "+Object(C.formatNumber)(r,1)}))}},V.prototype.updateSkillsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=t.name,a=0;this.skills[n]&&!isNaN(this.skills[n])&&(a=this.skills[n]);var i=t.calculateCost(a);e.appendChild(Object(k.createElement)("h2",{innerText:t.name+" (Lvl "+a+")",display:"inline-block"}));var r=this.skillPoints>=i,o=!!t.maxLvl&&a>=t.maxLvl;e.appendChild(Object(k.createElement)("a",{innerText:"Level",display:"inline-block",class:r&&!o?"a-link-button":"a-link-button-inactive",margin:"3px",padding:"3px",clickListener:()=>{if(!(this.skillPoints'+t+""),Y.consoleTable.childNodes.length>200&&Y.consoleTable.removeChild(Y.consoleTable.firstChild),this.updateConsoleScroll())},V.prototype.updateConsoleScroll=function(){Y.consoleDiv.scrollTop=Y.consoleDiv.scrollHeight},V.prototype.resetConsoleInput=function(){Y.consoleInput.value=""},V.prototype.clearConsole=function(){for(;Y.consoleTable.childNodes.length>1;)Y.consoleTable.removeChild(Y.consoleTable.firstChild)},V.prototype.log=function(e){var t=new Date,n=t.getMonth()+"/"+t.getDay()+" "+t.getHours()+":"+t.getMinutes();this.postToConsole("["+n+"] "+e)},V.prototype.executeConsoleCommands=function(e){try{P[P.length-1]!=e&&(P.push(e),P.length>50&&P.splice(0,1)),N=P.length;for(var t=e.split(";"),n=0;n"))}},V.prototype.executeLogConsoleCommand=function(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");var 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]")}},V.prototype.executeSkillConsoleCommand=function(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: ");for(var t=Object.keys(B),n=0;n=c?(this.skillPoints-=c,this.upgradeSkill(a),this.log(a.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(C.formatNumber)(c,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")}},V.prototype.executeStartConsoleCommand=function(e){if(3!==e.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");var t=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=F[t]?(this.action.type=H[t],this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid action name specified: "+e[2]);break;case"contract":case"contracts":null!=this.contracts[t]?(this.action.type=H.Contract,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid contract name specified: "+e[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[t]?(this.action.type=H.Operation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid Operation name specified: "+e[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=K[t]?(this.action.type=H.BlackOperation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid BlackOp name specified: "+e[2]);break;default:this.postToConsole("Invalid action/event type specified: "+e[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}},V.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new W,a=e.toLowerCase().trim(),i=t.toLowerCase().trim();switch(a){case"contract":case"contracts":case"contr":return n.type=H.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=H.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=H.BlackOp,K.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(a.startsWith("gen")){switch(i){case"training":n.type=H.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=H.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=H["Field Analysis"],n.name="Field Analysis";break;default:return null}return n}},V.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(H);for(let a=0;a=a.maxLvl?(t.shouldLog("upgradeSkill")&&t.log(`bladeburner.upgradeSkill() failed because ${e} is already maxed`),!1):this.skillPoints=25?(Object(s.h)(t),e.shouldLog("joinBladeburnerFaction")&&e.log("Joined Bladeburners Faction"),o.Engine.currentPage===o.Engine.Page.Bladeburner&&(Object(m.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()),!0):(e.shouldLog("joinBladeburnerFaction")&&e.log("Failed to join Bladeburners Faction because you do not have the required 25 rank"),!1))},V.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Bladeburner",this)},V.fromJSON=function(e){return Object(g.Generic_fromJSON)(V,e.data)},g.Reviver.constructors.Bladeburner=V}).call(this,n(53))},function(e,t,n){"use strict";n.d(t,"e",function(){return s}),n.d(t,"d",function(){return u}),n.d(t,"c",function(){return h}),n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var a=n(6),i=n(0),r=n(8),o=n(13);let s={Start:"Start",GoToCharacterPage:"Click on the Character page menu link",CharacterPage:"Introduction to Character page",CharacterGoToTerminalPage:"Click on the Terminal link",TerminalIntro:"Introduction to terminal interface",TerminalHelp:"Using the help command to display all options in terminal",TerminalLs:"Use the ls command to show all programs/scripts. Right now we have NUKE.exe",TerminalScan:"Using the scan command to display all available connections",TerminalScanAnalyze1:"Use the scan-analyze command to show hacking related information",TerminalScanAnalyze2:"Use the scan-analyze command with a depth of 3",TerminalConnect:"Using the telnet/connect command to connect to another server",TerminalAnalyze:"Use the analyze command to display details about this server",TerminalNuke:"Use the NUKE Program to gain root access to a server",TerminalManualHack:"Use the hack command to manually hack a server",TerminalHackingMechanics:"Briefly explain hacking mechanics",TerminalCreateScript:"Create a script using nano",TerminalTypeScript:"This occurs in the Script Editor page...type the script then save and close",TerminalFree:"Use the free command to check RAM",TerminalRunScript:"Use the run command to run a script",TerminalGoToActiveScriptsPage:"Go to the ActiveScriptsPage",ActiveScriptsPage:"Introduction to the Active Scripts Page",ActiveScriptsToTerminal:"Go from Active Scripts Page Back to Terminal",TerminalTailScript:"Use the tail command to show a script's logs",GoToHacknetNodesPage:"Go to the Hacknet Nodes page",HacknetNodesIntroduction:"Introduction to Hacknet Nodesm and have user purchase one",HacknetNodesGoToWorldPage:"Go to the world page",WorldDescription:"Tell the user to explore..theres a lot of different stuff to do out there",TutorialPageInfo:"The tutorial page contains a lot of info on different subjects",End:"End"};var l=s.Start,c=!1;function u(){a.Engine.Counters.autoSaveCounter=999e9,console.log("Interactive Tutorial started"),l=s.Start,c=!0,document.getElementById("interactive-tutorial-container").style.display="block",d(),Object(o.clearEventListeners)("interactive-tutorial-exit").addEventListener("click",function(){return p(),!1});var e=Object(o.clearEventListeners)("interactive-tutorial-back");e.style.display="none",e.addEventListener("click",function(){return function(){switch(l){case s.Start:case s.GoToCharacterPage:l=s.Start,d();break;case s.CharacterPage:l=s.GoToCharacterPage,d();break;case s.CharacterGoToTerminalPage:l=s.CharacterPage,d();break;case s.TerminalIntro:l=s.CharacterGoToTerminalPage,d();break;case s.TerminalHelp:l=s.TerminalIntro,d();break;case s.TerminalLs:l=s.TerminalHelp,d();break;case s.TerminalScan:l=s.TerminalLs,d();break;case s.TerminalConnect:l=s.TerminalScan,d();break;case s.TerminalAnalyze:l=s.TerminalConnect,d();break;case s.TerminalNuke:l=s.TerminalAnalyze,d();break;case s.TerminalManualHack:l=s.TerminalNuke,d();break;case s.TerminalHackingMechanics:case s.TerminalCreateScript:l=s.TerminalManualHack,d();break;case s.TerminalTypeScript:l=s.TerminalCreateScript,d();break;case s.TerminalFree:l=s.TerminalTypeScript,d();break;case s.TerminalRunScript:l=s.TerminalFree,d();break;case s.TerminalGoToActiveScriptsPage:l=s.TerminalRunScript,d();break;case s.ActiveScriptsPage:l=s.TerminalGoToActiveScriptsPage,d();break;case s.ActiveScriptsToTerminal:l=s.ActiveScriptsPage,d();break;case s.TerminalTailScript:l=s.ActiveScriptsToTerminal,d();break;case s.GoToHacknetNodesPage:l=s.TerminalTailScript,d();break;case s.HacknetNodesIntroduction:l=s.GoToHacknetNodesPage,d();break;case s.HacknetNodesGoToWorldPage:l=s.HacknetNodesIntroduction,d();break;case s.WorldDescription:l=s.HacknetNodesGoToWorldPage,d();break;case s.TutorialPageInfo:l=s.WorldDescription,d();break;case s.End:break;default:throw new Error("Invalid tutorial step")}}(),!1})}function d(){if(c)switch(l){case s.Start:a.Engine.loadTerminalContent(),m("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...

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

Let's try another command. Enter the 'ls' command");break;case s.TerminalScan:m("'ls' is a basic command that shows all of the contents (programs/scripts) on the computer. Right now, it shows that you have a program called 'NUKE.exe' on your computer. We'll get to what this does later.

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

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

It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'.");break;case s.TerminalConnect:m("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the 'connect [ip/hostname]' command. You can type in the ip or the hostname, but dont use both.

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

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

Before you try to hack a server, you should run diagnostics using the 'analyze' command");break;case s.TerminalNuke:m("When the 'analyze' command finishes running it will show useful information about hacking the server.

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

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

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

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

To create a new script or edit an existing one, you can use the 'nano' command. Scripts must end with the '.script' extension. Let's make a script now by entering 'nano foodnstuff.script' after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none";break;case s.TerminalTypeScript:m("This is the script editor. You can use it to program your scripts. Scripts are written in the Netscript language, a programming language created for this game. There are details about the Netscript language in the documentation, which can be accessed in the 'Tutorial' tab on the main navigation menu. I highly suggest you check it out after this tutorial. For now, just copy and paste the following code into the script editor:

while(true) {
  hack('foodnstuff');
}

For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.

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

To check how much RAM is available on this machine, enter the 'free' command.");break;case s.TerminalRunScript:m("We have 16GB of free RAM on this machine, which is enough to run our script. Let's run our script using 'run foodnstuff.script'.");break;case s.TerminalGoToActiveScriptsPage:m("Your script is now running! The script might take a few seconds to 'fully start up'. Your scripts will continuously run in the background and will automatically stop if the code ever completes (the 'foodnstuff.script' will never complete because it runs an infinite loop).

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

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

This pretty much covers the basics of hacking. To learn more about writing scripts using the Netscript language, select the 'Tutorial' link in the main navigation menu to look at the documentation. For now, let's move on to something else!"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.addEventListener("click",function(){return h(),!1});break;case s.GoToHacknetNodesPage:m("Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and upgrading Hacknet Nodes. Let's go to the 'Hacknet Nodes' page through the main navigation menu now."),document.getElementById("hacknet-nodes-menu-link").setAttribute("class","flashing-button");var e=Object(o.clearEventListeners)("hacknet-nodes-menu-link");(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none",e.addEventListener("click",function(){return a.Engine.loadHacknetNodesContent(),h(),Object(o.clearEventListeners)("hacknet-nodes-menu-link"),!1});break;case s.HacknetNodesIntroduction:m("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.");break;case s.HacknetNodesGoToWorldPage:m("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.

Let's go to the 'City' page through the main navigation menu."),document.getElementById("city-menu-link").setAttribute("class","flashing-button"),Object(o.clearEventListeners)("city-menu-link").addEventListener("click",function(){return a.Engine.loadWorldContent(),h(),Object(o.clearEventListeners)("city-menu-link"),!1});break;case s.WorldDescription:m("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!

Lastly, click on the 'Tutorial' link in the main navigation menu."),document.getElementById("tutorial-menu-link").setAttribute("class","flashing-button"),Object(o.clearEventListeners)("tutorial-menu-link").addEventListener("click",function(){return a.Engine.loadTutorialContent(),h(),Object(o.clearEventListeners)("tutorial-menu-link"),!1});break;case s.TutorialPageInfo:var t;m("This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing. That's the end of the tutorial. Hope you enjoy the game!"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.innerHTML="Finish Tutorial",Object(o.clearEventListeners)("interactive-tutorial-back").style.display="none",t.addEventListener("click",function(){return h(),!1});break;case s.End:p();break;default:throw new Error("Invalid tutorial step")}else console.log("Interactive Tutorial not running")}function h(){switch(l){case s.Start:l=s.GoToCharacterPage,d();break;case s.GoToCharacterPage:document.getElementById("stats-menu-link").removeAttribute("class"),l=s.CharacterPage,d();break;case s.CharacterPage:l=s.CharacterGoToTerminalPage,d();break;case s.CharacterGoToTerminalPage:document.getElementById("terminal-menu-link").removeAttribute("class"),l=s.TerminalIntro,d();break;case s.TerminalIntro:l=s.TerminalHelp,d();break;case s.TerminalHelp:l=s.TerminalLs,d();break;case s.TerminalLs:l=s.TerminalScan,d();break;case s.TerminalScan:l=s.TerminalScanAnalyze1,d();break;case s.TerminalScanAnalyze1:l=s.TerminalScanAnalyze2,d();break;case s.TerminalScanAnalyze2:l=s.TerminalConnect,d();break;case s.TerminalConnect:l=s.TerminalAnalyze,d();break;case s.TerminalAnalyze:l=s.TerminalNuke,d();break;case s.TerminalNuke:l=s.TerminalManualHack,d();break;case s.TerminalManualHack:l=s.TerminalHackingMechanics,d();break;case s.TerminalHackingMechanics:l=s.TerminalCreateScript,d();break;case s.TerminalCreateScript:l=s.TerminalTypeScript,d();break;case s.TerminalTypeScript:l=s.TerminalFree,d();break;case s.TerminalFree:l=s.TerminalRunScript,d();break;case s.TerminalRunScript:l=s.TerminalGoToActiveScriptsPage,d();break;case s.TerminalGoToActiveScriptsPage:document.getElementById("active-scripts-menu-link").removeAttribute("class"),l=s.ActiveScriptsPage,d();break;case s.ActiveScriptsPage:document.getElementById("terminal-menu-link").removeAttribute("class"),l=s.ActiveScriptsToTerminal,d();break;case s.ActiveScriptsToTerminal:l=s.TerminalTailScript,d();break;case s.TerminalTailScript:l=s.GoToHacknetNodesPage,d();break;case s.GoToHacknetNodesPage:document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),l=s.HacknetNodesIntroduction,d();break;case s.HacknetNodesIntroduction:l=s.HacknetNodesGoToWorldPage,d();break;case s.HacknetNodesGoToWorldPage:document.getElementById("city-menu-link").removeAttribute("class"),l=s.WorldDescription,d();break;case s.WorldDescription:document.getElementById("tutorial-menu-link").removeAttribute("class"),l=s.TutorialPageInfo,d();break;case s.TutorialPageInfo:l=s.End,d();break;case s.End:break;default:throw new Error("Invalid tutorial step")}}function p(){a.Engine.Counters.autoSaveCounter=300,console.log("Ending interactive tutorial"),a.Engine.init(),l=s.End,c=!1,document.getElementById("interactive-tutorial-container").style.display="none",Object(r.dialogBoxCreate)("If you are new to the game, the following links may be useful for you!

Getting Started GuideWiki

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

cat hackers-starting-handbook.lit"),i.a.getHomeComputer().messages.push("hackers-starting-handbook.lit")}function m(e){var t=document.getElementById("interactive-tutorial-text");if(null==t)throw new Error("Could not find text box");t.innerHTML=e,t.parentElement.scrollTop=0}},function(e,t,n){"use strict";(function(e){n.d(t,"h",function(){return P}),n.d(t,"f",function(){return H}),n.d(t,"d",function(){return G}),n.d(t,"b",function(){return U}),n.d(t,"c",function(){return A}),n.d(t,"a",function(){return q}),n.d(t,"g",function(){return I}),n.d(t,"e",function(){return T});var a=n(1),i=n(6),r=n(38),o=n(29),s=n(7),l=n(34),c=n(23),u=n(0),d=n(9),h=n(22),p=n(25),m=n(52),g=n(37),y=n(8),f=n(10),b=n(69),v=n(3),_=n(2),k=n(73),E=n(62),O=n(204),C=n(203).js_beautify;n(202),n(143),n(201),n(200),n(199),n(198),n(197),n(196),n(195),n(194),n(193),n(192),n(191);const w=n(111);var S={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};function T(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}var R=null,x=null;function I(){var e=document.getElementById("script-editor-buttons-wrapper");if(null!=e){var t=Object(v.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Beautify",clickListener:()=>((function(){var e=O.edit("javascript-editor"),t=e.getValue();t=C(t,{indent_size:4}),e.setValue(t)})(),!1)}),n=Object(v.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(N(),!1)});x=Object(v.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});var a=Object(v.createElement)("label",{for:"script-editor-ram-check",margin:"4px",marginTop:"8px",innerText:"Dynamic RAM Usage Checker",color:"white",tooltip:"Enable/Disable the dynamic RAM Usage display. You may want to disable it for very long scripts because there may be performance issues"});(R=Object(v.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;var r=Object(v.createElement)("a",{display:"inline-block",class:"a-link-button",innerText:"Netscript Documentation",href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"});e.appendChild(t),e.appendChild(n),e.appendChild(x),e.appendChild(R),e.appendChild(a),e.appendChild(r);var o=O.edit("javascript-editor");o.getSession().setMode("ace/mode/netscript"),o.setTheme("ace/theme/monokai"),document.getElementById("javascript-editor").style.fontSize="16px",o.setOption("showPrintMargin",!1);var s=document.getElementById("script-editor-option-theme");if(h.a.EditorTheme){for(var c=2,u=0;u{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,B),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,B),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,L),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,M),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 w.recursive(n,{key:a},Object.assign({ImportDeclaration:(e,t,n)=>{const a=e.source.value;o.push(a),i[t.key].add(a+j);for(let n=0;n{const i=t+"."+e.id.name;w.recursive(e,{key:i},c())}},c())),{dependencyMap:i,additionalModules:o}}(e,t);s.add(t);for(let e=0;e0;){const t=l.shift(),n=e.getScript(t);if(!n)return-1;i(n.code.repeat(1),t)}let u=a.a.ScriptBaseRamCost;const d=Object.keys(o).filter(e=>e.startsWith(c)),h=new Set;for(;d.length>0;){const e=d.shift();if(h.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(o).filter(e=>e.startsWith(t)))for(let t of o[e]||[])h.has(t)||d.push(t)}else for(let t of o[e]||[])h.has(t)||d.push(t);e==M&&(u+=a.a.ScriptIfRamCost),e==L&&(u+=a.a.ScriptForRamCost),e==B&&(u+=a.a.ScriptWhileRamCost),"hacknet"==e&&(u+=a.a.ScriptHacknetNodesRamCost),"document"!=e&&"window"!=e||(u+=a.a.ScriptDomRamCost);try{function r(e){if("function"!=typeof e)return 0;try{let t=e.apply(null,[]);return"number"==typeof t?t:0}catch(e){return console.log("ERROR applying function: "+e),0}}u+=r(e in n.env.vars.bladeburner?n.env.vars.bladeburner[e]:n.env.get(e))}catch(e){continue}}return u}catch(e){return-1}}function F(e){var t=u.a.getCurrentServer(),n=new c.b({filename:"foo",scriptRef:{code:""},args:[]});n.checkingRam=!0,n.serverIp=t.ip;try{return D(t,e,n)}catch(e){console.log("Failed to parse ram using new method. Falling back.",e)}try{var i=Object(g.parse)(e,{sourceType:"module"})}catch(e){return-1}var r=[],o=a.a.ScriptBaseRamCost,l=!1,d=!1,h=!1;for(r.push(i);0!=r.length;){var p=r.shift();switch(p.type){case"ImportDeclaration":for(var m=Object(s.a)(p,n,!0),y=0;y=1&&(n=1),e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][2]||null==e.dataMap[i][2])continue;if(null==(p=d.b[i]))continue;var r=Math.round(.5*e.dataMap[i][2]/e.onlineRunningTime*t);console.log(e.filename+" called grow() on "+p.hostname+" "+r+" times while offline"),e.log("Called grow() on "+p.hostname+" "+r+" times while offline");var o=Object(d.j)(p,450*r);e.log(p.hostname+" grown by "+Object(_.formatNumber)(100*o-100,6)+"% from grow() calls made while offline")}var s=0;for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][0]||null==e.dataMap[i][0])continue;if(null==(p=d.b[i]))continue;var l=.5*e.dataMap[i][0]/e.onlineRunningTime*t;(l*=n)>p.moneyAvailable&&(l=p.moneyAvailable),s+=l,u.a.gainMoney(l),console.log(e.filename+" generated $"+l+" while offline by hacking "+p.hostname),e.log(e.filename+" generated $"+l+" while offline by hacking "+p.hostname),p.moneyAvailable-=l,p.moneyAvailable<0&&(p.moneyAvailable=0),isNaN(p.moneyAvailable)&&(p.moneyAvailable=0)}var c=e.onlineExpGained/e.onlineRunningTime*.5*t;for(var i in c*=n,u.a.gainHackingExp(c),e.offlineMoneyMade+=s,e.offlineRunningTime+=t,e.offlineExpGained+=c,e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][1]||null==e.dataMap[i][1])continue;if(null==(p=d.b[i]))continue;var h=Math.round(.5*e.dataMap[i][1]/e.onlineRunningTime*t);console.log(e.filename+" hacked "+p.hostname+" "+h+" times while offline"),e.log("Hacked "+p.hostname+" "+h+" times while offline"),p.fortify(a.a.ServerFortifyAmount*h)}for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][3]||null==e.dataMap[i][3])continue;var p;if(null==(p=d.b[i]))continue;var m=Math.round(.5*e.dataMap[i][3]/e.onlineRunningTime*t);console.log(e.filename+" called weaken() on "+p.hostname+" "+m+" times while offline"),e.log("Called weaken() on "+p.hostname+" "+m+" times while offline"),p.weaken(a.a.ServerWeakenAmount*m)}return s}function G(e,t,n){for(var a=0;ah.a.MaxLogCapacity&&this.logs.shift();let t=e;r.a.ENABLE_TIMESTAMPS&&(t="["+Object(k.getTimestamp)()+"] "+t),this.logs.push(t),this.logUpd=!0},U.prototype.displayLog=function(){for(var e=0;e

This message was saved as "+e.filename+" onto your home computer.";Object(u.dialogBoxCreate)(t)}function g(){var e=f[v.Jumper0],t=f[v.Jumper1],n=f[v.Jumper2],l=f[v.Jumper3],c=f[v.Jumper4],d=f[v.CyberSecTest],h=f[v.NiteSecTest],m=f[v.BitRunnersTest],g=f[v.RedPill],y=!1;a.c[a.b.TheRedPill].owned&&(y=!0),g&&y&&0===o.a.sourceFiles.length&&!s.b&&!r.c?u.dialogBoxOpened||p(g,!0):g&&y?s.b||r.c||u.dialogBoxOpened||p(g):e&&!e.recvd&&o.a.hacking_skill>=25?(p(e),o.a.getHomeComputer().programs.push(i.a.Flight.name)):t&&!t.recvd&&o.a.hacking_skill>=40?p(t):d&&!d.recvd&&o.a.hacking_skill>=50?p(d):n&&!n.recvd&&o.a.hacking_skill>=175?p(n):h&&!h.recvd&&o.a.hacking_skill>=200?p(h):l&&!l.recvd&&o.a.hacking_skill>=350?p(l):c&&!c.recvd&&o.a.hacking_skill>=490?p(c):m&&!m.recvd&&o.a.hacking_skill>=500&&p(m)}function y(e){f[e.filename]=e}h.prototype.toJSON=function(){return Object(d.Generic_toJSON)("Message",this)},h.fromJSON=function(e){return Object(d.Generic_fromJSON)(h,e.data)},d.Reviver.constructors.Message=h;let f={};function b(e){f=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 _(){f={},y(new h(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.

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

Use this program to track your progress

The fl1ght.exe program was added to your home computer

-jump3R")),y(new h(v.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search.

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.

-jump3R")),y(new h(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.

Watch out for a hacking group known as NiteSec.

-jump3R")),y(new h(v.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand.

I.I.I.I

-jump3R")),y(new h(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.

-jump3R")),y(new h(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.

But first, you must pass our test. Find and hack our server using the Terminal.

-CyberSec")),y(new h(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.

Join us, and people will fear you, too.

Find and hack our hidden server using the Terminal. Then, we will contact you again.

-NiteSec")),y(new h(v.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for.

We can help you find the answers.

run4theh111z")),y(new h(v.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},function(e,t,n){"use strict";n.d(t,"a",function(){return $}),n.d(t,"g",function(){return J}),n.d(t,"d",function(){return K}),n.d(t,"f",function(){return q}),n.d(t,"h",function(){return Y}),n.d(t,"e",function(){return F}),n.d(t,"b",function(){return W}),n.d(t,"c",function(){return G});var a=n(51),i=n(18),r=n(16),o=n(31),s=n(28),l=n(11),c=n(1),u=n(21),d=n(61),h=n(6),p=n(41),m=n(12),g=n(50),y=n(4),f=n(33),b=n(39),v=n(0),_=n(30),k=n(9),E=(n(22),n(19)),O=n(24),C=n(25),w=n(52),S=n(45),T=n(23),R=n(7),x=n(56),I=(n(26),n(8)),P=n(101),N=n(40),A=n(17),M=n(2),L=n(32),B=n(15),j=n(110).sprintf,D=n(110).vsprintf,F=!1,H=!1,W=!1,G=!1,U=!1,q=!1,K=!1,V=1,Y=1,z={ALL:!0,scan:!0,hack:!0,sleep:!0,disableLog:!0,enableLog:!0,grow:!0,weaken:!0,nuke:!0,brutessh:!0,ftpcrack:!0,relaysmtp:!0,httpworm:!0,sqlinject:!0,run:!0,exec:!0,spawn:!0,kill:!0,killall:!0,scp:!0,getHackingLevel:!0,getServerMoneyAvailable:!0,getServerSecurityLevel:!0,getServerBaseSecurityLevel:!0,getServerMinSecurityLevel:!0,getServerRequiredHackingLevel:!0,getServerMaxMoney:!0,getServerGrowth:!0,getServerNumPortsRequired:!0,getServerRam:!0,buyStock:!0,sellStock:!0,purchaseServer:!0,deleteServer:!0,universityCourse:!0,gymWorkout:!0,travelToCity:!0,purchaseTor:!0,purchaseProgram:!0,stopAction:!0,upgradeHomeRam:!0,workForCompany:!0,applyToCompany:!0,joinFaction:!0,workForFaction:!0,createProgram:!0,commitCrime:!0,shortStock:!0,sellShort:!0,startAction:!0,upgradeSkill:!0,setTeamSize:!0,joinBladeburnerFaction:!0};function J(){for(var e=0;e1.01*e.ramUsage))throw Object(R.d)(e,"Dynamic RAM usage calculated to be greater than initial RAM usage on fn: "+t+". This is probably because you somehow circumvented the static RAM calculation.

Please don't do that :(

Dynamic RAM Usage: "+e.dynamicRamUsage+"
Static RAM Usage: "+e.ramUsage)},n=function(t,n){return e.loadedFns[t]?0:(e.loadedFns[t]=!0,n)},F=function(t){if(isNaN(t))throw Object(R.d)(e,"Invalid index specified for Hacknet Node: "+t);if(t<0||t>=v.a.hacknetNodes.length)throw Object(R.d)(e,"Index specified for Hacknet Node is out-of-bounds: "+t);return v.a.hacknetNodes[t]};const G=e=>{const t=Math.round(e);if(isNaN(t)||!Object(P.isPowerOfTwo)(t))throw Error("failed due to invalid ram argument. Must be numeric and a power of 2");if(t>c.a.PurchasedServerMaxRam)throw Error("failed because specified RAM was too high. Maximum RAM on a purchased server is "+c.a.PurchasedServerMaxRam+"GB");return t*c.a.BaseCostFor1GBOfRamServer};return{hacknet:{numNodes:function(){return v.a.hacknetNodes.length},purchaseNode:function(){return Object(g.e)()},getPurchaseNodeCost:function(){return Object(g.c)()},getNodeStats:function(e){var t=F(e);return{name:t.name,level:t.level,ram:t.ram,cores:t.cores,production:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:t.totalMoneyGenerated}},upgradeLevel:function(e,t){return F(e).purchaseLevelUpgrade(t)},upgradeRam:function(e,t){return F(e).purchaseRamUpgrade(t)},upgradeCore:function(e,t){return F(e).purchaseCoreUpgrade(t)},getLevelUpgradeCost:function(e,t){return F(e).calculateLevelUpgradeCost(t)},getRamUpgradeCost:function(e,t){return F(e).calculateRamUpgradeCost(t)},getCoreUpgradeCost:function(e,t){return F(e).calculateCoreUpgradeCost(t)}},sprintf:j,vsprintf:D,scan:function(a=e.serverIp,i=!0){if(e.checkingRam)return n("scan",c.a.ScriptScanRamCost);t("scan",c.a.ScriptScanRamCost);var r=Object(k.e)(a);if(null==r)throw Object(R.d)(e,"Invalid IP or hostname passed into scan() command");for(var o=[],s=0;sv.a.hacking_skill)throw e.scriptRef.log("Cannot hack this server ("+r.hostname+") because user's hacking skill is not high enough"),Object(R.d)(e,"Cannot hack this server ("+r.hostname+") because user's hacking skill is not high enough");return null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Attempting to hack "+a+" in "+o.toFixed(3)+" seconds (t="+i+")"),Object(R.e)(1e3*o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);var t=Object(R.i)(r),n=Math.random(),a=Object(R.g)(r)*i,o=a/4;if(nr.moneyAvailable&&(s=r.moneyAvailable),r.moneyAvailable-=s,r.moneyAvailable<0&&(r.moneyAvailable=0),v.a.gainMoney(s),e.scriptRef.onlineMoneyMade+=s,v.a.scriptProdSinceLastAug+=s,e.scriptRef.recordHack(r.ip,s,i),v.a.gainHackingExp(a),e.scriptRef.onlineExpGained+=a,null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Script SUCCESSFULLY hacked "+r.hostname+" for $"+Object(M.formatNumber)(s,2)+" and "+Object(M.formatNumber)(a,4)+" exp (t="+i+")"),r.fortify(c.a.ServerFortifyAmount*Math.min(i,n)),Promise.resolve(s)}return v.a.gainHackingExp(o),e.scriptRef.onlineExpGained+=o,null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Script FAILED to hack "+r.hostname+". Gained "+Object(M.formatNumber)(o,4)+" exp (t="+i+")"),Promise.resolve(0)})},sleep:function(t){if(e.checkingRam)return 0;if(void 0===t)throw Object(R.d)(e,"sleep() call has incorrect number of arguments. Takes 1 argument");return null==e.disableLogs.ALL&&null==e.disableLogs.sleep&&e.scriptRef.log("Sleeping for "+t+" milliseconds"),Object(R.e)(t,e).then(function(){return Promise.resolve(!0)})},grow:function(a){if(e.checkingRam)return n("grow",c.a.ScriptGrowRamCost);t("grow",c.a.ScriptGrowRamCost);var i=e.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===a)throw Object(R.d)(e,"grow() call has incorrect number of arguments. Takes 1 argument");var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: "+a),Object(R.d)(e,"Cannot grow(). Invalid IP or hostname passed in: "+a);if(0==r.hasAdminRights)throw e.scriptRef.log("Cannot grow this server ("+r.hostname+") because user does not have root access"),Object(R.d)(e,"Cannot grow this server ("+r.hostname+") because user does not have root access");var o=Object(R.h)(r);return null==e.disableLogs.ALL&&null==e.disableLogs.grow&&e.scriptRef.log("Executing grow() on server "+r.hostname+" in "+Object(M.formatNumber)(o/1e3,3)+" seconds (t="+i+")"),Object(R.e)(o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);const t=r.moneyAvailable;r.moneyAvailable+=1*i;var n=Object(k.j)(r,450*i);const a=r.moneyAvailable;e.scriptRef.recordGrow(r.ip,i);var o=Object(R.g)(r)*i;return 1==n&&(o=0),null==e.disableLogs.ALL&&null==e.disableLogs.grow&&e.scriptRef.log("Available money on "+r.hostname+" grown by "+Object(M.formatNumber)(a/t*100-100,6)+"%. Gained "+Object(M.formatNumber)(o,4)+" hacking exp (t="+i+")"),e.scriptRef.onlineExpGained+=o,v.a.gainHackingExp(o),Promise.resolve(a/t)})},weaken:function(a){if(e.checkingRam)return n("weaken",c.a.ScriptWeakenRamCost);t("weaken",c.a.ScriptWeakenRamCost);var i=e.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===a)throw Object(R.d)(e,"weaken() call has incorrect number of arguments. Takes 1 argument");var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: "+a),Object(R.d)(e,"Cannot weaken(). Invalid IP or hostname passed in: "+a);if(0==r.hasAdminRights)throw e.scriptRef.log("Cannot weaken this server ("+r.hostname+") because user does not have root access"),Object(R.d)(e,"Cannot weaken this server ("+r.hostname+") because user does not have root access");var o=Object(R.l)(r);return null==e.disableLogs.ALL&&null==e.disableLogs.weaken&&e.scriptRef.log("Executing weaken() on server "+r.hostname+" in "+Object(M.formatNumber)(o/1e3,3)+" seconds (t="+i+")"),Object(R.e)(o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);r.weaken(c.a.ServerWeakenAmount*i),e.scriptRef.recordWeaken(r.ip,i);var t=Object(R.g)(r)*i;return null==e.disableLogs.ALL&&null==e.disableLogs.weaken&&e.scriptRef.log("Server security level on "+r.hostname+" weakened to "+r.hackDifficulty+". Gained "+Object(M.formatNumber)(t,4)+" hacking exp (t="+i+")"),e.scriptRef.onlineExpGained+=t,v.a.gainHackingExp(t),Promise.resolve(c.a.ServerWeakenAmount*i)})},print:function(t){if(e.checkingRam)return 0;if(void 0===t)throw Object(R.d)(e,"print() call has incorrect number of arguments. Takes 1 argument");e.scriptRef.log(t.toString())},tprint:function(t){if(e.checkingRam)return 0;if(void 0===t||null==t)throw Object(R.d)(e,"tprint() call has incorrect number of arguments. Takes 1 argument");var n=t.toString();if(Object(M.isHTML)(n))return v.a.takeDamage(1),void Object(I.dialogBoxCreate)("You suddenly feel a sharp shooting pain through your body as an angry voice in your head exclaims:

DON'T USE TPRINT() TO OUTPUT HTML ELEMENTS TO YOUR TERMINAL!!!!

(You lost 1 HP)");Object(C.c)(e.scriptRef.filename+": "+t.toString())},clearLog:function(){if(e.checkingRam)return 0;e.scriptRef.clearLog()},disableLog:function(t){if(e.checkingRam)return 0;if(void 0===z[t])throw Object(R.d)(e,"Invalid argument to disableLog: "+t);e.disableLogs[t]=!0,null==e.disableLogs.ALL&&null==e.disableLogs.disableLog&&e.scriptRef.log("Disabled logging for "+t)},enableLog:function(t){if(e.checkingRam)return 0;if(void 0===z[t])throw Object(R.d)(e,"Invalid argument to enableLog: "+t);delete e.disableLogs[t],null==e.disableLogs.ALL&&null==e.disableLogs.enableLog&&e.scriptRef.log("Enabled logging for "+t)},nuke:function(a){if(e.checkingRam)return n("nuke",c.a.ScriptPortProgramRamCost);if(t("nuke",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(R.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: "+a),Object(R.d)(e,"Cannot call nuke(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.NukeProgram.name))throw Object(R.d)(e,"You do not have the NUKE.exe virus!");if(i.openPortCount{if(void 0===a)throw Object(R.d)(e,"spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");if(isNaN(i)||i<1)throw Object(R.d)(e,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var t=[],n=2;n0,o=i.runningScripts.length-1;o>=0;--o)Object(T.d)(i.runningScripts[o],i.ip);return null==e.disableLogs.ALL&&null==e.disableLogs.killall&&e.scriptRef.log("killall(): Killing all scripts on "+i.hostname+". May take a few minutes for the scripts to die"),r},exit:function(){if(e.checkingRam)return 0;var t=Object(k.e)(e.serverIp);if(null==t)throw Object(R.d)(e,"Error getting Server for this script in exit(). This is a bug please contact game dev");Object(T.d)(e.scriptRef,t.ip)?e.scriptRef.log("Exiting..."):e.scriptRef.log("Exit failed(). This is a bug please contact game developer")},scp:function(a,i,r){if(e.checkingRam)return n("scp",c.a.ScriptScpRamCost);if(t("scp",c.a.ScriptScpRamCost),2!==arguments.length&&3!==arguments.length)throw Object(R.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(a&&a.constructor===Array){var o=!1;return a.forEach(function(t){$(e).scp(t,i,r)&&(o=!0)}),o}if(!a.endsWith(".lit")&&!Object(_.e)(a)&&!a.endsWith("txt"))throw Object(R.d)(e,"ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");var s,l;if(3===arguments.length){if(void 0===a||void 0===i||void 0===r)throw Object(R.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(s=Object(k.e)(r)))throw Object(R.d)(e,"ERROR: Invalid hostname/ip passed into scp() command: "+ip);if(null==(l=Object(k.e)(i)))throw Object(R.d)(e,"Could not find server ip for this script. This is a bug please contact game developer")}else if(2===arguments.length){if(void 0===a||void 0===i)throw Object(R.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(s=Object(k.e)(i)))throw Object(R.d)(e,"ERROR: Invalid hostname/ip passed into scp() command: "+ip);if(null==(l=Object(k.e)(e.serverIp)))throw Object(R.d)(e,"Could not find server ip for this script. This is a bug please contact game developer")}if(a.endsWith(".lit")){for(var u=!1,d=0;d=2&&(o=i.toString());for(var s=[],l=0;lr.playerShares&&(i=r.playerShares),0===i)return 0;var o=r.price*i-c.a.StockMarketCommission;v.a.gainMoney(o);var s=(r.price-r.playerAvgPx)*i-c.a.StockMarketCommission;return isNaN(s)&&(s=0),e.scriptRef.onlineMoneyMade+=s,v.a.scriptProdSinceLastAug+=s,r.playerShares-=i,0==r.playerShares&&(r.playerAvgPx=0),h.Engine.currentPage==h.Engine.Page.StockMarket&&Object(O.p)(r),null==e.disableLogs.ALL&&null==e.disableLogs.sellStock&&e.scriptRef.log("Sold "+Object(M.formatNumber)(i,0)+" shares of "+r.symbol+" at $"+Object(M.formatNumber)(r.price,2)+" per share. Gained $"+Object(M.formatNumber)(o,2)),r.price},shortStock(a,i){if(e.checkingRam)return n("shortStock",c.a.ScriptBuySellStockRamCost);if(t("shortStock",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use shortStock()");if(8!==v.a.bitNodeN&&!(q&&Y>=2))throw Object(R.d)(e,"ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var r=O.d[a];if(null==r)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into shortStock()");return Object(O.n)(r,i,e)?r.price:0},sellShort(a,i){if(e.checkingRam)return n("sellShort",c.a.ScriptBuySellStockRamCost);if(t("sellShort",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use sellShort()");if(8!==v.a.bitNodeN&&!(q&&Y>=2))throw Object(R.d)(e,"ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var r=O.d[a];if(null==r)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into sellShort()");return Object(O.l)(r,i,e)?r.price:0},placeOrder(a,i,r,o,s){if(e.checkingRam)return n("placeOrder",c.a.ScriptBuySellStockRamCost);if(t("placeOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use placeOrder()");if(8!==v.a.bitNodeN&&!(q&&Y>=3))throw Object(R.d)(e,"ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var l,u,d=O.d[a];if(null==d)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into placeOrder()");if((o=o.toLowerCase()).includes("limit")&&o.includes("buy"))l=O.a.LimitBuy;else if(o.includes("limit")&&o.includes("sell"))l=O.a.LimitSell;else if(o.includes("stop")&&o.includes("buy"))l=O.a.StopBuy;else{if(!o.includes("stop")||!o.includes("sell"))throw Object(R.d)(e,"ERROR: Invalid Order Type passed into placeOrder()");l=O.a.StopSell}if((s=s.toLowerCase()).includes("l"))u=O.b.Long;else{if(!s.includes("s"))throw Object(R.d)(e,"ERROR: Invalid Position Type passed into placeOrder()");u=O.b.Short}return Object(O.k)(d,i,r,l,u,e)},cancelOrder(a,i,r,o,s){if(e.checkingRam)return n("cancelOrder",c.a.ScriptBuySellStockRamCost);if(t("cancelOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use cancelOrder()");if(8!==v.a.bitNodeN&&!(q&&Y>=3))throw Object(R.d)(e,"ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var l,u,d=O.d[a];if(null==d)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into cancelOrder()");if(isNaN(i)||isNaN(r))throw Object(R.d)(e,"ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");if((o=o.toLowerCase()).includes("limit")&&o.includes("buy"))l=O.a.LimitBuy;else if(o.includes("limit")&&o.includes("sell"))l=O.a.LimitSell;else if(o.includes("stop")&&o.includes("buy"))l=O.a.StopBuy;else{if(!o.includes("stop")||!o.includes("sell"))throw Object(R.d)(e,"ERROR: Invalid Order Type passed into placeOrder()");l=O.a.StopSell}if((s=s.toLowerCase()).includes("l"))u=O.b.Long;else{if(!s.includes("s"))throw Object(R.d)(e,"ERROR: Invalid Position Type passed into placeOrder()");u=O.b.Short}var h={stock:d,shares:i,price:r,type:l,pos:u};return Object(O.e)(h,e)},getPurchasedServerLimit:function(){return e.checkingRam?n("getPurchasedServerLimit",c.a.ScriptGetPurchasedServerLimit):(t("getPurchasedServerLimit",c.a.ScriptGetPurchasedServerLimit),c.a.PurchasedServerLimit)},getPurchasedServerMaxRam:function(){return e.checkingRam?n("getPurchasedServerMaxRam",c.a.ScriptGetPurchasedServerMaxRam):(t("getPurchasedServerMaxRam",c.a.ScriptGetPurchasedServerMaxRam),c.a.PurchasedServerMaxRam)},getPurchasedServerCost:function(a){if(e.checkingRam)return n("getPurchasedServerCost",c.a.ScriptGetPurchaseServerRamCost);t("getPurchasedServerCost",c.a.ScriptGetPurchaseServerRamCost);let i=0;try{i=G(a)}catch(t){return e.scriptRef.log("ERROR: 'getPurchasedServerCost()' "+t.message),""}return i},purchaseServer:function(a,i){if(e.checkingRam)return n("purchaseServer",c.a.ScriptPurchaseServerRamCost);t("purchaseServer",c.a.ScriptPurchaseServerRamCost);var r=String(a);if(""==(r=r.replace(/\s+/g,"")))return e.scriptRef.log("ERROR: Passed empty string for hostname argument of purchaseServer()"),"";if(v.a.purchasedServers.length>=c.a.PurchasedServerLimit)return e.scriptRef.log("ERROR: You have reached the maximum limit of "+c.a.PurchasedServerLimit+" servers. You cannot purchase any more."),"";let o=0;try{o=G(i)}catch(t){return e.scriptRef.log("ERROR: 'purchaseServer()' "+t.message),""}if(v.a.money.lt(o))return e.scriptRef.log("ERROR: Not enough money to purchase server. Need $"+Object(M.formatNumber)(o,2)),"";var s=new k.d({ip:Object(A.a)(),hostname:r,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:i});Object(k.a)(s),v.a.purchasedServers.push(s.ip);var l=v.a.getHomeComputer();return l.serversOnNetwork.push(s.ip),s.serversOnNetwork.push(l.ip),v.a.loseMoney(o),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseServer&&e.scriptRef.log("Purchased new server with hostname "+s.hostname+" for $"+Object(M.formatNumber)(o,2)),s.hostname},deleteServer:function(a){if(e.checkingRam)return n("deleteServer",c.a.ScriptPurchaseServerRamCost);t("deleteServer",c.a.ScriptPurchaseServerRamCost);var i=String(a);i=i.replace(/\s\s+/g,"");var r=Object(k.c)(i);if(null==r)return e.scriptRef.log("ERROR: Could not find server with hostname "+i+". deleteServer() failed"),!1;if(!r.purchasedByPlayer||"home"===r.hostname)return e.scriptRef.log("ERROR: Server "+r.hostname+" is not a purchased server. Cannot be deleted. deleteServer() failed"),!1;var o=r.ip;if(r.isConnectedTo)return e.scriptRef.log("ERROR: deleteServer() failed because you are currently connected to the server you are trying to delete"),!1;if(o===e.serverIp)return e.scriptRef.log("ERROR: Cannot call deleteServer() on self. deleteServer() failed"),!1;if(r.runningScripts.length>0)return e.scriptRef.log("ERROR: Cannot delete server "+r.hostname+" because it still has scripts running."),!1;for(var s=!1,l=0;lc.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: Trying to write to invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"Could not find port: "+a+". This is a bug contact the game developer");return a.write(i)},read:function(a){if(e.checkingRam)return n("read",c.a.ScriptReadWriteRamCost);if(t("read",c.a.ScriptReadWriteRamCost),isNaN(a)){if(Object(L.isString)(a)){var i=a,r=Object(k.e)(e.serverIp);if(null==r)throw Object(R.d)(e,"Error getting Server for this script in read(). This is a bug please contact game dev");var o=Object(w.getTextFile)(i,r);return null!==o?o.text:""}throw Object(R.d)(e,"Invalid argument passed in for read(): "+a)}if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: Trying to read from invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.read()},peek:function(a){if(e.checkingRam)return n("peek",c.a.ScriptReadWriteRamCost);if(t("peek",c.a.ScriptReadWriteRamCost),isNaN(a))throw Object(R.d)(e,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.peek()},clear:function(a){if(e.checkingRam)return n("clear",c.a.ScriptReadWriteRamCost);if(t("clear",c.a.ScriptReadWriteRamCost),!isNaN(a)){if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: Trying to clear invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.clear()}if(!Object(L.isString)(a))throw Object(R.d)(e,"Invalid argument passed in for clear(): "+a);var i=a,r=Object(k.e)(e.serverIp);if(null==r)throw Object(R.d)(e,"Error getting Server for this script in clear(). This is a bug please contact game dev");var o=Object(w.getTextFile)(i,r);return null!=o&&o.write(""),0},getPortHandle:function(a){if(e.checkingRam)return n("getPortHandle",10*c.a.ScriptReadWriteRamCost);if(t("getPortHandle",10*c.a.ScriptReadWriteRamCost),isNaN(a))throw Object(R.d)(e,"ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and "+c.a.NumNetscriptPorts);if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: getPortHandle() called with invalid port number: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a},rm:function(a){if(e.checkingRam)return n("rm",c.a.ScriptReadWriteRamCost);t("rm",c.a.ScriptReadWriteRamCost);var i=Object(k.e)(e.serverIp);if(null==i)throw Object(R.d)(e,"Error getting Server for this script in clear(). This is a bug please contact game dev");if(a.includes(".exe")){for(var r=0;r{Object(B.a)(),e(!0)}),a.addEventListener("click",()=>{Object(B.a)(),e(!1)}),Object(B.b)(t)})},getFavorToDonate:function(){return e.checkingRam?n("getFavorToDonate",c.a.ScriptGetFavorToDonate):(t("getFavorToDonate",c.a.ScriptGetFavorToDonate),Math.floor(c.a.BaseFavorToDonate*r.a.RepToDonateToFaction))},universityCourse:function(a,i){var r=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("universityCourse",r);if(t("universityCourse",r),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.universityCourse&&e.scriptRef.log(o)}var s,l,u;switch(a.toLowerCase()){case y.a.AevumSummitUniversity.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"),!1;v.a.location=y.a.AevumSummitUniversity,s=4,l=3;break;case y.a.Sector12RothmanUniversity.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"),!1;v.a.location=y.a.Sector12RothmanUniversity,s=3,l=2;break;case y.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(v.a.city!=y.a.Volhaven)return e.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"),!1;v.a.location=y.a.VolhavenZBInstituteOfTechnology,s=5,l=4;break;default:return e.scriptRef.log("Invalid university name: "+a+". universityCourse() failed"),!1}switch(i.toLowerCase()){case"Study Computer Science".toLowerCase():u=c.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():u=c.a.ClassDataStructures;break;case"Networks".toLowerCase():u=c.a.ClassNetworks;break;case"Algorithms".toLowerCase():u=c.a.ClassAlgorithms;break;case"Management".toLowerCase():u=c.a.ClassManagement;break;case"Leadership".toLowerCase():u=c.a.ClassLeadership;break;default:return e.scriptRef.log("Invalid class name: "+i+". universityCourse() failed"),!1}return v.a.startClass(s,l,u),null==e.disableLogs.ALL&&null==e.disableLogs.universityCourse&&e.scriptRef.log("Started "+u+" at "+a),!0}e.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.")},gymWorkout:function(a,i){var r=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("gymWorkout",r);if(t("gymWorkout",r),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.gymWorkout&&e.scriptRef.log(o)}var s,l;switch(a.toLowerCase()){case y.a.AevumCrushFitnessGym.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=y.a.AevumCrushFitnessGym,s=3,l=2;break;case y.a.AevumSnapFitnessGym.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=y.a.AevumSnapFitnessGym,s=10,l=5;break;case y.a.Sector12IronGym.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=y.a.Sector12IronGym,s=1,l=1;break;case y.a.Sector12PowerhouseGym.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=y.a.Sector12PowerhouseGym,s=20,l=10;break;case y.a.VolhavenMilleniumFitnessGym:if(v.a.city!=y.a.Volhaven)return e.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"),!1;v.a.location=y.a.VolhavenMilleniumFitnessGym,s=7,l=4;break;default:return e.scriptRef.log("Invalid gym name: "+a+". gymWorkout() failed"),!1}switch(i.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():v.a.startClass(s,l,c.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():v.a.startClass(s,l,c.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():v.a.startClass(s,l,c.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():v.a.startClass(s,l,c.a.ClassGymAgility);break;default:return e.scriptRef.log("Invalid stat: "+i+". gymWorkout() failed"),!1}return null==e.disableLogs.ALL&&null==e.disableLogs.gymWorkout&&e.scriptRef.log("Started training "+i+" at "+a),!0}e.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.")},travelToCity(a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("travelToCity",i);if(t("travelToCity",i),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");switch(a){case y.a.Aevum:case y.a.Chongqing:case y.a.Sector12:case y.a.NewTokyo:case y.a.Ishima:case y.a.Volhaven:if(v.a.money.lt(c.a.TravelCost))throw e.scriptRef.log("ERROR: not enough money to travel with travelToCity()."),Object(R.d)(e,"ERROR: not enough money to travel with travelToCity().");return v.a.loseMoney(c.a.TravelCost),v.a.city=a,null==e.disableLogs.ALL&&null==e.disableLogs.travelToCity&&e.scriptRef.log("Traveled to "+a),!0;default:return e.scriptRef.log("ERROR: Invalid city name passed into travelToCity()."),!1}},purchaseTor(){var a=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("purchaseTor",a);if(t("purchaseTor",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null!=E.a["Darkweb Server"])return e.scriptRef.log("You already have a TOR router! purchaseTor() failed"),!1;if(v.a.money.lt(c.a.TorRouterCost))return e.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"),!1;v.a.loseMoney(c.a.TorRouterCost);var i=new k.d({ip:Object(A.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(k.a)(i),E.a.addIp("Darkweb Server",i.ip);const r=document.getElementById("location-purchase-tor");return r.setAttribute("class","a-link-button-bought"),r.innerHTML="TOR Router - Purchased",v.a.getHomeComputer().serversOnNetwork.push(i.ip),i.serversOnNetwork.push(v.a.getHomeComputer().ip),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseTor&&e.scriptRef.log("You have purchased a Tor router!"),!0},purchaseProgram(a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("purchaseProgram",i);if(t("purchaseProgram",i),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null==E.a["Darkweb Server"])return e.scriptRef.log("ERROR: You do not have the TOR router. purchaseProgram() failed."),!1;a=a.toLowerCase();let r=null;for(const e in d.a){const t=d.a[e];t.program.toLowerCase()==a&&(r=t)}return null==r?(e.scriptRef.log("ERROR: Invalid program name passed into purchaseProgram()."),!1):v.a.money.lt(r.price)?(e.scriptRef.log("Not enough money to purchase "+r.program),!1):v.a.hasProgram(r.program)?(e.scriptRef.log("You already have the "+r.program+" program"),!0):(v.a.loseMoney(r.price),v.a.getHomeComputer().programs.push(r.program),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseProgram&&e.scriptRef.log("You have purchased the "+r.program+" program. The new program can be found on your home computer."),!0)},getStats:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getStats",a);if(t("getStats",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{hacking:v.a.hacking_skill,strength:v.a.strength,defense:v.a.defense,dexterity:v.a.dexterity,agility:v.a.agility,charisma:v.a.charisma,intelligence:v.a.intelligence}},getCharacterInformation:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getCharacterInformation",a);if(t("getCharacterInformation",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");var i="";return v.a.companyPosition instanceof l.c&&(i=v.a.companyPosition.positionName),{bitnode:v.a.bitNodeN,company:v.a.companyName,jobTitle:i,city:v.a.city,factions:v.a.factions.slice(),tor:E.a.hasOwnProperty("Darkweb Server"),timeWorked:v.a.timeWorked,workHackExpGain:v.a.workHackExpGained,workStrExpGain:v.a.workStrExpGained,workDefExpGain:v.a.workDefExpGained,workDexExpGain:v.a.workDexExpGained,workAgiExpGain:v.a.workAgiExpGained,workChaExpGain:v.a.workChaExpGained,workRepGain:v.a.workRepGained,workMoneyGain:v.a.workMoneyGained}},isBusy:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("isBusy",a);if(t("isBusy",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return v.a.isWorking},stopAction:function(){var a=c.a.ScriptSingularityFn1RamCost/2;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("stopAction",a);if(t("stopAction",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(v.a.isWorking){var i=v.a.singularityStopWork();return null==e.disableLogs.ALL&&null==e.disableLogs.stopAction&&e.scriptRef.log(i),!0}return!1},upgradeHomeRam:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("upgradeHomeRam",a);if(t("upgradeHomeRam",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");const i=v.a.getUpgradeHomeRamCost();if(v.a.money.lt(i))return e.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"),!1;var r=v.a.getHomeComputer();return r.maxRam*=2,v.a.loseMoney(i),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.upgradeHomeRam&&e.scriptRef.log("Purchased additional RAM for home computer! It now has "+r.maxRam+"GB of RAM."),!0},getUpgradeHomeRamCost:function(){var a=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getUpgradeHomeRamCost",a);if(t("getUpgradeHomeRamCost",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.getUpgradeHomeRamCost()},workForCompany:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("workForCompany",a);if(t("workForCompany",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!b.c){if(""==v.a.companyPosition||!(v.a.companyPosition instanceof l.c))return e.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"),!1;if(v.a.isWorking){var i=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.workForCompany&&e.scriptRef.log(i)}return v.a.companyPosition.isPartTimeJob()?v.a.startWorkPartTime():v.a.startWork(),null==e.disableLogs.ALL&&null==e.disableLogs.workForCompany&&e.scriptRef.log("Began working at "+v.a.companyName+" as a "+v.a.companyPosition.positionName),!0}e.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission.")},applyToCompany:function(a,i){var r,o=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(o*=8),e.checkingRam)return n("applyToCompany",o);if(t("applyToCompany",o),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(l.e)(a))return e.scriptRef.log("ERROR: applyToCompany() failed because specified company "+a+" does not exist."),!1;switch(v.a.location=a,i.toLowerCase()){case"software":r=v.a.applyForSoftwareJob(!0);break;case"software consultant":r=v.a.applyForSoftwareConsultantJob(!0);break;case"it":r=v.a.applyForItJob(!0);break;case"security engineer":r=v.a.applyForSecurityEngineerJob(!0);break;case"network engineer":r=v.a.applyForNetworkEngineerJob(!0);break;case"business":r=v.a.applyForBusinessJob(!0);break;case"business consultant":r=v.a.applyForBusinessConsultantJob(!0);break;case"security":r=v.a.applyForSecurityJob(!0);break;case"agent":r=v.a.applyForAgentJob(!0);break;case"employee":r=v.a.applyForEmployeeJob(!0);break;case"part-time employee":r=v.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":r=v.a.applyForWaiterJob(!0);break;case"part-time waiter":r=v.a.applyForPartTimeWaiterJob(!0);break;default:return e.scriptRef.log("ERROR: Invalid job passed into applyToCompany: "+i+". applyToCompany() failed"),!1}return Object(L.isString)(r)?(e.scriptRef.log(r),!1):(r?null==e.disableLogs.ALL&&null==e.disableLogs.applyToCompany&&e.scriptRef.log("You were offered a new job at "+a+" as a "+v.a.companyPosition.positionName):null==e.disableLogs.ALL&&null==e.disableLogs.applyToCompany&&e.scriptRef.log("You failed to get a new job/promotion at "+a+" in the "+i+" field."),r)},getCompanyRep:function(a){var i=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyRep",i);if(t("getCompanyRep",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.playerReputation:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyRep(): "+a),-1)},getCompanyFavor:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyFavor",i);if(t("getCompanyFavor",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.favor:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavor(): "+a),-1)},getCompanyFavorGain:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyFavorGain",i);if(t("getCompanyFavorGain",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getCompanyFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.getFavorGain()[0]:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavorGain(): "+a),-1)},checkFactionInvitations:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("checkFactionInvitations",a);if(t("checkFactionInvitations",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.factionInvitations.slice()},joinFaction:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("joinFaction",i);if(t("joinFaction",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(m.d)(a))return e.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."),!1;if(!v.a.factionInvitations.includes(a))return e.scriptRef.log("ERROR: Cannot join "+a+" Faction because you have not been invited. joinFaction() failed"),!1;var r=v.a.factionInvitations.indexOf(a);if(-1===r)return e.scriptRef.log("ERROR: Cannot join "+a+" Faction because you have not been invited. joinFaction() failed"),!1;v.a.factionInvitations.splice(r,1);var o=m.b[a];return Object(m.h)(o),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.joinFaction&&e.scriptRef.log("Joined the "+a+" faction."),!0},workForFaction:function(a,i){var r=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("workForFaction",r);if(t("workForFaction",r),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(v.a.inGang()&&void 0!==p.a[a])e.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");else{if(!b.c){if(!Object(m.d)(a))return e.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."),!1;if(!v.a.factions.includes(a))return e.scriptRef.log("ERROR: workForFaction() failed because you are not a member of "+a),!1;if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.workForFaction&&e.scriptRef.log(o)}var s=m.b[a];switch(i.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(s.name)?(v.a.startFactionHackWork(s),e.scriptRef.log("Started carrying out hacking contracts for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot carry out hacking contracts for "+s.name+". workForFaction() failed"),!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(s.name)?(v.a.startFactionFieldWork(s),e.scriptRef.log("Started carrying out field missions for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot carry out field missions for "+s.name+". workForFaction() failed"),!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(s.name)?(v.a.startFactionSecurityWork(s),e.scriptRef.log("Started serving as security details for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot serve as security detail for "+s.name+". workForFaction() failed"),!1);default:e.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): "+i)}return!0}e.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.")}},getFactionRep:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionRep",i);if(t("getFactionRep",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].playerReputation:(e.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."),-1)},getFactionFavor:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionFavor",i);if(t("getFactionFavor",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].favor:(e.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist."),-1)},getFactionFavorGain:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionFavorGain",i);if(t("getFactionFavorGain",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getFactionFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].getFavorGain()[0]:(e.scriptRef.log("ERROR: Faction specified in getFactionFavorGain() does not exist."),-1)},createProgram:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("createProgram",i);if(t("createProgram",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void e.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");if(v.a.isWorking){var r=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.createProgram&&e.scriptRef.log(r)}a=a.toLowerCase();let o=null;for(const e in u.a)u.a[e].name.toLowerCase()==a&&(o=u.a[e]);return null==o?(e.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: "+a),!1):v.a.hasProgram(o.name)?(e.scriptRef.log("ERROR: createProgram() failed because you already have the "+o.name+" program"),!1):o.create.req()?(v.a.startCreateProgramWork(o.name,o.create.time,o.create.level),null==e.disableLogs.ALL&&null==e.disableLogs.createProgram&&e.scriptRef.log("Began creating program: "+a),!0):(e.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create "+o.name+" (level "+o.create.level+" req)"),!1)},commitCrime:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("commitCrime",i);if(t("commitCrime",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void e.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");if(v.a.isWorking){var r=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log(r)}switch(v.a.city){case y.a.Aevum:v.a.location=y.a.AevumSlums;break;case y.a.Chongqing:v.a.location=y.a.ChongqingSlums;break;case y.a.Sector12:v.a.location=y.a.Sector12Slums;break;case y.a.NewTokyo:v.a.location=y.a.NewTokyoSlums;break;case y.a.Ishima:v.a.location=y.a.IshimaSlums;break;case y.a.Volhaven:v.a.location=y.a.VolhavenSlums;break;default:console.log("Invalid Player.city value")}const s=Object(o.c)(a.toLowerCase());if(null==s)throw Object(R.d)(e,"Invalid crime passed into commitCrime(): "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log("Attempting to commit crime: "+s.name+"..."),s.commit(c.a.CrimeSingFnDivider,{workerscript:e})},getCrimeChance:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCrimeChance",i);if(t("getCrimeChance",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");const r=Object(o.c)(a.toLowerCase());if(null==r)throw Object(R.d)(e,"Invalid crime passed into getCrimeChance(): "+r);return r.successRate()},getOwnedAugmentations:function(a=!1){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getOwnedAugmentations",i);if(t("getOwnedAugmentations",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");for(var r=[],o=0;o=3))throw Object(R.d)(e,"Cannot run getOwnedSourceFiles(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");let i=[];for(let e=0;e=3))throw Object(R.d)(e,"Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(m.d)(a))return e.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): "+a),[];for(var r=m.b[a],o=[],s=0;s=3))throw Object(R.d)(e,"Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(i.f)(a))return e.scriptRef.log("ERROR: getAugmentationCost() failed. Invalid Augmentation name passed in (note: this is case-sensitive): "+a),[-1,-1];var o=i.c[a];return[o.baseRepRequirement,o.baseCost]},purchaseAugmentation:function(a,r){var o=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(o*=8),e.checkingRam)return n("purchaseAugmentation",o);if(t("purchaseAugmentation",o),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");var s=m.b[a];if(null==s||!(s instanceof m.a))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: "+a),!1;if(!s.augmentations.includes(r))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because the faction "+a+" does not contain the "+r+" augmentation"),!1;var l=i.c[r];if(null==l||!(l instanceof i.a))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid augmentation name: "+r),!1;var u=!1;if(l.name===i.b.NeuroFluxGovernor&&(u=!0),!u){for(var d=0;d=3))throw Object(R.d)(e,"Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return 0===v.a.queuedAugmentations.length?(e.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"),!1):(v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),e.scriptRef.log("Installing Augmentations. This will cause this script to be killed"),Object(i.i)(a),!0)},bladeburner:{getContractNames:function(){if(e.checkingRam)return n("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getContractNamesNetscriptFn();throw Object(R.d)(e,"getContractNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getOperationNames:function(){if(e.checkingRam)return n("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getOperationNamesNetscriptFn();throw Object(R.d)(e,"getOperationNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getBlackOpNames:function(){if(e.checkingRam)return n("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getBlackOpNamesNetscriptFn();throw Object(R.d)(e,"getBlackOpNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getGeneralActionNames:function(){if(e.checkingRam)return n("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getGeneralActionNamesNetscriptFn();throw Object(R.d)(e,"getGeneralActionNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillNames:function(){if(e.checkingRam)return n("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getSkillNamesNetscriptFn();throw Object(R.d)(e,"getSkillNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},startAction:function(a="",i=""){if(e.checkingRam)return n("startAction",c.a.ScriptBladeburnerApiBaseRamCost);if(t("startAction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.startActionNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.startAction() failed with exception: "+t)}throw Object(R.d)(e,"startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},stopBladeburnerAction:function(){if(e.checkingRam)return n("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2);if(t("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.resetAction();throw Object(R.d)(e,"stopBladeburnerAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCurrentAction:function(){if(e.checkingRam)return n("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4);if(t("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U)){let e=v.a.bladeburner.getTypeAndNameFromActionId(v.a.bladeburner.action);return"Idle"===e.type&&"Idle"===e.name?null:e}throw Object(R.d)(e,"getCurrentAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionTime:function(a="",i=""){if(e.checkingRam)return n("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getActionTimeNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getActionTime() failed with exception: "+t)}throw Object(R.d)(e,"getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionEstimatedSuccessChance:function(a="",i=""){if(e.checkingRam)return n("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getActionEstimatedSuccessChance() failed with exception: "+t)}throw Object(R.d)(e,"getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionCountRemaining:function(a="",i=""){if(e.checkingRam)return n("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getActionCountRemainingNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getActionCountRemaining() failed with exception: "+t)}throw Object(R.d)(e,"getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionMaxLevel:function(a="",i=""){if(e.checkingRam)return n("getActionMaxLevel",c.a.ScriptBladeburnerApiBaseRamCost);t("getActionMaxLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"getActionMaxLevel");try{var r=Object(S.b)("getActionMaxLevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return e.log(r),-1;const n=v.a.bladeburner.getActionObject(t);return null==n?(e.log(r),-1):n.maxLevel}catch(t){throw Object(R.d)(e,Object(S.c)("getActionMaxLevel",t))}},getActionCurrentLevel:function(a="",i=""){if(e.checkingRam)return n("getActionCurrentLevel",c.a.ScriptBladeburnerApiBaseRamCost);t("getActionCurrentLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"getActionCurrentLevel");try{var r=Object(S.b)("getActionCurrentLevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return e.log(r),-1;const n=v.a.bladeburner.getActionObject(t);return null==n?(e.log(r),-1):n.level}catch(t){throw Object(R.d)(e,Object(S.c)("getActionCurrentLevel",t))}},getActionAutolevel:function(a="",i=""){if(e.checkingRam)return n("getActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost);t("getActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"getActionAutolevel");try{var r=Object(S.b)("getActionAutolevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return e.log(r),!1;const n=v.a.bladeburner.getActionObject(t);return null==n?(e.log(r),!1):n.autoLevel}catch(t){throw Object(R.d)(e,Object(S.c)("getActionAutolevel",t))}},setActionAutolevel:function(a="",i="",r=!0){if(e.checkingRam)return n("setActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost);t("setActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"setActionAutolevel");try{var o=Object(S.b)("setActionAutolevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return void e.log(o);const n=v.a.bladeburner.getActionObject(t);if(null==n)return void e.log(o);n.autoLevel=r}catch(t){throw Object(R.d)(e,Object(S.c)("setActionAutolevel",t))}},setActionLevel:function(a="",i="",r=1){if(e.checkingRam)return n("setActionLevel",c.a.ScriptBladeburnerApiBaseRamCost);t("setActionLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"setActionLevel");try{var o=Object(S.b)("setActionLevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return void e.log(o);const n=v.a.bladeburner.getActionObject(t);if(null==n)return void e.log(o);if(r>n.maxLevel)return void e.log(`ERROR: bladeburner.${setActionLevel}() failed because level exceeds max level for given action.`);if(r<1)return void e.log(`ERROR: bladeburner.${setActionLevel}() failed because level is below 1.`);n.level=r}catch(t){throw Object(R.d)(e,Object(S.c)("setActionLevel",t))}},getRank:function(){if(e.checkingRam)return n("getRank",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getRank",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.rank;throw Object(R.d)(e,"getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillPoints:function(){if(e.checkingRam)return n("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.skillPoints;throw Object(R.d)(e,"getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillLevel:function(a=""){if(e.checkingRam)return n("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getSkillLevelNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getSkillLevel() failed with exception: "+t)}throw Object(R.d)(e,"getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},upgradeSkill:function(a){if(e.checkingRam)return n("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost);if(t("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.upgradeSkillNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.upgradeSkill() failed with exception: "+t)}throw Object(R.d)(e,"upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getTeamSize:function(a="",i=""){if(e.checkingRam)return n("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getTeamSizeNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getTeamSize() failed with exception: "+t)}throw Object(R.d)(e,"getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},setTeamSize:function(a="",i="",r){if(e.checkingRam)return n("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(t("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.setTeamSizeNetscriptFn(a,i,r,e)}catch(t){throw Object(R.d)(e,"Bladeburner.setTeamSize() failed with exception: "+t)}throw Object(R.d)(e,"setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedPopulation:function(a){if(e.checkingRam)return n("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getCityEstimatedPopulationNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getCityEstimatedPopulation() failed with exception: "+t)}throw Object(R.d)(e,"getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedCommunities:function(a){if(e.checkingRam)return n("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getCityEstimatedCommunitiesNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getCityEstimatedCommunities() failed with exception: "+t)}throw Object(R.d)(e,"getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityChaos:function(a){if(e.checkingRam)return n("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getCityChaosNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getCityChaos() failed with exception: "+t)}throw Object(R.d)(e,"getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},switchCity:function(a){if(e.checkingRam)return n("switchCity",c.a.ScriptBladeburnerApiBaseRamCost);if(t("switchCity",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.switchCityNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.switchCity() failed with exception: "+t)}throw Object(R.d)(e,"switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getStamina:function(){if(e.checkingRam)return n("getStamina",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getStamina",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return[v.a.bladeburner.stamina,v.a.bladeburner.maxStamina];throw Object(R.d)(e,"getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerFaction:function(){if(e.checkingRam)return n("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost);if(t("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.joinBladeburnerFactionNetscriptFn(e);throw Object(R.d)(e,"joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerDivision:function(){if(e.checkingRam)return n("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost);if(t("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost),7===v.a.bitNodeN||U)return v.a.bladeburner instanceof s.a||(v.a.strength>=100&&v.a.defense>=100&&v.a.dexterity>=100&&v.a.agility>=100?(v.a.bladeburner=new s.a({new:!0}),e.log("You have been accepted into the Bladeburner division"),!0):(e.log("You do not meet the requirements for joining the Bladeburner division"),!1));throw Object(R.d)(e,"joinBladeburnerDivision() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")}}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"f",function(){return l}),n.d(t,"e",function(){return c}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return h}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s});var a=n(25);let i={},r={};function o(e){i=""===e?{}:JSON.parse(e)}function s(e){r=""===e?{}:JSON.parse(e)}function l(){for(var e in i)i.hasOwnProperty(e)&&Object(a.c)("alias "+e+"="+i[e]);for(var e in r)r.hasOwnProperty(e)&&Object(a.c)("global alias "+e+"="+r[e])}function c(e,t=!1){var n=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=n&&3==n.length&&(t?function(e,t){e in i&&delete i[e];r[e]=t}(n[1],n[2]):function(e,t){e in r&&delete r[e];i[e]=t}(n[1],n[2]),!0)}function u(e){return r.hasOwnProperty(e)?r[e]:null}function d(e){return i.hasOwnProperty(e)?(delete i[e],!0):!!r.hasOwnProperty(e)&&(delete r[e],!0)}function h(e){var t,n=e.split(" ");if(n.length>0){if(null!=(r=(t=n[0],i.hasOwnProperty(t)?i[t]:null)))n[0]=r;else null!=(r=u(n[0]))&&(n[0]=r);for(var a=0;ae)return!1;if((n+=t[a+1])>=e)return!0}}function d(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):!1!==t&&u(e,l)))}function h(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):!1!==t&&(u(e,l)||u(e,c)))))}var p=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function m(e,t){return new p(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},y={startsExpr:!0},f={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,f[e]=new p(e,t)}var v={num:new p("num",y),regexp:new p("regexp",y),string:new p("string",y),name:new p("name",y),eof:new p("eof"),bracketL:new p("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new p("]"),braceL:new p("{",{beforeExpr:!0,startsExpr:!0}),braceR:new p("}"),parenL:new p("(",{beforeExpr:!0,startsExpr:!0}),parenR:new p(")"),comma:new p(",",g),semi:new p(";",g),colon:new p(":",g),dot:new p("."),question:new p("?",g),arrow:new p("=>",g),template:new p("template"),ellipsis:new p("...",g),backQuote:new p("`",y),dollarBraceL:new p("${",{beforeExpr:!0,startsExpr:!0}),eq:new p("=",{beforeExpr:!0,isAssign:!0}),assign:new p("_=",{beforeExpr:!0,isAssign:!0}),incDec:new p("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new p("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=",6),relational:m("",7),bitShift:m("<>",8),plusMin:new p("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new p("**",{beforeExpr:!0}),_break:b("break"),_case:b("case",g),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",g),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",g),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",y),_if:b("if"),_return:b("return",g),_switch:b("switch"),_throw:b("throw",g),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",y),_super:b("super",y),_class:b("class"),_extends:b("extends",g),_export:b("export"),_import:b("import"),_null:b("null",y),_true:b("true",y),_false:b("false",y),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},_=/\r\n?|\n|\u2028|\u2029/,k=new RegExp(_.source,"g");function E(e){return 10===e||13===e||8232===e||8233===e}var O=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,w=Object.prototype,S=w.hasOwnProperty,T=w.toString;function R(e,t){return S.call(e,t)}var x=Array.isArray||function(e){return"[object Array]"===T.call(e)},I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var P=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function N(e,t){for(var n=1,a=0;;){k.lastIndex=a;var i=k.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),x(t.onToken)){var a=t.onToken;t.onToken=function(e){return a.push(e)}}return x(t.onComment)&&(t.onComment=function(e,t){return function(n,a,i,r,o,s){var l={type:n?"Block":"Line",value:a,start:i,end:r};e.locations&&(l.loc=new P(this,o,s)),e.ranges&&(l.range=[i,r]),t.push(l)}}(t,t.onComment)),t}var L={};function B(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}var j=function(e,n,i){this.options=e=M(e),this.sourceFile=e.sourceFile,this.keywords=B(a[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var o=e.ecmaVersion;!(r=t[o]);o--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=B(r);var s=(r?r+" ":"")+t.strict;this.reservedWordsStrict=B(s),this.reservedWordsStrictBind=B(s+" "+t.strictBind),this.input=String(n),this.containsEsc=!1,this.loadPlugins(e.plugins),i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(_).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=v.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};j.prototype.isKeyword=function(e){return this.keywords.test(e)},j.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},j.prototype.extend=function(e,t){this[e]=t(this[e])},j.prototype.loadPlugins=function(e){for(var t in e){var n=L[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},j.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var D=j.prototype,F=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;D.strictDirective=function(e){for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=F.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},D.eat=function(e){return this.type===e&&(this.next(),!0)},D.isContextual=function(e){return this.type===v.name&&this.value===e},D.eatContextual=function(e){return this.value===e&&this.eat(v.name)},D.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},D.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||_.test(this.input.slice(this.lastTokEnd,this.start))},D.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},D.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},D.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},D.expect=function(e){this.eat(e)||this.unexpected()},D.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var H=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};D.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},D.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},D.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var G={kind:"loop"},U={kind:"switch"};W.isLet=function(){if(this.type!==v.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(d(n,!0)){for(var a=t+1;h(this.input.charCodeAt(a),!0);)++a;var i=this.input.slice(t,a);if(!this.isKeyword(i))return!0}return!1},W.isAsyncFunction=function(){if(this.type!==v.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length;return!(_.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&h(this.input.charAt(t+8)))},W.parseStatement=function(e,t,n){var a,i=this.type,r=this.startNode();switch(this.isLet()&&(i=v._var,a="let"),i){case v._break:case v._continue:return this.parseBreakContinueStatement(r,i.keyword);case v._debugger:return this.parseDebuggerStatement(r);case v._do:return this.parseDoStatement(r);case v._for:return this.parseForStatement(r);case v._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1);case v._class:return e||this.unexpected(),this.parseClass(r,!0);case v._if:return this.parseIfStatement(r);case v._return:return this.parseReturnStatement(r);case v._switch:return this.parseSwitchStatement(r);case v._throw:return this.parseThrowStatement(r);case v._try:return this.parseTryStatement(r);case v._const:case v._var:return a=a||this.value,e||"var"==a||this.unexpected(),this.parseVarStatement(r,a);case v._while:return this.parseWhileStatement(r);case v._with:return this.parseWithStatement(r);case v.braceL:return this.parseBlock();case v.semi:return this.parseEmptyStatement(r);case v._export:case v._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===v._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(r,!0);var o=this.value,s=this.parseExpression();return i===v.name&&"Identifier"===s.type&&this.eat(v.colon)?this.parseLabeledStatement(r,o,s):this.parseExpressionStatement(r,s)}},W.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(v.semi)||this.insertSemicolon()?e.label=null:this.type!==v.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a=6?this.eat(v.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},W.parseForStatement=function(e){if(this.next(),this.labels.push(G),this.enterLexicalScope(),this.expect(v.parenL),this.type===v.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===v._var||this.type===v._const||t){var n=this.startNode(),a=t?"let":this.value;return this.next(),this.parseVar(n,!0,a),this.finishNode(n,"VariableDeclaration"),!(this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==a&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new H,r=this.parseExpression(!0,i);return this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(r),this.checkLVal(r),this.checkPatternErrors(i,!0),this.parseForIn(e,r)):(this.checkExpressionErrors(i,!0),this.parseFor(e,r))},W.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},W.isFunction=function(){return this.type===v._function||this.isAsyncFunction()},W.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(v._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},W.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(v.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},W.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(v.braceL),this.labels.push(U),this.enterLexicalScope();for(var n=!1;this.type!=v.braceR;)if(this.type===v._case||this.type===v._default){var a=this.type===v._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),a?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(v.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},W.parseThrowStatement=function(e){return this.next(),_.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var q=[];W.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===v._catch){var t=this.startNode();this.next(),this.expect(v.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(v.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(v._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},W.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},W.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(G),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},W.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},W.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},W.parseLabeledStatement=function(e,t,n){for(var a=0;a=0;r--){var o=this.labels[r];if(o.statementStart!=e.start)break;o.statementStart=this.start,o.kind=i}return this.labels.push({name:t,kind:i,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},W.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},W.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(v.braceL),e&&this.enterLexicalScope();!this.eat(v.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},W.parseFor=function(e,t){return e.init=t,this.expect(v.semi),e.test=this.type===v.semi?null:this.parseExpression(),this.expect(v.semi),e.update=this.type===v.parenR?null:this.parseExpression(),this.expect(v.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},W.parseForIn=function(e,t){var n=this.type===v._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(v.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},W.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var a=this.startNode();if(this.parseVarId(a,n),this.eat(v.eq)?a.init=this.parseMaybeAssign(t):"const"!==n||this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==a.id.type||t&&(this.type===v._in||this.isContextual("of"))?a.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(a,"VariableDeclarator")),!this.eat(v.comma))break}return e},W.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},W.parseFunction=function(e,t,n,a){this.initFunction(e),this.options.ecmaVersion>=6&&!a&&(e.generator=this.eat(v.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&&(e.id="nullableID"===t&&this.type!=v.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,r=this.inAsync,o=this.yieldPos,s=this.awaitPos,l=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==v.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=r,this.yieldPos=o,this.awaitPos=s,this.inFunction=l,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},W.parseFunctionParams=function(e){this.expect(v.parenL),e.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},W.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),a=!1;for(n.body=[],this.expect(v.braceL);!this.eat(v.braceR);)if(!this.eat(v.semi)){var i=this.startNode(),r=this.eat(v.star),o=!1,s=this.type===v.name&&"static"===this.value;this.parsePropertyName(i),i.static=s&&this.type!==v.parenL,i.static&&(r&&this.unexpected(),r=this.eat(v.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!r&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==v.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind="method";var l=!1;if(!i.computed){var c=i.key;r||o||"Identifier"!==c.type||this.type===v.parenL||"get"!==c.name&&"set"!==c.name||(l=!0,i.kind=c.name,c=this.parsePropertyName(i)),!i.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(a&&this.raise(c.start,"Duplicate constructor in the same class"),l&&this.raise(c.start,"Constructor can't have get/set modifier"),r&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),i.kind="constructor",a=!0)}if(this.parseClassMethod(n,i,r,o),l){var u="get"===i.kind?0:1;if(i.value.params.length!==u){var d=i.value.start;"get"===i.kind?this.raiseRecoverable(d,"getter should have no params"):this.raiseRecoverable(d,"setter should have exactly one param")}else"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},W.parseClassMethod=function(e,t,n,a){t.value=this.parseMethod(n,a),e.body.push(this.finishNode(t,"MethodDefinition"))},W.parseClassId=function(e,t){e.id=this.type===v.name?this.parseIdent():!0===t?this.unexpected():null},W.parseClassSuper=function(e){e.superClass=this.eat(v._extends)?this.parseExprSubscripts():null},W.parseExport=function(e,t){if(this.next(),this.eat(v.star))return this.expectContextual("from"),e.source=this.type===v.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(v._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===v._function||(n=this.isAsyncFunction())){var a=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(a,"nullableID",!1,n)}else if(this.type===v._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===v.string?this.parseExprAtom():this.unexpected();else{for(var r=0;r=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0;n=6&&(e.computed||e.method||e.shorthand))){var n,a=e.key;switch(a.type){case"Identifier":n=a.name;break;case"Literal":n=String(a.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(a.start,"Redefinition of __proto__ property"),t.proto=!0);else{var r=t[n="$"+n];r?("init"===i?this.strict&&r.init||r.get||r.set:r.init||r[i])&&this.raiseRecoverable(a.start,"Redefinition of property"):r=t[n]={init:!1,get:!1,set:!1},r[i]=!0}}},V.parseExpression=function(e,t){var n=this.start,a=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===v.comma){var r=this.startNodeAt(n,a);for(r.expressions=[i];this.eat(v.comma);)r.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(r,"SequenceExpression")}return i},V.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var a=!1,i=-1,r=-1;t?(i=t.parenthesizedAssign,r=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new H,a=!0);var o=this.start,s=this.startLoc;this.type!=v.parenL&&this.type!=v.name||(this.potentialArrowAt=this.start);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,o,s)),this.type.isAssign){this.checkPatternErrors(t,!0),a||H.call(t);var c=this.startNodeAt(o,s);return c.operator=this.value,c.left=this.type===v.eq?this.toAssignable(l):l,t.shorthandAssign=-1,this.checkLVal(l),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return a&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),r>-1&&(t.trailingComma=r),l},V.parseMaybeConditional=function(e,t){var n=this.start,a=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(v.question)){var r=this.startNodeAt(n,a);return r.test=i,r.consequent=this.parseMaybeAssign(),this.expect(v.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return i},V.parseExprOps=function(e,t){var n=this.start,a=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,a,-1,e)},V.parseExprOp=function(e,t,n,a,i){var r=this.type.binop;if(null!=r&&(!i||this.type!==v._in)&&r>a){var o=this.type===v.logicalOR||this.type===v.logicalAND,s=this.value;this.next();var l=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1),l,c,r,i),d=this.buildBinary(t,n,e,u,s,o);return this.parseExprOp(d,t,n,a,i)}return e},V.buildBinary=function(e,t,n,a,i,r){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=a,this.finishNode(o,r?"LogicalExpression":"BinaryExpression")},V.parseMaybeUnary=function(e,t){var n,a=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var r=this.startNode(),o=this.type===v.incDec;r.operator=this.value,r.prefix=!0,this.next(),r.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(r.argument):this.strict&&"delete"===r.operator&&"Identifier"===r.argument.type?this.raiseRecoverable(r.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(r,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var s=this.startNodeAt(a,i);s.operator=this.value,s.prefix=!1,s.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(s,"UpdateExpression")}}return!t&&this.eat(v.starstar)?this.buildBinary(a,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},V.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,a=this.parseExprAtom(e),i="ArrowFunctionExpression"===a.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return a;var r=this.parseSubscripts(a,t,n);return e&&"MemberExpression"===r.type&&(e.parenthesizedAssign>=r.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=r.start&&(e.parenthesizedBind=-1)),r},V.parseSubscripts=function(e,t,n,a){for(var i,r=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=this.eat(v.bracketL))||this.eat(v.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=i?this.parseExpression():this.parseIdent(!0),o.computed=!!i,i&&this.expect(v.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!a&&this.eat(v.parenL)){var s=new H,l=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var u=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1,s);if(r&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(s,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=l,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),u,!0);this.checkExpressionErrors(s,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=c||this.awaitPos;var d=this.startNodeAt(t,n);d.callee=e,d.arguments=u,e=this.finishNode(d,"CallExpression")}else{if(this.type!==v.backQuote)return e;var h=this.startNodeAt(t,n);h.tag=e,h.quasi=this.parseTemplate(),e=this.finishNode(h,"TaggedTemplateExpression")}},V.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case v._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case v._this:var a=this.type===v._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,a);case v.name:var i=this.start,r=this.startLoc,o=this.parseIdent(this.type!==v.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(v._function))return this.parseFunction(this.startNodeAt(i,r),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(v.arrow))return this.parseArrowExpression(this.startNodeAt(i,r),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===v.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(v.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,r),[o],!0)}return o;case v.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case v.num:case v.string:return this.parseLiteral(this.value);case v._null:case v._true:case v._false:return(t=this.startNode()).value=this.type===v._null?null:this.type===v._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case v.parenL:var l=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),c;case v.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(v.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case v.braceL:return this.parseObj(!1,e);case v._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case v._class:return this.parseClass(this.startNode(),!1);case v._new:return this.parseNew();case v.backQuote:return this.parseTemplate();default:this.unexpected()}},V.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},V.parseParenExpression=function(){this.expect(v.parenL);var e=this.parseExpression();return this.expect(v.parenR),e},V.parseParenAndDistinguishExpression=function(e){var t,n=this.start,a=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var r,o,s=this.start,l=this.startLoc,c=[],u=!0,d=!1,h=new H,p=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==v.parenR;){if(u?u=!1:this.expect(v.comma),i&&this.afterTrailingComma(v.parenR,!0)){d=!0;break}if(this.type===v.ellipsis){r=this.start,c.push(this.parseParenItem(this.parseRest())),this.type===v.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==v.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var g=this.start,y=this.startLoc;if(this.expect(v.parenR),e&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=p,this.awaitPos=m,this.parseParenArrowList(n,a,c);c.length&&!d||this.unexpected(this.lastTokStart),r&&this.unexpected(r),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=m||this.awaitPos,c.length>1?((t=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(t,"SequenceExpression",g,y)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var f=this.startNodeAt(n,a);return f.expression=t,this.finishNode(f,"ParenthesizedExpression")}return t},V.parseParenItem=function(e){return e},V.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Y=[];V.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(v.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,a=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,a,!0),this.eat(v.parenL)?e.arguments=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Y,this.finishNode(e,"NewExpression")},V.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===v.backQuote,this.finishNode(e,"TemplateElement")},V.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(v.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(v.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},V.parseObj=function(e,t){var n=this.startNode(),a=!0,i={};for(n.properties=[],this.next();!this.eat(v.braceR);){if(a)a=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var r,o,s,l,c=this.startNode();this.options.ecmaVersion>=6&&(c.method=!1,c.shorthand=!1,(e||t)&&(s=this.start,l=this.startLoc),e||(r=this.eat(v.star))),this.parsePropertyName(c),e||!(this.options.ecmaVersion>=8)||r||c.computed||"Identifier"!==c.key.type||"async"!==c.key.name||this.type===v.parenL||this.type===v.colon||this.canInsertSemicolon()?o=!1:(o=!0,this.parsePropertyName(c,t)),this.parsePropertyValue(c,e,r,o,s,l,t),this.checkPropClash(c,i),n.properties.push(this.finishNode(c,"Property"))}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},V.parsePropertyValue=function(e,t,n,a,i,r,o){if((n||a)&&this.type===v.colon&&this.unexpected(),this.eat(v.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===v.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,a);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=v.comma&&this.type!=v.braceR){(n||a||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var s="get"===e.kind?0:1;if(e.value.params.length!==s){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(i,r,e.key):this.type===v.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,r,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},V.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(v.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(v.bracketR),e.key;e.computed=!1}return e.key=this.type===v.num||this.type===v.string?this.parseExprAtom():this.parseIdent(!0)},V.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},V.parseMethod=function(e,t){var n=this.startNode(),a=this.inGenerator,i=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(v.parenL),n.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=a,this.inAsync=i,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(n,"FunctionExpression")},V.parseArrowExpression=function(e,t,n){var a=this.inGenerator,i=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=a,this.inAsync=i,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},V.parseFunctionBody=function(e,t){var n=t&&this.type!==v.braceL,a=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var r=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);a&&!r||(i=this.strictDirective(this.end))&&r&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!a&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=a},V.isSimpleParamList=function(e){for(var t=0;t=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},V.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==v.semi||this.canInsertSemicolon()||this.type!=v.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(v.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},V.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var z=j.prototype;z.raise=function(e,t){var n=N(this.input,e);t+=" ("+n.line+":"+n.column+")";var a=new SyntaxError(t);throw a.pos=e,a.loc=n,a.raisedAt=this.pos,a},z.raiseRecoverable=z.raise,z.curPosition=function(){if(this.options.locations)return new I(this.curLine,this.pos-this.lineStart)};var J=j.prototype,$=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var a=0;a=0;e--)if(this.context[e].generator)return!0;return!1},ne.updateContext=function(e){var t,n=this.type;n.keyword&&e==v.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},v.parenR.updateContext=v.braceR.updateContext=function(){if(1!=this.context.length){var e,t=this.context.pop();t===te.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):this.exprAllowed=t===te.b_tmpl||!t.isExpr}else this.exprAllowed=!0},v.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0},v.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0},v.parenL.updateContext=function(e){var t=e===v._if||e===v._for||e===v._with||e===v._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0},v.incDec.updateContext=function(){},v._function.updateContext=function(e){e.beforeExpr&&e!==v.semi&&e!==v._else&&(e!==v.colon&&e!==v.braceL||this.curContext()!==te.b_stat)&&this.context.push(te.f_expr),this.exprAllowed=!1},v.backQuote.updateContext=function(){this.curContext()===te.q_tmpl?this.context.pop():this.context.push(te.q_tmpl),this.exprAllowed=!1},v.star.updateContext=function(e){e==v._function&&(this.curContext()===te.f_expr?this.context[this.context.length-1]=te.f_expr_gen:this.context.push(te.f_gen)),this.exprAllowed=!0},v.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ae=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new P(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ie=j.prototype,re="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);function oe(e,t,n,a){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&a.raise(n,"Error parsing regular expression: "+e.message),e}}ie.next=function(){this.options.onToken&&this.options.onToken(new ae(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ie.getToken=function(){return this.next(),new ae(this)},"undefined"!=typeof Symbol&&(ie[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===v.eof,value:t}}}}),ie.curContext=function(){return this.context[this.context.length-1]},ie.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(v.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ie.readToken=function(e){return d(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ie.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},ie.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,a=this.input.indexOf("*/",this.pos+=2);if(-1===a&&this.raise(this.pos-2,"Unterminated comment"),this.pos=a+2,this.options.locations)for(k.lastIndex=n;(e=k.exec(this.input))&&e.index8&&e<14||e>=5760&&O.test(String.fromCharCode(e))))break e;++this.pos}}},ie.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ie.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(v.ellipsis)):(++this.pos,this.finishToken(v.dot))},ie.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(v.assign,2):this.finishOp(v.slash,1)},ie.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,a=42===e?v.star:v.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,a=v.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(v.assign,n+1):this.finishOp(a,n)},ie.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?v.logicalOR:v.logicalAND,2):61===t?this.finishOp(v.assign,2):this.finishOp(124===e?v.bitwiseOR:v.bitwiseAND,1)},ie.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(v.assign,2):this.finishOp(v.bitwiseXOR,1)},ie.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&_.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(v.incDec,2):61===t?this.finishOp(v.assign,2):this.finishOp(v.plusMin,1)},ie.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(v.assign,n+1):this.finishOp(v.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(v.relational,n))},ie.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(v.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(v.arrow)):this.finishOp(61===e?v.eq:v.prefix,1)},ie.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(v.parenL);case 41:return++this.pos,this.finishToken(v.parenR);case 59:return++this.pos,this.finishToken(v.semi);case 44:return++this.pos,this.finishToken(v.comma);case 91:return++this.pos,this.finishToken(v.bracketL);case 93:return++this.pos,this.finishToken(v.bracketR);case 123:return++this.pos,this.finishToken(v.braceL);case 125:return++this.pos,this.finishToken(v.braceR);case 58:return++this.pos,this.finishToken(v.colon);case 63:return++this.pos,this.finishToken(v.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(v.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(v.prefix,1)}this.raise(this.pos,"Unexpected character '"+le(e)+"'")},ie.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var se=!!oe("￿","u");function le(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}ie.readRegexp=function(){for(var e,t,n=this,a=this.pos;;){n.pos>=n.input.length&&n.raise(a,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(_.test(i)&&n.raise(a,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var r=this.input.slice(a,this.pos);++this.pos;var o=this.readWord1(),s=r,l="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(a,"Invalid regular expression flag"),o.indexOf("u")>=0&&(se?l="u":(s=(s=s.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(a+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),l=l.replace("u","")))}var u=null;return re||(oe(s,l,a,this),u=oe(r,o)),this.finishToken(v.regexp,{pattern:r,flags:o,value:u})},ie.readInt=function(e,t){for(var n=this.pos,a=0,i=0,r=null==t?1/0:t;i=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=e)break;++this.pos,a=a*e+o}return this.pos===n||null!=t&&this.pos-n!==t?null:a},ie.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,t)},ie.readNumber=function(e){var t=this.pos,n=!1,a=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),a&&this.pos==t+1&&(a=!1);var i=this.input.charCodeAt(this.pos);46!==i||a||(++this.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||a||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=this.input.slice(t,this.pos);return n?r=parseFloat(o):a&&1!==o.length?/[89]/.test(o)||this.strict?this.raise(t,"Invalid number"):r=parseInt(o,8):r=parseInt(o,10),this.finishToken(v.num,r)},ie.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},ie.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;92===a?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(E(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(v.string,t)},ie.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos===this.start&&this.type===v.template?36===n?(this.pos+=2,this.finishToken(v.dollarBraceL)):(++this.pos,this.finishToken(v.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(v.template,e));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(E(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},ie.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return le(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(n,8);return a>255&&(n=n.slice(0,-1),a=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(a)}return String.fromCharCode(t)}},ie.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},ie.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,a=this.options.ecmaVersion>=6;this.pos0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}E.prototype.setPosition=function(e,t){this.pos=[e,t]},E.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"))},E.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"))},E.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t(this.start(),!1));var d=document.createElement("a");d.innerHTML="Forfeit Mission (Exit)",d.classList.add("a-link-button"),d.classList.add("hack-mission-header-element"),d.style.display="inline-block",d.addEventListener("click",()=>(this.finishMission(!1),!1));var h=document.createElement("p");h.setAttribute("id","hacking-mission-timer"),h.style.display="inline-block",h.style.margin="6px";var p=document.createElement("span");p.style.display="block",p.classList.add("hack-mission-action-buttons-container");for(var m=0;m<6;++m)this.actionButtons.push(document.createElement("a")),this.actionButtons[m].style.display="inline-block",this.actionButtons[m].classList.add("a-link-button-inactive"),this.actionButtons[m].classList.add("tooltip"),this.actionButtons[m].classList.add("hack-mission-header-element"),p.appendChild(this.actionButtons[m]);this.actionButtons[0].innerText="Attack(a)";var g=document.createElement("span");g.classList.add("tooltiptexthigh"),g.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(g),this.actionButtons[1].innerText="Scan(s)";var E=document.createElement("span");E.classList.add("tooltiptexthigh"),E.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(E),this.actionButtons[2].innerText="Weaken(w)";var O=document.createElement("span");O.classList.add("tooltiptexthigh"),O.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(O),this.actionButtons[3].innerText="Fortify(f)";var C=document.createElement("span");C.classList.add("tooltiptexthigh"),C.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(C),this.actionButtons[4].innerText="Overflow(r)";var w=document.createElement("span");w.classList.add("tooltiptexthigh"),w.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(w),this.actionButtons[5].innerText="Drop Connection(d)";var S=document.createElement("span");S.classList.add("tooltiptexthigh"),S.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(S);var T=document.createElement("p"),R=document.createElement("p");T.style.display="inline-block",R.style.display="inline-block",T.style.color="#00ccff",R.style.color="red",T.style.margin="4px",R.style.margin="4px",T.setAttribute("id","hacking-mission-player-stats"),R.setAttribute("id","hacking-mission-enemy-stats"),p.appendChild(T),p.appendChild(R),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===y.Core&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(f,!1),this.selectedNode.forEach(function(e){e.action=f})):console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(b,!1),this.selectedNode.forEach(function(e){e.action=b}))}else console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(v,!1),this.selectedNode.forEach(function(e){e.action=v}))}else console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(_,!1),this.selectedNode.forEach(function(e){e.action=_})):console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(k,!1),this.selectedNode.forEach(function(e){e.action=k}))}else console.log("ERR: 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=_}):console.log("ERR: Pressing Action button without selected node")});var x=document.createElement("p");e.appendChild(i),e.appendChild(r),e.appendChild(l),e.appendChild(c),e.appendChild(d),e.appendChild(h),e.appendChild(p),e.appendChild(x)},O.prototype.setActionButtonsInactive=function(){for(var e=0;ePlayer Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;tEnemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},O.prototype.calculateDefenses=function(){for(var e=0,t=0;tPlayer Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;tEnemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},O.prototype.removeAvailablePosition=function(e,t){for(var n=0;nDef: "+Object(u.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){var t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],a=(document.getElementById(n),document.getElementById(n+"-txt"));switch(e.type){case y.Core:t="CPU Core
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Firewall:t="Firewall
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Database:t="Database
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Spam:t="Spam
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Transfer:t="Transfer
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Shield:default:t="Shield
HP: "+Object(u.formatNumber)(e.hp,1)}t+="
Atk: "+Object(u.formatNumber)(e.atk,1)+"
Def: "+Object(u.formatNumber)(e.def,1),e.action&&(t+="
"+e.action),a.innerHTML=t}else console.log("ERR: Calling updateNodeDomElement on a Node without an element")},O.prototype.getNodeFromElement=function(e){var t=(Object(h.isString)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.log("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.log("ERROR: Unexpected values for x and y: "+n+", "+a),null):this.map[n][a]},O.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.log("Error getting Node object");var t=this;function n(){!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.log("Error getting Node object"),n.plyrCtrl&&(C(e),n.select(e.actionButtons),e.selectedNode.push(n))}(t,e)}e.addEventListener("click",n),e.addEventListener("dblclick",function(){!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.log("ERROR: Getting Node Object in multiselectNode()"),n.plyrCtrl){C(e);var a=n.type;a===y.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))})}}(t,e)}),e.firstChild&&e.firstChild.addEventListener("click",n)},O.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n0&&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(l.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{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,t)=>{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 w=0;O.prototype.process=function(e=1){if(this.started&&!((w+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,w)}),this.playerNodes.forEach(e=>{e.type!==y.Transfer&&e.type!==y.Shield&&e.type!==y.Firewall||(t|=this.processNode(e,w))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,w)}),this.enemyNodes.forEach(e=>{e.type!==y.Transfer&&e.type!==y.Shield&&e.type!==y.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,w))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*w,e.hp+=.1*w}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*w,e.maxhp+=.05*w,e.hp+=.1*w,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=w*i.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),w=0)):this.finishMission(!1):this.finishMission(!0)}},O.prototype.processNode=function(e,t=1){if(null!=e.action){var n,i,r=null;e.conn&&(null==(r=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(r.plyrCtrl?(n=this.playerDef,i=this.enemyAtk):r.enmyCtrl?(n=this.enemyDef,i=this.playerAtk):(n=r.def,i=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*a.a.HackingMissionDifficultyToHacking;switch(e.action){case f:if(null==r)break;if(null==e.conn)break;var u=this.calculateAttackDamage(i,n,l?o.a.hacking_skill:c);r.hp-=u/5*t;break;case b:if(null==r)break;if(null==e.conn)break;var d=this.calculateScanEffect(i,n,l?o.a.hacking_skill:c);r.def-=d/5*t,s=!0;break;case v:if(null==r)break;if(null==e.conn)break;d=this.calculateWeakenEffect(i,n,l?o.a.hacking_skill:c);r.atk-=d/5*t,s=!0;break;case _:d=this.calculateFortifyEffect(o.a.hacking_skill);e.def+=d/5*t,s=!0;break;case k:d=this.calculateOverflowEffect(o.a.hacking_skill);if(e.def{0===e.targetedCount&&(e.def*=a.a.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),r&&this.updateNodeDomElement(r),s}},O.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case y.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(d.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(d.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(d.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=_}else{var a;null==(a=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.log("Error getting Target node Object in enemyAISelectAction()"),a.def>this.enemyAtk+15?e.def<50?e.action=_:e.action=k:Math.abs(a.def-this.enemyAtk)<=15?e.action=b:e.action=f}break;case y.Transfer:e.def<125?e.action=_:e.action=k;break;case y.Firewall:case y.Shield:e.action=_}};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(p=!1,m=null,e){var t=1+this.faction.favor/100;console.log("Hacking mission base reward: "+this.reward),console.log("favorMult: "+t),console.log("rep mult: "+o.a.faction_rep_mult);var n=this.reward*o.a.faction_rep_mult*t;Object(s.dialogBoxCreate)("Mission won! You earned "+Object(u.formatNumber)(n,3)+" reputation with "+this.faction.name),o.a.gainIntelligenceExp(this.difficulty*a.a.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",i.Engine.loadFactionContent(),Object(r.c)(this.faction.name)}}).call(this,n(53))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayToString=function(e){return`[${e.join(", ")}]`}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return S}),n.d(t,"d",function(){return ne}),n.d(t,"g",function(){return ie}),n.d(t,"e",function(){return O}),n.d(t,"a",function(){return k}),n.d(t,"f",function(){return E}),n.d(t,"c",function(){return le});var a=n(1),i=n(6),r=n(12),o=n(0),s=n(8),l=n(10),c=n(58),u=n(3),d=n(36),h=n(14),p=n.n(h),m=n(2),g=n(5),y=n(27),f=n(55),b=n(20),v=n(15);e(document).keydown(function(e){if(i.Engine.currentPage==i.Engine.Page.Gang&&!v.e){if(null!=Y&&Y===document.activeElement)return;49===e.keyCode?"block"===W.style.display&&D.click():50===e.keyCode&&"block"===H.style.display&&F.click()}}),e(document).mousedown(function(t){N&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(f.removeElement)($),$=null,X=null,N=!1,Z=null)});let _=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"],k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}};function E(){k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}}function O(e){k=JSON.parse(e,l.Reviver)}let C=0;let w=0;function S(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.power=0,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0}function T(e){this.name=e,this.task=x.Unassigned,this.city=o.a.city,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.upgrades=[]}function R(e="",t="",n={baseRespect:0,baseWanted:0,baseMoney:0,hackWeight:0,strWeight:0,defWeight:0,dexWeight:0,agiWeight:0,chaWeight:0,difficulty:0}){this.name=e,this.desc=t,this.baseRespect=n.baseRespect?n.baseRespect:0,this.baseWanted=n.baseWanted?n.baseWanted:0,this.baseMoney=n.baseMoney?n.baseMoney:0,this.hackWeight=n.hackWeight?n.hackWeight:0,this.strWeight=n.strWeight?n.strWeight:0,this.defWeight=n.defWeight?n.defWeight:0,this.dexWeight=n.dexWeight?n.dexWeight:0,this.agiWeight=n.agiWeight?n.agiWeight:0,this.chaWeight=n.chaWeight?n.chaWeight:0,this.difficulty=n.difficulty?n.difficulty:1}S.prototype.process=function(e=1){this.processGains(e),this.processExperienceGains(e),function(e=1){if(o.a.inGang()&&!((C+=e)<150)){var t=o.a.gang.facName;for(var n in k)if(k.hasOwnProperty(n))if(n==t)k[n].power+=o.a.gang.calculatePower();else{var a=.02*Math.random();k[n].power+=a}C-=150}}(e),function(e=1){if(o.a.inGang()&&!((w+=e)
Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:5e-5,baseWanted:1e-5,baseMoney:1,hackWeight:100,difficulty:1}),Phishing:new R("Phishing","Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:8e-5,baseWanted:.001,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3}),"Identity Theft":new R("Identity Theft","Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",{baseRespect:1e-4,baseWanted:.01,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:4}),"DDoS Attacks":new R("DDoS Attacks","Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level",{baseRespect:4e-4,baseWanted:.05,hackWeight:100,difficulty:7}),"Plant Virus":new R("Plant Virus","Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level",{baseRespect:6e-4,baseWanted:.05,hackWeight:100,difficulty:10}),"Fraud & Counterfeiting":new R("Fraud & Counterfeiting","Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:5e-4,baseWanted:.1,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:17}),"Money Laundering":new R("Money Laundering","Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",{baseRespect:6e-4,baseWanted:.2,baseMoney:40,hackWeight:75,chaWeight:25,difficulty:20}),Cyberterrorism:new R("Cyberterrorism","Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level",{baseRespect:.001,baseWanted:.5,hackWeight:80,chaWeight:20,difficulty:33}),"Ethical Hacking":new R("Ethical Hacking","Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level",{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}),"Mug People":new R("Mug People","Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level",{baseRespect:5e-5,baseWanted:1e-5,baseMoney:1,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}),"Deal Drugs":new R("Deal Drugs","Assign this gang member to sell drugs.

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:8e-5,baseWanted:.001,baseMoney:4,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3}),"Run a Con":new R("Run a Con","Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",{baseRespect:15e-5,baseWanted:.01,baseMoney:10,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:10}),"Armed Robbery":new R("Armed Robbery","Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level",{baseRespect:15e-5,baseWanted:.05,baseMoney:25,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:17}),"Traffick Illegal Arms":new R("Traffick Illegal Arms","Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level",{baseRespect:3e-4,baseWanted:.1,baseMoney:40,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:75,difficulty:25}),"Threaten & Blackmail":new R("Threaten & Blackmail","Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:2e-4,baseWanted:.05,baseMoney:15,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}),Terrorism:new R("Terrorism","Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level",{baseRespect:.001,baseWanted:1,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:33}),"Vigilante Justice":new R("Vigilante Justice","Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level",{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1}),"Train Combat":new R("Train Combat","Assign this gang member to increase their combat stats (str, def, dex, agi)",{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:5}),"Train Hacking":new R("Train Hacking","Assign this gang member to train their hacking skills",{hackWeight:100,difficulty:8}),"Territory Warfare":new R("Territory Warfare","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.",{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:3})};function I(e="",t="",n=0,a="w"){this.name=e,this.desc=t,this.cost=n,this.type=a}I.prototype.apply=function(e){switch(this.name){case"Baseball Bat":e.str_mult*=1.05,e.def_mult*=1.05;break;case"Katana":e.str_mult*=1.1,e.def_mult*=1.1,e.dex_mult*=1.1;break;case"Glock 18C":e.str_mult*=1.15,e.def_mult*=1.15,e.dex_mult*=1.15,e.agi_mult*=1.15;break;case"P90C":e.str_mult*=1.2,e.def_mult*=1.2,e.agi_mult*=1.1;break;case"Steyr AUG":e.str_mult*=1.25,e.def_mult*=1.25;break;case"AK-47":e.str_mult*=1.5,e.def_mult*=1.5;break;case"M15A10 Assault Rifle":e.str_mult*=1.6,e.def_mult*=1.6;break;case"AWM Sniper Rifle":e.str_mult*=1.5,e.dex_mult*=1.5,e.agi_mult*=1.5;break;case"Bulletproof Vest":e.def_mult*=1.05;break;case"Full Body Armor":e.def_mult*=1.1;break;case"Liquid Body Armor":e.def_mult*=1.25,e.agi_mult*=1.25;break;case"Graphene Plating Armor":e.def_mult*=1.5;break;case"Ford Flex V20":e.agi_mult*=1.1,e.cha_mult*=1.1;break;case"ATX1070 Superbike":e.agi_mult*=1.15,e.cha_mult*=1.15;break;case"Mercedes-Benz S9001":e.agi_mult*=1.2,e.cha_mult*=1.2;break;case"White Ferrari":e.agi_mult*=1.25,e.cha_mult*=1.25;break;case"NUKE Rootkit":e.hack_mult*=1.1;break;case"Soulstealer Rootkit":e.hack_mult*=1.2;break;case"Demon Rootkit":e.hack_mult*=1.3;break;default:console.log("ERROR: Could not find this upgrade: "+this.name)}},I.prototype.toJSON=function(){return Object(l.Generic_toJSON)("GangMemberUpgrade",this)},I.fromJSON=function(e){return Object(l.Generic_fromJSON)(I,e.data)},l.Reviver.constructors.GangMemberUpgrade=I;let P={"Baseball Bat":new I("Baseball Bat","Increases strength and defense by 5%",1e6,"w"),Katana:new I("Katana","Increases strength, defense, and dexterity by 10%",12e6,"w"),"Glock 18C":new I("Glock 18C","Increases strength, defense, dexterity, and agility by 15%",25e6,"w"),P90C:new I("P90C","Increases strength and defense by 20%. Increases agility by 10%",5e7,"w"),"Steyr AUG":new I("Steyr AUG","Increases strength and defense by 25%",6e7,"w"),"AK-47":new I("AK-47","Increases strength and defense by 50%",1e8,"w"),"M15A10 Assault Rifle":new I("M15A10 Assault Rifle","Increases strength and defense by 60%",15e7,"w"),"AWM Sniper Rifle":new I("AWM Sniper Rifle","Increases strength, dexterity, and agility by 50%",225e6,"w"),"Bulletproof Vest":new I("Bulletproof Vest","Increases defense by 5%",2e6,"a"),"Full Body Armor":new I("Full Body Armor","Increases defense by 10%",5e6,"a"),"Liquid Body Armor":new I("Liquid Body Armor","Increases defense and agility by 25%",25e6,"a"),"Graphene Plating Armor":new I("Graphene Plating Armor","Increases defense by 50%",4e7,"a"),"Ford Flex V20":new I("Ford Flex V20","Increases agility and charisma by 10%",3e6,"v"),"ATX1070 Superbike":new I("ATX1070 Superbike","Increases agility and charisma by 15%",9e6,"v"),"Mercedes-Benz S9001":new I("Mercedes-Benz S9001","Increases agility and charisma by 20%",18e6,"v"),"White Ferrari":new I("White Ferrari","Increases agility and charisma by 25%",3e7,"v"),"NUKE Rootkit":new I("NUKE Rootkit","Increases hacking by 10%",5e6,"r"),"Soulstealer Rootkit":new I("Soulstealer Rootkit","Increases hacking by 20%",15e6,"r"),"Demon Rootkit":new I("Demon Rootkit","Increases hacking by 30%",5e7,"r")},N=!1;function A(e=""){var t="gang-member-upgrade-popup-box";if(N){if(null==Z||null==$||null==X)return void console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null");for(var n=1;n-1||o.a.gang.members[n].task.name.indexOf(a)>-1){var i=M(o.a.gang.members[n]);X.appendChild(i),Z.push(i)}}else{Q=Object(u.createElement)("input",{type:"text",placeholder:"Filter gang members",value:e,onkeyup:()=>{A(Q.value.toString())}}),Z=[Q];for(a=Q.value.toString(),n=0;n-1||o.a.gang.members[n].task.name.indexOf(a)>-1)&&Z.push(M(o.a.gang.members[n]));$=Object(d.createPopup)(t,Z),X=document.getElementById(t+"-content"),N=!0}}function M(e){var t=Object(u.createElement)("div",{border:"1px solid white"}),n=Object(u.createElement)("h1",{innerText:e.name+" ("+e.task.name+")"});t.appendChild(n);for(var a=Object(u.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+e.hack+" (x"+Object(m.formatNumber)(e.hack_mult,2)+")\nStr: "+e.str+" (x"+Object(m.formatNumber)(e.str_mult,2)+")\nDef: "+e.def+" (x"+Object(m.formatNumber)(e.def_mult,2)+")\nDex: "+e.dex+" (x"+Object(m.formatNumber)(e.dex_mult,2)+")\nAgi: "+e.agi+" (x"+Object(m.formatNumber)(e.agi_mult,2)+")\nCha: "+e.cha+" (x"+Object(m.formatNumber)(e.cha_mult,2)+")\n"}),i=[],r=0;r{return!o.a.money.lt(e.cost)&&(o.a.loseMoney(e.cost),n.upgrades.push(e.name),e.apply(n),A(Q.value.toString()),!1)}}))}(f=C[S],w,e)}return t.appendChild(b),t.appendChild(v),t.appendChild(_),t.appendChild(k),t}let L,B=!1,j=null,D=null,F=null,H=null,W=null,G=null,U=null,q=null,K=null,V=null,Y=null,z=null,J=null,$=null,X=null,Q=null,Z=null,ee=null,te=null;function ne(){if(!B||null==j){B=!0,j=Object(u.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var e=o.a.gang.facName;o.a.gang.members,o.a.gang.wanted,o.a.gang.respect;j.appendChild(Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(i.Engine.loadFactionContent(),Object(r.c)(e),!1)})),D=Object(u.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (1)",clickListener:()=>(H.style.display="block",W.style.display="none",D.classList.toggle("a-link-button-inactive"),D.classList.toggle("a-link-button"),F.classList.toggle("a-link-button-inactive"),F.classList.toggle("a-link-button"),ie(),!1)}),F=Object(u.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (2)",clickListener:()=>(H.style.display="none",W.style.display="block",D.classList.toggle("a-link-button-inactive"),D.classList.toggle("a-link-button"),F.classList.toggle("a-link-button-inactive"),F.classList.toggle("a-link-button"),ie(),!1)}),j.appendChild(D),j.appendChild(F),H=Object(u.createElement)("div",{display:"block",id:"gang-management-subpage"});var t="";t=o.a.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice",G=Object(u.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.

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

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

"}),H.appendChild(G),U=Object(u.createElement)("p",{id:"gang-info",width:"70%"}),H.appendChild(U),q=Object(u.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{var e=Object(v.j)(),t=Object(v.i)();return e.innerHTML="Recruit Gang Member",t.innerHTML="Cancel",e.addEventListener("click",()=>{var e=Object(v.h)();if(""===e)Object(s.dialogBoxCreate)("You must enter a name for your Gang member!");else{for(var t=0;t{Object(v.f)()}),Object(v.g)("Please enter a name for your new Gang member:"),!1}}),H.appendChild(q),K=Object(u.createElement)("p",{color:"red",id:"gang-recruit-requirement-text"}),H.appendChild(K),H.appendChild(Object(u.createElement)("br",{})),V=Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=H.getElementsByClassName("accordion-header"),t=0;t{for(var e=H.getElementsByClassName("accordion-header"),t=0;t{ae()}}),z=Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{A()}}),H.appendChild(V),H.appendChild(L),H.appendChild(Y),H.appendChild(z),J=Object(u.createElement)("ul",{id:"gang-member-list"}),ae(),H.appendChild(J),W=Object(u.createElement)("div",{id:"gang-territory-subpage",display:"none"}),ee=Object(u.createElement)("p",{width:"70%",innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.

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

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

"}),W.appendChild(ee);var n=Object(u.createElement)("fieldset",{width:"50%",display:"inline-block"});te=Object(u.createElement)("p",{id:"gang-territory-info"}),n.appendChild(te),W.appendChild(n),j.appendChild(W),j.appendChild(H),document.getElementById("entire-game-container").appendChild(j)}j.style.display="block",ie()}function ae(){Object(y.removeChildrenFromElement)(J);for(var e=o.a.gang.members,t=Y.value.toString(),n=0;n-1||e[n].task.name.indexOf(t)>-1)&&re(e[n])}function ie(){if(B&&o.a.inGang())if("block"===W.style.display){for(var e in te.innerHTML="",k)if(k.hasOwnProperty(e)){var t=k[e];let n,a=100*t.territory;n=a<=0?Object(m.formatNumber)(0,2):a>=100?Object(m.formatNumber)(100,2):Object(m.formatNumber)(a,2),e==o.a.gang.facName?te.innerHTML+=""+e+"
(Power: "+Object(m.formatNumber)(t.power,6)+"): "+n+"%

":te.innerHTML+=e+"
(Power: "+Object(m.formatNumber)(t.power,6)+"): "+n+"%

"}}else{if(U instanceof Element){var n;n=(c=r.b[o.a.gang.facName])instanceof r.a?c.playerReputation:"ERROR",Object(y.removeChildrenFromElement)(U),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Respect: "+Object(m.formatNumber)(o.a.gang.respect,6)+" ("+Object(m.formatNumber)(5*o.a.gang.respectGainRate,6)+" / sec)",tooltip:"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction."})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+Object(m.formatNumber)(o.a.gang.wanted,6)+" ("+Object(m.formatNumber)(5*o.a.gang.wantedGainRate,6)+" / sec)",tooltip:"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1."})),U.appendChild(Object(u.createElement)("br",{}));var i=o.a.gang.respect/(o.a.gang.respect+o.a.gang.wanted);i=100*(1-i),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Wanted Level Penalty: -"+Object(m.formatNumber)(i,2)+"%",tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Money gain rate: $"+Object(m.formatNumber)(5*o.a.gang.moneyGainRate,2)+" / sec"})),U.appendChild(Object(u.createElement)("br",{}));var l=100*k[o.a.gang.facName].territory;let e;e=l<=0?Object(m.formatNumber)(0,2):l>=100?Object(m.formatNumber)(100,2):Object(m.formatNumber)(l,2),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Territory: "+Object(m.formatNumber)(e,3)+"%",tooltip:"The percentage of total territory your Gang controls"})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Faction reputation: "+Object(m.formatNumber)(n,3)})),U.appendChild(Object(u.createElement)("br",{}))}else console.log("ERROR: gang-info DOM element DNE");var c,d=o.a.gang.members.length,h=0;if(d>0)h=Math.pow(a.a.GangRecruitCostMultiplier,d);if(null==(c=r.b[o.a.gang.facName]))return void Object(s.dialogBoxCreate)("Could not find your gang's faction. This is probably a bug please report to dev");var p=q;d>=a.a.MaximumGangMembers?(p.className="a-link-button-inactive",K.style.display="block",K.innerHTML="You have reached the maximum amount of gang members"):c.playerReputation>=h?(p.className="a-link-button",K.style.display="none"):(p.className="a-link-button-inactive",K.style.display="block",K.innerHTML=Object(m.formatNumber)(h,2)+" Faction reputation needed to recruit next member");for(var g=0;gStrength: "+Object(m.formatNumber)(e.str,0)+" ("+p()(e.str_exp).format("(0.00a)")+" exp)
Defense: "+Object(m.formatNumber)(e.def,0)+" ("+p()(e.def_exp).format("(0.00a)")+" exp)
Dexterity: "+Object(m.formatNumber)(e.dex,0)+" ("+p()(e.dex_exp).format("(0.00a)")+" exp)
Agility: "+Object(m.formatNumber)(e.agi,0)+" ("+p()(e.agi_exp).format("(0.00a)")+" exp)
Charisma: "+Object(m.formatNumber)(e.cha,0)+" ("+p()(e.cha_exp).format("(0.00a)")+" exp)
");var a=document.getElementById(t+"gang-member-gain-info");a&&(a.innerHTML="Money: $"+Object(m.formatNumber)(5*e.calculateMoneyGain(),2)+" / sec
Respect: "+Object(m.formatNumber)(5*e.calculateRespectGain(),6)+" / sec
Wanted Level: "+Object(m.formatNumber)(5*e.calculateWantedLevelGain(),6)+" / sec
")}}function se(e,t){var n=e.name,a=document.getElementById(n+"gang-member-task-description");if(a){var i=x[t];if(null==i)return;var r=i.desc;a.innerHTML=r}}function le(){null!=j&&Object(b.removeElementById)(j.id),B=!1,j=null,D=null,F=null,H=null,W=null,G=null,U=null,q=null,K=null,V=null,L=null,Y=null,z=null,J=null,$=null,X=null,Q=null,Z=null}}).call(this,n(53))},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(8);function i(e){Object(a.dialogBoxCreate)("Caught an exception: "+e+"

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

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

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

If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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.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";n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return l});var a=n(0),i=n(28),r=n(7);function o(e,t,n){return`ERROR: bladeburner.${e}() failed due to an invalid action specified. `+`Type: ${t}, Name: ${n}. Note that for contracts and operations, the `+"name of the operation is case-sensitive."}function s(e,t){return`Bladeburner.${e}() failed with exception: `+t}function l(e,t){const n=`${t}() failed because you do not`+" currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7";if(!(a.a.bladeburner instanceof i.a&&(7===a.a.bitNodeN||a.a.sourceFiles.some(e=>7===e.n))))throw Object(r.d)(e,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(3);t.appendLineBreaks=function(e,t){for(let n=0;n=n.length){var o=n.substring(0,a);return t.innerHTML="> "+o,i(!0)}var o=n.substring(0,a);t.innerHTML="> "+o+"";var s=e(t,n,a+1);s.then(function(e){i(e)},function(e){r(e)})},30)})}(i,e,0).then(function(e){t(e)},function(e){n(e)})})}let m=!1;function g(e,t=!1){return m=!0,i.Engine.loadRedPillContent(),p("[ERROR] SEMPOOL INVALID").then(function(){return p("[ERROR] Segmentation Fault")}).then(function(){return p("[ERROR] SIGKILL RECVD")}).then(function(){return p("Dumping core...")}).then(function(){return p("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return p("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return p("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return p("----------------------------------------")}).then(function(){return p("Failsafe initiated...")}).then(function(){return p("Restarting BitNode-"+e+"...")}).then(function(){return p("...........")}).then(function(){return p("...........")}).then(function(){return p("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return p("..............................................")}).then(function(){return p("..............................................")}).then(function(){return function(e,t=!1){var n=document.getElementById("red-pill-container");Object(d.removeChildrenFromElement)(n);for(var i=document.createElement("pre"),r=[],o=1;o<=12;++o)r.push(y(o));i.innerHTML=" O
| O O | O O |
O | | / __| \\ | | O
O | O | | O / | O | | O | O
| | | | |_/ |/ | \\_ \\_| | | | |
O | | | O | | O__/ | / \\__ | | O | | | O
| | | | | | | / /| O / \\| | | | | | |
O | | | \\| | O / _/ | / O | |/ | | | O
| | | |O / | | O / | O O | | \\ O| | | |
| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |
\\| O | |_/ |\\| \\ O \\__| \\_| | O |/
| | |_/ | | \\| / | \\_| | |
\\| / \\| | / / \\ |/
| "+r[9]+" | | / | "+r[10]+" |
"+r[8]+" | | | | | | | "+r[11]+"
| | | / / \\ \\ | | |
\\| | / "+r[6]+" / \\ "+r[7]+" \\ | |/
\\ | / / | | \\ \\ | /
\\ \\JUMP "+r[4]+"3R | | | | | | R3"+r[5]+" PMUJ/ /
\\|| | | | | | | | | ||/
\\| \\_ | | | | | | _/ |/
\\ \\| / \\ / \\ |/ /
"+r[0]+" |/ "+r[1]+" | | "+r[2]+" \\| "+r[3]+"
| | | | | | | |
\\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/



",n.appendChild(i);for(var o=1;o<=12;++o)!function(n){var i="bitnode-"+n.toString(),r=Object(c.clearEventListeners)(i);null!=r&&(1===n||2===n||3===n||4===n||5===n||6===n||7===n||8===n||11===n||12===n?r.addEventListener("click",function(){var i="BitNode"+n,r=a.b[i];null!=r?(Object(h.b)("BitNode-"+n+": "+r.name+"

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

"+n.desc+"
"}function f(t,n,a=!1){var i=Object(h.d)();i.innerHTML="Enter BitNode-"+t,i.addEventListener("click",function(){a?r.a.gainIntelligenceExp(-5):function(e){var t="SourceFile"+e.toString(),n=s.b[t];if(null!=n){for(var a=!1,i=null,o=0;o=3&&12!==i.n?Object(u.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++i.lvl,Object(u.dialogBoxCreate)(n.name+" was upgraded to level "+i.lvl+" for destroying its corresponding BitNode!"));else{var l=new s.a(e,1);r.a.sourceFiles.push(l),5===e&&(r.a.intelligence=1),Object(u.dialogBoxCreate)("You received a Source-File for destroying a Bit Node!

"+n.name+"

"+n.info)}}else console.log("ERROR: could not find source file for Bit node: "+e)}(n),m=!1;var i=document.getElementById("red-pill-container");Object(d.removeChildrenFromElement)(i),r.a.bitNodeN=t,console.log("Entering Bit Node "+r.a.bitNodeN),e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),document.getElementById("terminal-input-td").innerHTML='$ ',e("input[class=terminal-input]").prop("disabled",!1),l.b.hackFlag=!1,Object(o.b)(),Object(h.a)()});var c=Object(h.c)();c.innerHTML="Back",c.addEventListener("click",function(){Object(h.a)()})}}).call(this,n(53))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return Corporation});var _BitNode__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(16),_engine__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6),_Faction__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_Literature__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(63),_Location__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4),_Player__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(0),decimal_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(26),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(100),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(10),numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(14),numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(3),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(36),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(2),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(5),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(32),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(27),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(20),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(15),companyStates=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];function CorporationState(){this.state=0}CorporationState.prototype.nextState=function(){(this.state<0||this.state>=companyStates.length)&&(this.state=0),++this.state,this.state>=companyStates.length&&(this.state=0)},CorporationState.prototype.getState=function(){return companyStates[this.state]},CorporationState.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("CorporationState",this)},CorporationState.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(CorporationState,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.CorporationState=CorporationState;var TOTALSHARES=1e9,CyclesPerMarketCycle=75,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/companyStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5;function Material(e={}){this.name=e.name?e.name:"",this.qty=0,this.qlt=0,this.dmd=0,this.dmdR=0,this.cmp=0,this.cmpR=0,this.mv=0,this.mku=0,this.buy=0,this.sll=0,this.prd=0,this.exp=[],this.totalExp=0,this.imp=0,this.bCost=0,this.sCost=0,this.prdman=[!1,0],this.sllman=[!1,0],this.init()}Material.prototype.init=function(e={}){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1e3,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,100],this.cmp=80,this.cmpR=[65,95],this.bCost=1500,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=4e3,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=6750,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,100],this.cmp=50,this.cmpR=[25,75],this.bCost=16e3,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,100],this.bCost=8e3,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,100],this.cmp=90,this.cmpR=[80,100],this.bCost=2e4,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,100],this.cmp=90,this.cmpR=[80,100],this.bCost=27e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":break;default:console.log("Invalid material type in init(): "+this.name)}},Material.prototype.processMarket=function(){var e=Math.random()*this.mv/100,t=Math.random()*this.mv/300;Math.random()<.42?(this.cmp*=1+e,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1-t):(this.cmp*=1-e,this.cmpthis.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=1+t):(this.dmd*=1-e,this.dmd
Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Energy).format("$0.000a")+"
Recommended starting Industry: NO",Utilities:"Distributes water and provides wastewater services.

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

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

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

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

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

Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Tobacco).format("$0.000a")+"
Recommended starting Industry: YES",Chemical:"Product industrial chemicals

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

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

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

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

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

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

Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.RealEstate).format("$0.000a")+"
Recommended starting Industry: NO"},ProductRatingWeights={[Industries.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[Industries.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[Industries.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[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},[Industries.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[Industries.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[Industries.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[Industries.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}},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."]},empManualAssignmentModeActive=!1;function Industry(e={}){this.offices={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chongqing]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:new OfficeSpace({loc:_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12,size:OfficeInitialSize}),[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:0},this.warehouses={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chonqing]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:new Warehouse({loc:_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12,size:WarehouseInitialSize}),[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new Material({name:"Scientific Research"}),this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0);var t=Object.keys(IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.init()}Industry.prototype.init=function(){switch(this.startingCost=IndustryStartingCosts[this.type],this.type){case 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 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 Industries.Agriculture:this.reFac=.75,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 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 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 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 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 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 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 Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2.5,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case 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 Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.1,this.aiFac=.1,this.robFac=.05,this.reqMats={Hardware:.5,Energy:1},this.prodMats=["AICores"],this.makesProducts=!0;break;case 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 Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:20,Energy:10,Water:10,Hardware:5},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.log("ERR: Invalid Industry Type passed into Industry.init(): "+this.type)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case Industries.Food:return"create and manage restaurants";case Industries.Tobacco:return"create tobacco and tobacco-related products";case Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case Industries.Robotics:return"build specialized robots and robot-related products";case Industries.Software:return"develop computer software";case Industries.Healthcare:return"build and manage hospitals";case Industries.RealEstate:return"develop and manage real estate properties";default:return console.log("ERROR: Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"
")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"!==t){var a=this.processMaterials(e,n);this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1]),a=this.processProducts(e,n),this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1])}else{(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.log("ERROR: NaN in Corporation's computed revenue/expenses"),console.log(this.thisCycleRevenue.toString()),console.log(this.thisCycleExpenses.toString()),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var i=0;for(var r in this.offices)this.offices.hasOwnProperty(r)&&this.offices[r]instanceof OfficeSpace&&(i+=this.offices[r].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(i),this.processMaterialMarket(e),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);var o=n.getDreamSenseGain(),s=4*o;o>0&&(this.popularity+=o*e,this.awareness+=s*e)}},Industry.prototype.processMaterialMarket=function(e=1){for(var t=this.reqMats,n=this.prodMats,a=0;a0&&(i.qty+=a,expenses+=a*i.bCost)}(matName,industry),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier(),prod;prod=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,prod*=SecsPerMarketCycle*marketCycles;for(var totalMatSize=0,tmp=0;tmp0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);prod=Math.min(maxAmt,prod)}prod<0&&(prod=0),warehouse.smartSupplyStore+=prod/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*prod;warehouse.materials[reqMatName].qty0&&prod>0){for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=this.reqMats[reqMatName]*prod*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd=0,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(var j=0;jmat.bCost?sCost-mat.bCost>markupLimit&&(markup=markupLimit/(sCost-mat.bCost)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI=expWarehouse.size)return;var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.log("ERROR: Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.005*Math.pow(office.employeeProd[EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(var a in this.products){if(this.products.hasOwnProperty(a))if(!(l=this.products[a]).fin){var i,r=l.createCity,o=this.offices[r],s=o.employeeProd[EmployeePositions.Operations]+o.employeeProd[EmployeePositions.Engineer]+o.employeeProd[EmployeePositions.Management];i=0===s?0:o.employeeProd[EmployeePositions.Engineer]/s+o.employeeProd[EmployeePositions.Operations]/s+o.employeeProd[EmployeePositions.Management]/s,l.createProduct(e,i*Math.pow(s,.29)),l.prog>=100&&l.finishProduct(o.employeeProd,this);break}}for(var a in this.products){var l;if(this.products.hasOwnProperty(a))(l=this.products[a])instanceof Product&&l.fin&&(n+=this.processProduct(e,l,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){for(var totalProfit=0,i=0;i0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);prod=Math.min(maxAmt,prod)}warehouse.smartSupplyStore+=prod/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*prod;warehouse.materials[reqMatName].qty0&&prod>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*prod*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=prod*producableFrac}product.data[city][1]=prod*producableFrac/(SecsPerMarketCycle*marketCycles);break;case"SALE":for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);var sCost;product.pCost*=ProductProductionCostRatio,Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1,markupLimit=product.rat/product.mku;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor,sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sllman[city][1])){var tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.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]):maxSell;sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break;case"START":case"PURCHASE":case"EXPORT":break;default:console.log("ERROR: Invalid State: "+this.state)}}return totalProfit},Industry.prototype.discontinueProduct=function(e,t){var n=t.company;t.industry;for(var a in this.products)this.products.hasOwnProperty(a)&&e===this.products[a]&&(delete this.products[a],n.updateUIContent())},Industry.prototype.upgrade=function(e,t){var n=t.corporation,a=(t.division,t.office),i=e[0];for(e[1],e[2],e[3];this.upgrades.length<=i;)this.upgrades.push(0);switch(++this.upgrades[i],i){case 0:for(var r=0;r0&&(t=1+e.employeeProd[EmployeePositions.Business]/e.employeeProd.total),t*Math.pow(1+e.employeeProd[EmployeePositions.Business],.15)},Industry.prototype.getAdvertisingFactors=function(){var 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]},Industry.prototype.getMarketFactor=function(e){return e.dmd*(100-e.cmp)/100},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Industry=Industry;var EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"};function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.age=e.age?e.age:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(20,50),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(.1,5),this.pro=0,this.loc=e.loc?e.loc:"",this.pos=EmployeePositions.Unassigned}Employee.prototype.process=function(e=1,t){var n=.001*e,a=n*Math.random();this.age+=n,this.exp+=n,this.age>150&&(this.int-=a,this.eff-=a,this.cha-=a);var i=n*Math.random();this.pos===EmployeePositions.Training&&(this.cha+=i,this.exp+=i,this.eff+=i);var r=.5*(t.employees.length/t.size-.5);return Math.random()<.5-r?(this.ene+=a,this.hap+=a):(this.ene-=a,this.hap-=a),this.eneHappiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.hap,3)+"
Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.ene,3)+"
Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.age,3)+"
Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,3)+"
Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(a,3)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.exp,3)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n,3)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"
Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a")+"/ s
"}));var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{});for(var s in EmployeePositions)EmployeePositions.hasOwnProperty(s)&&o.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:EmployeePositions[s],value:EmployeePositions[s]}));o.addEventListener("change",()=>{this.pos=o.options[o.selectedIndex].value});for(var l=0;lHappiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.hap,3)+"
Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.ene,3)+"
Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.age,3)+"
Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,3)+"
Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(a,3)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.exp,3)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n,3)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"
Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a")+"/ s
"}else console.log("ERROR: Employee.updateUI() called with null panel")},Employee.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Employee",this)},Employee.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Employee,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Employee=Employee;var OfficeSpaceTiers={Basic:"Basic",Enhanced:"Enhanced",Luxurious:"Luxurious",Extravagant:"Extravagant"};function OfficeSpace(e={}){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,this.tier=OfficeSpaceTiers.Basic,this.minEne=0,this.minHap=0,this.employees=[],this.employeeProd={[EmployeePositions.Operations]:0,[EmployeePositions.Engineer]:0,[EmployeePositions.Business]:0,[EmployeePositions.Management]:0,[EmployeePositions.RandD]:0,total:0}}function Warehouse(e={}){this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.level=0,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.breakdown="",this.smartSupplyStore=0,this.materials={Water:new Material({name:"Water"}),Energy:new Material({name:"Energy"}),Food:new Material({name:"Food"}),Plants:new Material({name:"Plants"}),Metal:new Material({name:"Metal"}),Hardware:new Material({name:"Hardware"}),Chemicals:new Material({name:"Chemicals"}),Drugs:new Material({name:"Drugs"}),Robots:new Material({name:"Robots"}),AICores:new Material({name:"AI Cores"}),RealEstate:new Material({name:"Real Estate"})}}OfficeSpace.prototype.process=function(e=1,t){var n=t.corporation,a=t.industry,i=1;a.funds<0&&a.lastCycleRevenue<0?i=Math.pow(.99,e):a.funds>0&&a.lastCycleRevenue>0&&(i=Math.pow(1.01,e));for(var r=0,o=0;oCharisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.cha,1)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.exp,1)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.cre,1)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.eff,1)+"
Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t.sal).format("$0.000a")+" s
",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),y=[p,m(u,this),m(d,this),m(h,this),g];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)("cmpy-mgmt-hire-employee-popup",y)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,a=t.division,i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.j)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.i)();i.innerHTML="Hire",r.innerHTML="Cancel",i.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.h)(),i=0;iObject(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.f)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.g)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(e){var t=e.corporation,n=e.division;if(null==document.getElementById("cmpy-mgmt-hire-employee-popup")){for(var a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(76,100)/100,i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),c=new Employee({intelligence:i*a,charisma:r*a,experience:o*a,creativity:s*a,efficiency:l*a,salary:2.2*(i+r+o+s+l)*a}),u=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.generateRandomString)(7),d=0;d0&&(this.breakdown+=e+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.qty*MaterialSizes[e],0)+"
"))}this.sizeUsed>this.size&&console.log("ERROR: Warehouse size used greater than capacity, something went wrong")},Warehouse.prototype.updateSize=function(e){null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),this.size=100*this.level*e.getStorageMultiplier()},Warehouse.prototype.createUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry;Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehousePanel),industryWarehouseStorageText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{display:"inline-block",class:"tooltip",color:this.sizeUsed>=this.size?"red":"white"}),industryWarehousePanel.appendChild(industryWarehouseStorageText);var a=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);industryWarehouseUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Upgrade Warehouse Size - "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(a).format("$0.000a"),display:"inline-block",class:t.funds.lt(a)?"a-link-button-inactive":"a-link-button",clickListener:()=>{null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),++this.level,this.updateSize(t),t.funds=t.funds.minus(a),this.createUI(e)}}),industryWarehousePanel.appendChild(industryWarehouseUpgradeSizeButton);var i="This Industry uses ["+Object.keys(n.reqMats).join(", ")+"] in order to ";n.prodMats.length>0?(i+="produce ["+n.prodMats.join(", ")+"] ",n.makesProducts&&(i+=" and "+n.getProductDescriptionText())):n.makesProducts&&(i+=n.getProductDescriptionText()),i+="

To get started with production, purchase your required materials or import them from another of your company's divisions.

";var r="The exact requirements for production are:
";for(var o in n.reqMats)n.reqMats.hasOwnProperty(o)&&(r+=n.reqMats[o]+" "+o+"
");if(r+="in order to create ",n.prodMats.length>0?(r+="one of each produced Material ("+n.prodMats.join(", ")+") ",n.makesProducts&&(r+="or to create one of its Products")):n.makesProducts&&(r+="one of its Products"),industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:i,tooltipleft:r})),industryWarehouseStateText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p"),industryWarehousePanel.appendChild(industryWarehouseStateText),t.unlockUpgrades[1]){null==this.smartSupplyEnabled&&(this.smartSupplyEnabled=!1);industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("label",{for:"cmpy-mgmt-smart-supply-checkbox",innerText:"Enable Smart Supply",color:"white"})),(industrySmartSupplyCheckbox=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",margin:"3px",changeListener:()=>{this.smartSupplyEnabled=industrySmartSupplyCheckbox.checked}})).checked=this.smartSupplyEnabled,industryWarehousePanel.appendChild(industrySmartSupplyCheckbox)}industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"
Materials:
"})),industryWarehouseMaterials=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseMaterials),n.makesProducts&&Object.keys(n.products).length>0&&(industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"
Products:
"})),industryWarehouseProducts=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseProducts)),this.updateUI(e)}else console.log("ERROR: Warehouse.createUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.updateUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry,a="Storage: "+(this.sizedUsed,this.size,Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.sizeUsed,3))+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.size,3);null!=this.breakdown&&""!=this.breakdown&&(a+=""+this.breakdown+""),industryWarehouseStorageText.innerHTML=a;var i=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);t.funds.lt(i)?industryWarehouseUpgradeSizeButton.className="a-link-button-inactive":industryWarehouseUpgradeSizeButton.className="a-link-button";var r="Current state: ";switch(n.state){case"START":r+="Preparing...";break;case"PURCHASE":r+="Purchasing materials...";break;case"PRODUCTION":r+="Producing materials and/or products...";break;case"SALE":r+="Selling materials and/or products...";break;case"EXPORT":r+="Exporting materials and/or products...";break;default:console.log("ERROR: Invalid state: "+n.state)}for(var o in industryWarehouseStateText.innerText=r,Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehouseMaterials),this.materials)this.materials.hasOwnProperty(o)&&this.materials[o]instanceof Material&&(Object.keys(n.reqMats).includes(o)||n.prodMats.includes(o)||"Hardware"===o||"Robots"===o||"AICores"===o||"RealEstate"===o)&&industryWarehouseMaterials.appendChild(this.createMaterialUI(this.materials[o],o,e));if(Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehouseProducts),n.makesProducts&&Object.keys(n.products).length>0)for(var s in n.products)n.products.hasOwnProperty(s)&&n.products[s]instanceof Product&&industryWarehouseProducts.appendChild(this.createProductUI(n.products[s],e))}else console.log("ERROR: Warehouse.updateUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.createMaterialUI=function(mat,matName,parentRefs){if(null!=parentRefs.company&&null!=parentRefs.industry){var company=parentRefs.company,industry=parentRefs.industry,purchasePopupId="cmpy-mgmt-material-purchase-popup",sellPopupid="cmpy-mgmt-material-sell-popup",div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-warehouse-material-div"}),totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="
Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="
Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.cmp,3));var innerTxt="

"+mat.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.qty,3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(totalGain,3)+"/s)Buy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.buy,3)+"/s
Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.prd,3)+"/s
Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/s
Export: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.totalExp,3)+"/s
Import: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.imp,3)+"/s"+cmpAndDmdText+"


MP: $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.bCost,2)+"Market Price: The price you would pay if you were to buy this material on the market


Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.qlt,2)+"The quality of your material. Higher quality will lead to more sales

";div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:innerTxt,id:"cmpy-mgmt-warehouse-"+matName+"-text",display:"inline-block"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var tutorial=industry.newInd&&Object.keys(industry.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,buyButtonParams={innerText:"Buy ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.buy,3)+")",display:"inline-block",class:tutorial?"a-link-button flashing-button":"a-link-button",clickListener:()=>{var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the amount of "+mat.name+" you would like to purchase per second. This material's cost changes constantly"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",value:mat.buy?mat.buy:null,placeholder:"Purchase amount",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{if(!isNaN(n.value))return mat.buy=parseFloat(n.value),isNaN(mat.buy)&&(mat.buy=0),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1;Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid amount")}});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Clear Purchase",class:"a-link-button",clickListener:()=>(mat.buy=0,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1)}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>{Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId)}});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(purchasePopupId,[t,n,e,a,i]),n.focus()}},innerTextString;if(tutorial&&(buyButtonParams.tooltip="Purchase your required materials to get production started!"),buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",buyButtonParams)),1===company.unlockUpgrades[0]){function createExportPopup(){for(var popupId="cmpy-mgmt-export-popup",exportTxt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"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."}),citySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown"}),industrySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown",changeListener:()=>{for(var e=industrySelector.options[industrySelector.selectedIndex].value,t=0;t{var industryName=industrySelector.options[industrySelector.selectedIndex].text,cityName=citySelector.options[citySelector.selectedIndex].text,amt=exportAmount.value,sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");var temp=sanitizedAmt.replace(/MAX/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid expression entered for export amount: "+e),!1}if(null!=temp&&!isNaN(temp)){var exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};return mat.exp.push(exportObj),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid amount entered for export")}}),cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1)}),currExportsText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"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."}),currExports=[],i=0;iCity: "+t.exp[e].city+"
Amount/s: "+t.exp[e].amt,clickListener:()=>{t.exp.splice(e,1),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),createExportPopup()}}))}(i,mat,currExports);Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(popupId,[exportTxt,industrySelector,citySelector,exportAmount,exportBtn,cancelBtn,currExportsText].concat(currExports))}buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Export",display:"inline-block",class:"a-link-button",clickListener:()=>{createExportPopup()}}))}if(buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),mat.sllman[0]){if(innerTextString=-1===mat.sllman[1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sllman[1],3)+")",mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(mat.sCost)){var sCost=mat.sCost.replace(/MP/g,mat.bCost);innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(eval(sCost),2)}else innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sCost,2)}else innerTextString="Sell (0.000/0.000)";return buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:innerTextString,display:"inline-block",class:"a-link-button",clickListener:()=>{var txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the maximum amount of "+mat.name+" you would like to sell per second, as well as the price at which you would like to sell at.

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

Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.

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.

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."}),br=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sllman[1]?mat.sllman[1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sCost?mat.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",margin:"6px",clickListener:()=>{var cost=inputPx.value.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");var temp=cost.replace(/MP/g,mat.bCost);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;mat.sllman[0]=!0,mat.sllman[1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric or 'MAX'"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(sellPopupid),!1}});var cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",margin:"6px",clickListener:()=>{Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(sellPopupid)}});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(sellPopupid,[txt,br,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),div}console.log("ERROR: Warehouse.createMaterialUI called without industry or company parent refs")},Warehouse.prototype.createProductUI=function(product,parentRefs){var company=parentRefs.company,industry=parentRefs.industry,city=currentCityUi,div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-warehouse-product-div"});if(!product.fin)return div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Designing "+product.name+"...
"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.prog,2)+"% complete"})),div;var cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="
Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="
Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.cmp,3));var totalGain=product.data[city][1]-product.data[city][2];div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"

"+product.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][0],3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(totalGain,3)+"/s)Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][1],3)+"/s
Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/s


Rating: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.rat,3)+"Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.qlt,3)+"
Performance: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.per,3)+"
Durability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.dur,3)+"
Reliability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.rel,3)+"
Aesthetics: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.aes,3)+"
Features: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.fea,3)+cmpAndDmdText+"


Est. Production Cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost/ProductProductionCostRatio).format("$0.000a")+"An estimate of the material cost it takes to create this Product.


Est. Market Price: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost+product.rat/product.mku).format("$0.000a")+"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.

"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var sellInnerTextString=-1===product.sllman[city][1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.sllman[city][1],3)+")";product.sCost&&(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sCost)?sellInnerTextString+=" @ "+product.sCost:sellInnerTextString+=" @ "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.sCost).format("$0.000a")),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:sellInnerTextString,class:"a-link-button",display:"inline-block",margin:"6px",clickListener:()=>{var popupId="cmpy-mgmt-sell-product-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the maximum amount of "+product.name+" you would like to sell per second, as well as the price at which you would like to sell it at.

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.

Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.

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.

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."}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",value:product.sllman[city][1]?product.sllman[city][1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",value:product.sCost?product.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Confirm",clickListener:()=>{if(inputPx.value.includes("MP")){var price=inputPx.value.replace(/\s+/g,"");price=price.replace(/[^-()\d/*+.MP]/g,"");var temp=price.replace(/MP/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell quantity field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell quantity field."),!1;product.sCost=price}else{var cost=parseFloat(inputPx.value);if(isNaN(cost))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell price field"),!1;product.sCost=cost}if(inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;product.sllman[city][0]=!0,product.sllman[city][1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?product.sllman[city][0]=!1:(product.sllman[city][0]=!0,product.sllman[city][1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1}});var cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(popupId,[txt,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var limitProductionInnerText="Limit Production";return product.prdman[city][0]&&(limitProductionInnerText+=" ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.prdman[city][1],3)+")"),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:limitProductionInnerText,display:"inline-block",clickListener:()=>{var e,t="cmpy-mgmt-limit-product-production-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Limit",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Limit production",margin:"6px",clickListener:()=>{if(""===a.value)return product.prdman[city][0]=!1,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1;var e=parseFloat(a.value);return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value entered"),!1):(e<0?product.prdman[city][0]=!1:(product.prdman[city][0]=!0,product.prdman[city][1]=e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",margin:"6px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,a,e,i])}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Discontinue",clickListener:()=>{var e="cmpy-mgmt-discontinue-product-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"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"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Discontinue",clickListener:()=>(industry.discontinueProduct(product,parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[t,n,a])}})),div},Warehouse.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Warehouse",this)},Warehouse.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Warehouse,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Warehouse=Warehouse;var 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,5e10,"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 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."]},CorporationUpgrades={0:[0,2e9,1.07,.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.07,.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,8e9,1.09,.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 20 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.08,.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)."]},companyManagementDiv,companyManagementHeaderTabs,companyManagementPanel,currentCityUi,corporationUnlockUpgrades,corporationUpgrades,industryOverviewPanel,industryOverviewText,industryEmployeePanel,industryEmployeeText,industryEmployeeHireButton,industryEmployeeAutohireButton,industryEmployeeManagementUI,industryEmployeeInfo,industryIndividualEmployeeInfo,industryOfficeUpgradeSizeButton,industryWarehousePanel,industrySmartSupplyCheckbox,industryWarehouseStorageText,industryWarehouseUpgradeSizeButton,industryWarehouseStateText,industryWarehouseMaterials,industryWarehouseProducts,headerTabs,cityTabs;function Corporation(e={}){this.name=e.name?e.name:"The Corporation",this.divisions=[],this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(15e10),this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.fundingRound=0,this.public=!1,this.numShares=TOTALSHARES,this.issuedShares=0,this.sharePrice=0,this.storedCycles=0;var t=Object.keys(CorporationUnlockUpgrades).length,n=Object.keys(CorporationUpgrades).length;this.unlockUpgrades=Array(t).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1),this.state=new CorporationState}Corporation.prototype.getState=function(){return this.state.getState()},Corporation.prototype.storeCycles=function(e=1){this.storedCycles+=e},Corporation.prototype.process=function(){var e=this;if(this.storedCycles>=CyclesPerIndustryStateCycle){var t=this.getState();if(this.storedCycles-=1*CyclesPerIndustryStateCycle,"START"===t){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.divisions.forEach(e=>{this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses)});var n=this.revenue.minus(this.expenses).times(1*SecsPerMarketCycle);isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.

(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(15e10)),this.funds=this.funds.plus(n),this.updateSharePrice()}this.divisions.forEach(function(n){n.process(1,t,e)}),this.state.nextState(),_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.currentPage===_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.Page.Corporation&&this.updateUIContent()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(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+=32e4*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode__WEBPACK_IMPORTED_MODULE_0__.a.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();switch(this.fundingRound){case 0:e=.1;break;case 1:e=.35;break;case 2:e=.25;break;case 3:e=.2;break;case 4:return}var n=t*e*4,a=Math.floor(TOTALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.d)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.c)();i.innerHTML="Accept",r.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(n),this.numShares-=a,this.displayCorporationOverviewContent(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.a)())),r.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.a)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.b)("An investment firm has offered you "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a")+" in funding in exchange for a "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(100*e).format("0.000a")+"% stake in the company ("+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(a).format("0.000a")+" shares).

Do you accept or reject this offer?")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/TOTALSHARES,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).

Furthermore, issuing more shares now will help drive up your company's stock price in the future.

You have a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a")+" of shares that you can issue."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(a.value),t=this.determineValuation()/TOTALSHARES;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.displayCorporationOverviewContent(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)}});var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)("cmpy-mgmt-go-public-popup",[n,i,a,e,r])},Corporation.prototype.updateSharePrice=function(){var e=this.determineValuation()/(TOTALSHARES-this.issuedShares);this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.unlock=function(e){for(var t=e[0],n=e[1];this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],a=e[2],i=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var r=n*Math.pow(a,this.upgrades[t]);if(this.funds.lt(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough funds to purchase this!");else{if(++this.upgrades[t],this.funds=this.funds.minus(r),this.upgradeMultipliers[t]=1+this.upgrades[t]*i,1===t)for(var o=0;o(this.selectHeaderTab(e),this.displayCorporationOverviewContent(),!1)});companyManagementHeaderTabs.appendChild(e);for(var t=0;t{if(null==document.getElementById("cmpy-mgmt-expand-industry-popup")){var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"popup-box-container",id:"cmpy-mgmt-expand-industry-popup"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"popup-box-content"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Create a new division to expand into a new industry:"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",id:"cmpy-mgmt-expand-industry-name-input",class:"text-input",display:"block",maxLength:30,pattern:"[a-zA-Z0-9-_]",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("label",{for:"cmpy-mgmt-expand-industry-name-input",innerText:"Division name: "});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"popup-box-button",innerText:"Create Division",clickListener:()=>{for(var e=i.options[i.selectedIndex].value,t=o.value,n=0;n
",i.addEventListener("change",function(){var e=i.options[i.selectedIndex].value;r.innerHTML=IndustryDescriptions[e]+"

"}),n.appendChild(a),n.appendChild(i),n.appendChild(r),n.appendChild(s),n.appendChild(o),n.appendChild(l),n.appendChild(e),t.appendChild(n),document.getElementById("entire-game-container").appendChild(t),t.style.display="block",!1}}})),headerTabs=companyManagementDiv.getElementsByClassName("cmpy-mgmt-header-tab")}else console.log("ERROR: Header tabs div has not yet been created when Corporation.updateUIHeaderTabs() is called")},Corporation.prototype.selectHeaderTab=function(e){if(null!=e){for(var t=0;t(this.selectHeaderTab(n),this.displayDivisionContent(e,_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12),!1)});companyManagementHeaderTabs.appendChild(n)},Corporation.prototype.clearUIPanel=function(){for(;companyManagementPanel.firstChild;)companyManagementPanel.removeChild(companyManagementPanel.firstChild)},Corporation.prototype.updateUIContent=function(){if(null!=headerTabs){for(var e=0;e=1&&this.selectHeaderTab(headerTabs[0]);for(var e=_Player__WEBPACK_IMPORTED_MODULE_5__.a.getHomeComputer(),t=!1,n="corporation-management-handbook.lit",a=0;a(t||e.messages.push(n),Object(_Literature__WEBPACK_IMPORTED_MODULE_3__.b)(n),!1)})),this.public){var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Sell Shares",display:"inline-block",tooltip:"Sell your shares in the company. This is the only way to profit from your business venture.",clickListener:()=>{var e="cmpy-mgmt-sell-shares-popup",t=this.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation). The current price of your company's stock is "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to sell",margin:"5px",inputListener:()=>{var e=Math.round(i.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to sell":e>this.numShares?a.innerText="You don't have this many shares to sell!":a.innerText="Sell "+e+" shares for a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e*t).format("$0.000a")}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Sell shares",display:"inline-block",clickListener:()=>{var t=Math.round(i.value);if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else{if(!(t>this.numShares)){if(this.numShares-=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var n=parseInt(this.issuedShares);isNaN(n)?this.issuedShares=0:this.issuedShares=n}return this.issuedShares+=t,_Player__WEBPACK_IMPORTED_MODULE_5__.a.gainMoney(t*this.sharePrice),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You don't have this many shares to sell")}}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[n,a,i,r,o])}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Buyback shares",display:"inline-block",tooltip:"Buy back shares you that previously issued or sold at market price.",clickListener:()=>{var e="cmpy-mgmt-buyback-shares-popup",t=this.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to buy back at market price. To purchase these shares, you must use your own money (NOT your Corporation's funds). The current price of your company's stock is "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")+". Your company currently has "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.issuedShares,3)+" outstanding stock shares"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to buyback",margin:"5px",inputListener:()=>{var e=Math.round(i.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to buyback":e>this.issuedShares?a.innerText="There are not this many shares available to buy back. There are only "+this.issuedShares+" outstanding shares.":(console.log("here"),a.innerText="Purchase "+e+" shares for a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e*t).format("$0.000a"))}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Buy shares",display:"inline-block",clickListener:()=>{var t=Math.round(i.value),n=this.sharePrice;if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else if(t>this.issuedShares)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: There are not this many oustanding shares to buy back");else if(t*n>_Player__WEBPACK_IMPORTED_MODULE_5__.a.money)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have enough money to purchase this many shares (you need "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t*n).format("$0.000a")+")");else{if(this.numShares+=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var a=parseInt(this.issuedShares);isNaN(a)?this.issuedShares=0:this.issuedShares=a}this.issuedShares-=t,_Player__WEBPACK_IMPORTED_MODULE_5__.a.loseMoney(t*n),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e)}return!1}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[n,a,i,r,o])}});companyManagementPanel.appendChild(i),companyManagementPanel.appendChild(r);var o=this.determineValuation()>=BribeThreshold,s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:o?"a-link-button":"a-link-button-inactive",innerText:"Bribe Factions",display:"inline-block",tooltip:o?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders",clickListener:()=>{for(var e="cmpy-mgmt-bribe-factions-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{margin:"3px"}),a=0;a<_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions.length;++a){var i=_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions[a];n.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:i,value:i}))}var r,o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Corporation funds",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,a=null==r.value||""==r.value?0:Math.round(parseFloat(r.value));if(isNaN(e)||isNaN(a)||e<0||a<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var i=(Number(e)+a*t)/BribeToRepRatio;o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Stock Shares",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,a=null==r.value||""==r.value?0:Math.round(r.value);if(isNaN(e)||isNaN(a)||e<0||a<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var i=(e+a*t)/BribeToRepRatio;console.log("repGain: "+i),o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Bribe",display:"inline-block",clickListener:()=>{var t=null==s.value||""==s.value?0:parseFloat(s.value),a=this.sharePrice,i=null==r.value||""==r.value?0:Math.round(parseFloat(r.value)),o=_Faction__WEBPACK_IMPORTED_MODULE_2__.b[n.options[n.selectedIndex].value];if(null==o)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You must select a faction to bribe"),!1;if(isNaN(t)||isNaN(i)||t<0||i<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value(s) entered");else if(this.funds.lt(t))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have this much money to bribe with");else{if(!(i>this.numShares)){var l=(t+i*a)/BribeToRepRatio;return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You gained "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(l,0)+" reputation with "+o.name+" by bribing them."),o.playerReputation+=l,this.funds=this.funds.minus(t),this.numShares-=i,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have this many shares to bribe with")}}}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[t,n,o,s,r,l,c])}});companyManagementPanel.appendChild(s)}else{var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.fundingRound>=4?"a-link-button-inactive":"a-link-button tooltip",innerText:"Find Investors",display:"inline-block",clickListener:()=>{this.getInvestment()}});if(this.fundingRound<4){var c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"tooltiptext",innerText:"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company"});l.appendChild(c)}var u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button tooltip",innerText:"Go Public",display:"inline-block",clickListener:()=>(this.goPublic(),!1)}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"tooltiptext",innerText:"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."});u.appendChild(d),companyManagementPanel.appendChild(l),companyManagementPanel.appendChild(u)}if(this.updateCorporationOverviewContent(),!(this.divisions.length<=0)){var h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-upgrade-container"});h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h1",{innerText:"Unlocks",margin:"6px",padding:"6px"}));var p=Object.keys(CorporationUnlockUpgrades).length,m=Object.keys(CorporationUpgrades).length;for(null!=this.unlockUpgrades&&null!=this.upgrades||(this.unlockUpgrades=Array(p).fill(0),this.upgrades=Array(m).fill(0));this.unlockUpgrades.length{t.funds.lt(n[1])?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(t.unlock(n),t.displayCorporationOverviewContent())}}))}}(a,this);h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h1",{innerText:"Upgrades",margin:"6px",padding:"6px"}));for(a=0;a{t.funds.lt(r)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(t.upgrade(n),t.displayCorporationOverviewContent())}}))}else console.log("ERROR: Could not find levelable upgrade index "+e)}(a,this);companyManagementPanel.appendChild(h)}},Corporation.prototype.updateCorporationOverviewContent=function(){var e=document.getElementById("cmpy-mgmt-overview-text");if(null!=e){var t=this.funds,n=(new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.revenue.minus(this.expenses).toNumber()),a=n>=0?numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"):"-"+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1*n).format("$0.000a"),i="Total Funds: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t.toNumber()).format("$0.000a")+"
Total Revenue: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.revenue.toNumber()).format("$0.000a")+" / s
Total Expenses: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.expenses.toNumber()).format("$0.000a")+"/ s
Total Profits: "+a+" / s
Publicly Traded: "+(this.public?"Yes":"No")+"
Owned Stock Shares: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a")+"
Stock Price: "+(this.public?"$"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.sharePrice,2):"N/A")+"

",r=this.getProductionMultiplier(),o=this.getStorageMultiplier(),s=this.getAdvertisingMultiplier(),l=this.getEmployeeCreMultiplier(),c=this.getEmployeeChaMultiplier(),u=this.getEmployeeIntMultiplier(),d=this.getEmployeeEffMultiplier(),h=this.getSalesMultiplier(),p=this.getScientificResearchMultiplier();r>1&&(i+="Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"
"),o>1&&(i+="Storage Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(o,3)+"
"),s>1&&(i+="Advertising Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(s,3)+"
"),l>1&&(i+="Empl. Creativity Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(l,3)+"
"),c>1&&(i+="Empl. Charisma Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(c,3)+"
"),u>1&&(i+="Empl. Intelligence Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(u,3)+"
"),d>1&&(i+="Empl. Efficiency Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(d,3)+"
"),h>1&&(i+="Sales Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(h,3)+"
"),p>1&&(i+="Scientific Research Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(p,3)+"
"),e.innerHTML=i}else console.log("WARNING: Could not find overview text elemtn in updateCorporationOverviewContent()")},Corporation.prototype.displayDivisionContent=function(e,t){for(var n in this.clearUIPanel(),currentCityUi=t,e.offices)e.offices[n]instanceof OfficeSpace&&this.createCityUITab(n,e);(cityTabs=companyManagementPanel.getElementsByClassName("cmpy-mgmt-city-tab")).length>0&&this.selectCityTab(document.getElementById("cmpy-mgmt-city-"+t+"-tab"),t),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{class:"cmpy-mgmt-city-tab",innerText:"Expand into new City",display:"inline-block",clickListener:()=>{var t="cmpy-mgmt-expand-city-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Would you like to expand into a new city by opening an office? This would cost "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(OfficeInitialCost).format("$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown",margin:"5px"});for(var i in e.offices)e.offices.hasOwnProperty(i)&&(e.offices[i]instanceof OfficeSpace||a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:i,value:i})));var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",display:"inline-block",margin:"3px",clickListener:()=>{var n=a.options[a.selectedIndex].value;return this.funds.lt(OfficeInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to open a new office!"):(this.funds=this.funds.minus(OfficeInitialCost),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Opened a new office in "+n+"!"),e.offices[n]=new OfficeSpace({loc:n,size:OfficeInitialSize}),this.displayDivisionContent(e,n)),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",display:"inline-block",margin:"3px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,a,r,o]),!1}})),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var a=e.offices[currentCityUi];if(a instanceof OfficeSpace){var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-industry-left-panel"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-industry-right-panel"});companyManagementPanel.appendChild(i),companyManagementPanel.appendChild(r),industryOverviewPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-industry-overview-panel",class:"cmpy-mgmt-industry-overview-panel"}),i.appendChild(industryOverviewPanel),industryEmployeePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-employee-panel",class:"cmpy-mgmt-employee-panel"}),i.appendChild(industryEmployeePanel),industryWarehousePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-warehouse-panel",class:"cmpy-mgmt-warehouse-panel"}),r.appendChild(industryWarehousePanel),industryOverviewText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),industryOverviewPanel.appendChild(industryOverviewText),industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));for(var o=Object.keys(IndustryUpgrades).length;e.upgrades.length{n.funds.lt(c)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(n.funds=n.funds.minus(c),a.upgrade(r,{corporation:n,office:i}),n.displayDivisionContent(a,t))}})),s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}))}else console.log("ERROR: Could not find levelable upgrade index: "+e)}(l,this,e,a);if(industryOverviewPanel.appendChild(s),e.makesProducts){var c,u;switch(e.type){case Industries.Food:c="Build Restaurant",u="Build and manage a new restaurant!";break;case Industries.Tobacco:c="Create Product",u="Create a new tobacco product!";break;case Industries.Pharmaceutical:c="Create Drug",u="Design and develop a new pharmaceutical drug!";break;case Industries.Computer:case"Computer":c="Create Product",u="Design and manufacture a new computer hardware product!";break;case Industries.Robotics:c="Design Robot",u="Design and create a new robot or robotic system!";break;case Industries.Software:c="Develop Software",u="Develop a new piece of software!";break;case Industries.Healthcare:c="Build Hospital",u="Build and manage a new hospital!";break;case Industries.RealEstate:c="Develop Property",u="Develop a new piece of real estate property!";break;default:return c="Create Product",""}u+="

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.

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.",industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:c,margin:"6px",display:"inline-block",clickListener:()=>{var n="cmpy-mgmt-create-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:u}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{});for(var r in e.offices)e.offices[r]instanceof OfficeSpace&&i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{value:r,text:r}));var o="Product Name";e.type===Industries.Food?o="Restaurant Name":e.type===Industries.Healthcare?o="Hospital Name":e.type===Industries.RealEstate&&(o="Property Name");var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{placeholder:o}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Design investment"}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Marketing investment"}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Develop Product",clickListener:()=>{null==c.value&&(c.value=0),null==d.value&&(d.value=0);var a=parseFloat(c.value),r=parseFloat(d.value);if(null==s.value||""===s.value)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You must specify a name for your product!");else if(isNaN(a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for design investment");else if(isNaN(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for marketing investment");else if(this.funds.lt(a+r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to make this large of an investment");else{var o=new Product({name:s.value.replace(/[<>]/g,""),createCity:i.options[i.selectedIndex].value,designCost:a,advCost:r});this.funds=this.funds.minus(a+r),e.products[o.name]=o,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n)}return this.displayDivisionContent(e,t),!1}}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(n,[a,i,s,l,c,d,h,p])}}))}if(industryEmployeeText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{id:"cmpy-mgmt-employee-p",display:"block",innerHTML:"

Office Space


Type: "+a.tier+"
Comfort: "+a.comf+"
Beauty: "+a.beau+"
Size: "+a.employees.length+" / "+a.size+" employees"}),industryEmployeePanel.appendChild(industryEmployeeText),industryEmployeeHireButton=0===a.employees.length?Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",tooltip:"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position",clickListener:()=>(a.findEmployees({corporation:this,division:e}),!1)}):Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",clickListener:()=>(a.findEmployees({corporation:this,division:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeHireButton),industryEmployeeAutohireButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Autohire Employee",fontSize:"13px",tooltip:"Automatically hires an employee and gives him/her a random name",clickListener:()=>(a.hireRandomEmployee({corporation:this,division:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeAutohireButton),industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryOfficeUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Upgrade size",display:"inline-block",margin:"6px",fontSize:"13px",tooltip:"Upgrade the office's size so that it can hold more employees!",clickListener:()=>{for(var e="cmpy-mgmt-upgrade-office-size-popup",t=Math.round(a.size/OfficeInitialSize),n=OfficeInitialCost*Math.pow(1.07,t),i=0,r=0;r<5;++r)i+=Math.pow(1.07,t+r);var o=OfficeInitialCost*i,s=this.funds.dividedBy(OfficeInitialCost).toNumber(),l=1;for(i=Math.pow(1.07,t);l<50&&!(i>=s);){var c=Math.pow(1.07,t+l);if(i+c>s)break;i+=c,++l}var u=OfficeInitialCost*i,d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Increase the size of your office space to fit additional employees!"}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Upgrade size: "}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(n)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 3",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"),clickListener:()=>(this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=OfficeInitialSize,this.funds=this.funds.minus(n),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(o)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 15",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(o).format("$0.000a"),clickListener:()=>(this.funds.lt(o)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=5*OfficeInitialSize,this.funds=this.funds.minus(o),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(u)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by MAX ("+l*OfficeInitialSize+")",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(u).format("$0.000a"),clickListener:()=>(this.funds.lt(u)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=OfficeInitialSize*l,this.funds=this.funds.minus(u),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),y=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",margin:"4px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[d,h,p,m,g,y]),!1}}),industryEmployeePanel.appendChild(industryOfficeUpgradeSizeButton),industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",fontSize:"13px",tooltip:"Throw an office party to increase your employee's morale and happiness",clickListener:()=>{var e,t="cmpy-mgmt-throw-office-party-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Throwing this party will cost a total of $0"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",margin:"5px",placeholder:"$ / employee",inputListener:()=>{if(isNaN(r.value)||r.value<0)i.innerText="Invalid value entered!";else{var e=r.value*a.employees.length;i.innerText="Throwing this party will cost a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e).format("$0.000a")}},onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",clickListener:()=>{if(isNaN(r.value)||r.value<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value entered");else{var e=r.value*a.employees.length;if(this.funds.lt(e))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to throw this party!");else{var n;this.funds=this.funds.minus(e);for(var i=0;i(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,i,r,e,o])}})),industryEmployeeManagementUI=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{}),industryEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{margin:"4px",padding:"4px"}),empManualAssignmentModeActive){industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",margin:"4px",innerText:"Switch to Auto Mode",tooltip:"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",clickListener:()=>{empManualAssignmentModeActive=!1,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryIndividualEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{margin:"4px",padding:"4px"});var d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{color:"white",backgroundColor:"black",margin:"4px",padding:"4px",changeListener:()=>{for(var e=d.options[d.selectedIndex].text,t=0;t{empManualAssignmentModeActive=!0,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var h=0,p=0,m=0,g=0,y=0,f=0,b=0;for(l=0;l0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"+",clickListener:()=>{a.assignEmployeeToJob(v[i]),n.displayDivisionContent(e,t)}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:k[i]>0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"-",clickListener:()=>{a.unassignEmployeeFromJob(v[i]),n.displayDivisionContent(e,t)}}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{});industryEmployeeManagementUI.appendChild(r),industryEmployeeManagementUI.appendChild(o),industryEmployeeManagementUI.appendChild(s),industryEmployeeManagementUI.appendChild(l)}(this,l)}industryEmployeePanel.appendChild(industryEmployeeManagementUI);var E=e.warehouses[currentCityUi];E instanceof Warehouse?E.createUI({industry:e,company:this}):industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Purchase Warehouse ($5b)",class:"a-link-button",clickListener:()=>(this.funds.lt(WarehouseInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You do not have enough funds to do this!"):(e.warehouses[currentCityUi]=new Warehouse({loc:currentCityUi,size:WarehouseInitialSize}),this.funds=this.funds.minus(WarehouseInitialCost),this.displayDivisionContent(e,currentCityUi)),!1)})),this.updateDivisionContent(e)}else console.log("ERROR: Current city for UI does not have an office space")},Corporation.prototype.updateDivisionContent=function(e){if(e instanceof Industry){var t=1===this.unlockUpgrades[4],n=e.lastCycleRevenue.minus(e.lastCycleExpenses).toNumber(),a=n>=0?numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"):"-"+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1*n).format("$0.000a"),i="";if(t){var r=e.getAdvertisingFactors(),o=r[1],s=r[2],l=r[3],c=r[0];i="

Advertising Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(c,3)+"Total multiplier for this industry's sales due to its awareness and popularity
Awareness Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(o,.85),3)+"
Popularity Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(s,.85),3)+"
Ratio Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(l,.85),3)+"


"}Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryOverviewText),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Industry: "+e.type+" (Corp Funds: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.funds.toNumber()).format("$0.000a")+")

Awareness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.awareness,3)+"
Popularity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.popularity,3)+"
"+i+"
Revenue: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e.lastCycleRevenue.toNumber()).format("$0.000a")+" / s
Expenses: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e.lastCycleExpenses.toNumber()).format("$0.000a")+" /s
Profit: "+a+" / s

"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{marginTop:"2px",innerText:"Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.prodMult,2),tooltip:"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.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.

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.")}})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br")),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{display:"inline-block",innerText:"Scientific Research: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.sciResearch.qty,3),tooltip:"Scientific Research increases the quality of the materials and products that you produce."}));var u=e.offices[currentCityUi];industryEmployeeText.innerHTML="

Office Space


Type: "+u.tier+"
Comfort: "+u.comf+"
Beauty: "+u.beau+"
Size: "+u.employees.length+" / "+u.size+" employees",u.employees.length>=u.size?(industryEmployeeHireButton.className="a-link-button-inactive",industryEmployeeAutohireButton.className="a-link-button-inactive tooltip"):0===u.employees.length?(industryEmployeeHireButton.className="a-link-button tooltip flashing-button",industryEmployeeAutohireButton.className="a-link-button tooltip"):(industryEmployeeHireButton.className="a-link-button",industryEmployeeAutohireButton.className="a-link-button tooltip");for(var d=0,h=0,p=0,m=0,g=0,y=0,f=0;f0&&(m=d/u.employees.length,g=h/u.employees.length,y=p/u.employees.length),industryEmployeeInfo.innerHTML="Avg Employee Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(m,3)+"
Avg Employee Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(g,3)+"
Avg Employee Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(y,3),t&&(industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Material Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getOfficeProductivity(u),3),tooltip:"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"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Product Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getOfficeProductivity(u,{forProduct:!0}),3),tooltip:"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"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Business Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getBusinessFactor(u),3),tooltip:"The effect this office's 'Business' employees has on boosting sales"})));var b=e.warehouses[currentCityUi];b instanceof Warehouse&&b.updateUI({industry:e,company:this})}else console.log("ERROR: Invalid 'division' argument in Corporation.updateDivisionContent")},Corporation.prototype.createCityUITab=function(e,t){var n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{id:"cmpy-mgmt-city-"+e+"-tab",class:"cmpy-mgmt-city-tab",innerText:e,clickListener:()=>(this.selectCityTab(n,e),this.displayDivisionContent(t,e),!1)});companyManagementPanel.appendChild(n)},Corporation.prototype.selectCityTab=function(e,t){if(null!=e||null!=(e=document.getElementById("cmpy-mgmt-city-"+t+"-tab"))){for(var n=0;n
Level 1: 16%
Level 2: 24%
Level 3: 28%"),o.SourceFile2=new r(2,"This Source-File increases the player's crime success rate, crime money, and charisma multipliers by:

Level 1: 20%
Level 2: 30%
Level 3: 35%"),o.SourceFile3=new r(3,"This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:
Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile4=new r(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."),o.SourceFile5=new r(5,"This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will raise all of your hacking-related multipliers by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile6=new r(6,"This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile7=new r(7,"This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile8=new r(8,"This Source-File grants the following benefits:

Level 1: Permanent access to WSE and TIX API
Level 2: Ability to short stocks in other BitNodes
Level 3: Ability to use limit/stop orders in other BitNodes

This Source-File also increases your hacking growth multipliers by:
Level 1: 12%
Level 2: 18%
Level 3: 21%"),o.SourceFile9=new r(9),o.SourceFile10=new r(10),o.SourceFile11=new r(11,"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:

Level 1: 24%
Level 2: 36%
Level 3: 42%
"),o.SourceFile12=new r(12,"This Source-File increases all your multipliers by 1% per level. This effect is multiplicative with itself. In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)")}function l(e,t){this.n=e,this.lvl=t}function c(e){var t="SourceFile"+e.n,n=o[t];if(null!=n){switch(e.n){case 1:for(var i=0,r=0;r=i.a.HacknetNodeMaxLevel)return!1;if(this.level+e>i.a.HacknetNodeMaxLevel){var n=Math.max(0,i.a.HacknetNodeMaxLevel-this.level);return this.purchaseLevelUpgrade(n)}return!s.a.money.lt(t)&&(s.a.loseMoney(t),this.level=Math.round(this.level+e),this.updateMoneyGainRate(),!0)},g.prototype.calculateRamUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;let t=0,n=Math.round(Math.log2(this.ram)),a=this.ram;for(let r=0;r=i.a.HacknetNodeMaxRam)return!1;if(this.ram*Math.pow(2,e)>i.a.HacknetNodeMaxRam){var n=Math.max(0,Math.log2(Math.round(i.a.HacknetNodeMaxRam/this.ram)));return this.purchaseRamUpgrade(n)}if(s.a.money.lt(t))return!1;s.a.loseMoney(t);for(let t=0;t=i.a.HacknetNodeMaxCores)return!1;if(this.cores+e>i.a.HacknetNodeMaxCores){var n=Math.max(0,i.a.HacknetNodeMaxCores-this.cores);return this.purchaseCoreUpgrade(n)}return!s.a.money.lt(t)&&(s.a.loseMoney(t),this.cores=Math.round(this.cores+e),this.updateMoneyGainRate(),!0)},g.prototype.toJSON=function(){return Object(u.Generic_toJSON)("HacknetNode",this)},g.fromJSON=function(e){return Object(u.Generic_fromJSON)(g,e.data)},u.Reviver.constructors.HacknetNode=g;var v=1;function _(){var e=document.getElementById("hacknet-nodes-1x-multiplier"),t=document.getElementById("hacknet-nodes-5x-multiplier"),n=document.getElementById("hacknet-nodes-10x-multiplier"),a=document.getElementById("hacknet-nodes-max-multiplier");e.setAttribute("class","a-link-button"),t.setAttribute("class","a-link-button"),n.setAttribute("class","a-link-button"),a.setAttribute("class","a-link-button"),0==s.a.hacknetNodes.length?(e.setAttribute("class","a-link-button-inactive"),t.setAttribute("class","a-link-button-inactive"),n.setAttribute("class","a-link-button-inactive"),a.setAttribute("class","a-link-button-inactive")):1==v?e.setAttribute("class","a-link-button-inactive"):5==v?t.setAttribute("class","a-link-button-inactive"):10==v?n.setAttribute("class","a-link-button-inactive"):a.setAttribute("class","a-link-button-inactive")}function k(e){if(s.a.money.lt(e.calculateLevelUpgradeCost(1)))return 0;var t=1,n=i.a.HacknetNodeMaxLevel-1,a=i.a.HacknetNodeMaxLevel-e.level;if(s.a.money.gt(e.calculateLevelUpgradeCost(a)))return a;for(;t<=n;){var r=(t+n)/2|0;if(r!=i.a.HacknetNodeMaxLevel&&s.a.money.gt(e.calculateLevelUpgradeCost(r))&&s.a.money.lt(e.calculateLevelUpgradeCost(r+1)))return Math.min(a,r);if(s.a.money.lt(e.calculateLevelUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateLevelUpgradeCost(r)))return Math.min(a,r);t=r+1}}return 0}function E(e){if(s.a.money.lt(e.calculateRamUpgradeCost(1)))return 0;const t=Math.round(Math.log2(i.a.HacknetNodeMaxRam/e.ram));if(s.a.money.gt(e.calculateRamUpgradeCost(t)))return t;for(let n=t-1;n>=0;--n)if(s.a.money.gt(e.calculateRamUpgradeCost(n)))return n;return 0}function O(e){if(s.a.money.lt(e.calculateCoreUpgradeCost(1)))return 0;var t=1,n=i.a.HacknetNodeMaxCores-1;const a=i.a.HacknetNodeMaxCores-e.cores;if(s.a.money.gt(e.calculateCoreUpgradeCost(a)))return a;for(;t<=n;){let r=(t+n)/2|0;if(r!=i.a.HacknetNodeMaxCores&&s.a.money.gt(e.calculateCoreUpgradeCost(r))&&s.a.money.lt(e.calculateCoreUpgradeCost(r+1)))return Math.min(a,r);if(s.a.money.lt(e.calculateCoreUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateCoreUpgradeCost(r)))return Math.min(a,r);t=r+1}}return 0}function C(){Object(c.clearEventListeners)("hacknet-nodes-purchase-button").addEventListener("click",function(){return y(),!1}),_();for(var e=document.getElementById("hacknet-nodes-list");e.firstChild;)e.removeChild(e.firstChild);for(var t=0;tLevel:

'}),a=Object(d.createElement)("div",{class:"hacknet-node-ram-container row",innerHTML:'

RAM:

'}),i=Object(d.createElement)("div",{class:"hacknet-node-cores-container row",innerHTML:'

Cores:

'}),r=Object(d.createElement)("div",{class:"hacknet-node-container",innerHTML:'

Node name:

Production:

'});r.appendChild(n),r.appendChild(a),r.appendChild(i);var o=Object(d.createElement)("li",{class:"hacknet-node"});o.appendChild(r),n.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-level-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=k(e)),e.purchaseLevelUpgrade(t),w(),!1}})),a.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-ram-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=E(e)),e.purchaseRamUpgrade(t),w(),!1}})),i.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-core-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=O(e)),e.purchaseCoreUpgrade(t),w(),!1}})),document.getElementById("hacknet-nodes-list").appendChild(o),T(e)}function T(e){var t=e.name;m("hacknet-node-name-"+t,t),m("hacknet-node-total-production-"+t,"$"+Object(h.formatNumber)(e.totalMoneyGenerated,2)),m("hacknet-node-production-rate-"+t,"($"+Object(h.formatNumber)(e.moneyGainRatePerSecond,2)+" / second)"),m("hacknet-node-level-"+t,e.level),m("hacknet-node-ram-"+t,e.ram+"GB"),m("hacknet-node-cores-"+t,e.cores);var n=Object(p.getElementById)("hacknet-node-upgrade-level-"+t);if(e.level>=i.a.HacknetNodeMaxLevel)m("hacknet-node-upgrade-level-"+t,"MAX LEVEL"),n.setAttribute("class","a-link-button-inactive");else{let o=0;if(0==v)o=k(e);else{var a=i.a.HacknetNodeMaxLevel-e.level;o=Math.min(a,v)}var r=e.calculateLevelUpgradeCost(o);m("hacknet-node-upgrade-level-"+t,"Upgrade x"+o+" - $"+Object(h.formatNumber)(r,2)),s.a.money.lt(r)?n.setAttribute("class","a-link-button-inactive"):n.setAttribute("class","a-link-button")}var o=Object(p.getElementById)("hacknet-node-upgrade-ram-"+t);if(e.ram>=i.a.HacknetNodeMaxRam)m("hacknet-node-upgrade-ram-"+t,"MAX RAM"),o.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==v)n=E(e);else{a=Math.round(Math.log2(i.a.HacknetNodeMaxRam/e.ram));n=Math.min(a,v)}var l=e.calculateRamUpgradeCost(n);m("hacknet-node-upgrade-ram-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(l,2)),s.a.money.lt(l)?o.setAttribute("class","a-link-button-inactive"):o.setAttribute("class","a-link-button")}var c=Object(p.getElementById)("hacknet-node-upgrade-core-"+t);if(e.cores>=i.a.HacknetNodeMaxCores)m("hacknet-node-upgrade-core-"+t,"MAX CORES"),c.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==v)n=O(e);else{a=i.a.HacknetNodeMaxCores-e.cores;n=Math.min(a,v)}var u=e.calculateCoreUpgradeCost(n);m("hacknet-node-upgrade-core-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(u,2)),s.a.money.lt(u)?c.setAttribute("class","a-link-button-inactive"):c.setAttribute("class","a-link-button")}}function R(e){for(var t=0,n=0;n{const t=`${e.hostname}${" ".repeat(18)}`.slice(0,Math.max(e.hostname.length,18)),n={progress:e.ramUsed/e.maxRam,totalTicks:30};return`${t} ${Object(d.createProgressBarText)(n)}`.replace(/\s/g," ")},C=e=>{const t=k[e.hostname];if(null===t||void 0===t)return;const n=""+Object(_.roundToTwo)(e.ramUsed/e.maxRam);t.header.dataset.ramPercentage!==n&&(t.header.dataset.ramPercentage=n,t.header.innerHTML=O(e))};function w(e){var t=Object(o.e)(e.serverIp);if(null==t)return void console.log("ERROR: Invalid server IP for workerscript in addActiveScriptsItem()");let n=t.hostname;E.push(function(e,n){null==k[n]&&function(e){let t=e.hostname;var n=document.getElementById("active-scripts-list");let a=Object(l.createAccordionElement)({hdrText:O(e)}),i=a[0];var r=a[1];let o=a[2];if(null==k[t]){var s=Object(u.createElement)("ul");return o.appendChild(s),n.appendChild(i),k[t]={header:r,panel:o,panelList:s,scripts:{},scriptHdrs:{},scriptStats:{}},i}console.log("WARNING: Tried to create already-existing Active Scripts Server panel. This is most likely fine. It probably means many scripts just got started up on a new server. Aborting")}(t);for(var a=["active","scripts",n,e.name],r=0;rArgs: "+Object(c.arrayToString)(e.args)}));var y=Object(u.createElement)("p",{innerText:"Loading...",fontSize:"14px"});g.appendChild(y),g.appendChild(Object(u.createElement)("br")),g.appendChild(Object(u.createElement)("span",{innerText:"Log",class:"active-scripts-button",margin:"4px",padding:"4px",clickListener:()=>(Object(m.a)(e.scriptRef),!1)})),g.appendChild(Object(u.createElement)("span",{innerText:"Kill Script",class:"active-scripts-button",margin:"4px",padding:"4px",clickListener:()=>(Object(i.d)(e.scriptRef,e.scriptRef.scriptRef.server),Object(s.dialogBoxCreate)("Killing script, may take a few minutes to complete..."),!1)})),k[n].panelList.appendChild(h),k[n].scripts[o]=h,k[n].scriptHdrs[o]=p,k[n].scriptStats[o]=y}.bind(null,e,n))}function S(e){E.push(function(e){var t=Object(o.e)(e.serverIp);if(null==t)throw new Error("ERROR: Invalid server IP for workerscript. This most likely occurred because you tried to delete a large number of scripts and also deleted servers at the same time. It's not a big deal, just save and refresh the game.");let n=t.hostname;if(null==k[n])return void console.log("ERROR: Trying to delete Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: "+n);for(var a=["active","scripts",t.hostname,e.name],i=0;i0?console.log("WARNING: Tried to delete Active Scripts Server panel that still has scripts. Aborting"):(Object(v.removeElement)(k[t].panel),Object(v.removeElement)(k[t].header),delete k[t]):console.log("WARNING: Tried to delete non-existent Active Scripts Server panel. Aborting")}(t)}.bind(null,e))}function T(e=150){let t=Math.min(e,E.length);for(let e=0;e"+l+"
"+c+"
"+d+"
"+h+"
"+p+"
"+g+"
"+v+"
",r}(e,k[n].scriptStats[r],r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(8),i=n(10);class r{static fromJSON(e){return i.Generic_fromJSON(r,e.data)}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(),setTimeout(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){a.dialogBoxCreate(`${this.fn}

${this.text}`,!0)}toJSON(){return i.Generic_toJSON("TextFile",this)}write(e){this.text=e}}function o(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=r,i.Reviver.constructors.TextFile=r,t.getTextFile=o,t.createTextFile=function(e,t,n){if(null!==o(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const a=new r(e,t);return n.textFiles.push(a),a}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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";n.d(t,"a",function(){return i});var a=n(22);function i(){this.data=[]}i.prototype.write=function(e){return this.data.push(e),this.data.length>a.a.MaxPortCapacity?this.data.shift():null},i.prototype.tryWrite=function(e){return!(this.data.length>=a.a.MaxPortCapacity)&&(this.data.push(e),!0)},i.prototype.read=function(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()},i.prototype.peek=function(){return 0===this.data.length?"NULL PORT DATA":this.data.slice()[0]},i.prototype.full=function(){return this.data.length==a.a.MaxPortCapacity},i.prototype.empty=function(){return 0===this.data.length},i.prototype.clear=function(){this.data.length=0}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return T}),n.d(t,"a",function(){return x});var a=n(35),i=n(11),r=n(1),o=n(6),s=n(12),l=n(38),c=n(41),u=n(50),d=n(33),h=n(0),p=n(30),m=n(9),g=n(22),y=n(19),f=n(24),b=n(8),v=n(65),_=n(13),k=n(10),E=n(3),O=n(36),C=n(2),w=n(20),S=n(26);let T=new R;function R(){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=""}function x(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,k.Reviver);if(Object(h.b)(t.PlayerSave),Object(m.g)(t.AllServersSave),Object(i.i)(t.CompaniesSave),Object(s.i)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(a.c)(t.AliasesSave)}catch(e){Object(a.c)("")}else Object(a.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(a.d)(t.GlobalAliasesSave)}catch(e){Object(a.d)("")}else Object(a.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(d.e)(t.MessagesSave)}catch(e){Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.j)(t.StockMarketSave)}catch(e){Object(f.j)("")}else Object(f.j)("");if(t.hasOwnProperty("SettingsSave"))try{Object(g.c)(t.SettingsSave)}catch(e){console.log("ERROR: Failed to parse Settings. Re-initing default values"),Object(g.b)()}else Object(g.b)();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,k.Reviver);null!=h.a.bitNodeN&&0!==h.a.bitNodeN||h.a.setBitNodeNumber(1),(n.startsWith("0.27.")||n.startsWith("0.28."))&&(console.log("Evaluating changes needed for version compatibility"),h.a.augmentations.length>0||h.a.queuedAugmentations.length>0||h.a.sourceFiles.length>0?(h.a.firstFacInvRecvd=!0,h.a.firstAugPurchased=!0,h.a.firstJobRecvd=!0,h.a.firstTimeTraveled=!0,h.a.firstProgramAvailable=!0):((h.a.factions.length>0||h.a.factionInvitations.length>0)&&(h.a.firstFacInvRecvd=!0),""===h.a.companyName&&""===h.a.companyPosition||(h.a.firstJobRecvd=!0),h.a.hacking_skill>=25&&(h.a.firstScriptAvailable=!0))),window.location.href.toLowerCase().includes("bitburner-beta")?Object(b.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.
Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).

"+r.a.LatestUpdate):n!=r.a.Version&&I()}catch(e){I()}else I();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(c.e)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function I(){Object(b.dialogBoxCreate)("New update!
Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).

"+r.a.LatestUpdate)}function P(t){var n=t.target.files[0];if(n){var _=new FileReader;_.onload=function(t){var n=t.target.result;!function(t,n){var _=null,T=null;try{var x=decodeURIComponent(escape(atob(n)));if(_=new R,_=JSON.parse(x,k.Reviver),(T=JSON.parse(_.PlayerSave,k.Reviver)).money=new S.a(T.money),T.total_money=new S.a(T.total_money),T.lifetime_money=new S.a(T.lifetime_money),JSON.parse(_.AllServersSave,k.Reviver),JSON.parse(_.CompaniesSave,k.Reviver),JSON.parse(_.FactionsSave,k.Reviver),JSON.parse(_.SpecialServerIpsSave,k.Reviver),_.hasOwnProperty("AliasesSave"))try{JSON.parse(_.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Aliases save failed: "+e)}if(_.hasOwnProperty("GlobalAliases"))try{JSON.parse(_.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Global Aliases save failed: "+e)}if(_.hasOwnProperty("MessagesSave"))try{JSON.parse(_.MessagesSave,k.Reviver)}catch(e){console.log("Parsing Messages save failed: "+e),Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{JSON.parse(_.StockMarketSave,k.Reviver)}catch(e){console.log("Parsing StockMarket save failed: "+e)}if(_.hasOwnProperty("VersionSave"))try{((P=JSON.parse(_.VersionSave,k.Reviver)).startsWith("0.27.")||P.startsWith("0.28."))&&(null!=T.bitNodeN&&0!=T.bitNodeN||(T.bitNodeN=1),null==T.sourceFiles&&(T.sourceFiles=[])),r.a.Version}catch(e){console.log("Parsing Version save failed: "+e)}if(2==T.bitNodeN&&T.inGang()&&_.hasOwnProperty("AllGangsSave"))try{Object(c.e)(_.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}}catch(e){return Object(b.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(n=decodeURIComponent(escape(atob(n))),t=JSON.parse(n,k.Reviver),Object(h.b)(t.PlayerSave),Object(m.g)(t.AllServersSave),Object(i.i)(t.CompaniesSave),Object(s.i)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(a.c)(t.AliasesSave)}catch(e){Object(a.c)("")}else Object(a.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(a.d)(t.GlobalAliasesSave)}catch(e){Object(a.d)("")}else Object(a.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(d.e)(t.MessagesSave)}catch(e){Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.j)(t.StockMarketSave)}catch(e){Object(f.j)("")}else Object(f.j)("");if(t.hasOwnProperty("SettingsSave"))try{Object(g.c)(t.SettingsSave)}catch(e){Object(g.b)()}else Object(g.b)();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to load .fconf settings when importing")}if(t.hasOwnProperty("VersionSave"))try{var P=JSON.parse(t.VersionSave,k.Reviver);null!=h.a.bitNodeN&&0!=h.a.bitNodeN||h.a.setBitNodeNumber(1),(P.startsWith("0.27.")||P.startsWith("0.28."))&&(console.log("Evaluating changes needed for version compatibility"),h.a.augmentations.length>0||h.a.queuedAugmentations.length>0||h.a.sourceFiles.length>0?(h.a.firstFacInvRecvd=!0,h.a.firstAugPurchased=!0,h.a.firstJobRecvd=!0,h.a.firstTimeTraveled=!0,h.a.firstProgramAvailable=!0):((h.a.factions.length>0||h.a.factionInvitations.length>0)&&(h.a.firstFacInvRecvd=!0),""===h.a.companyName&&""===h.a.companyPosition||(h.a.firstJobRecvd=!0),h.a.hacking_skill>=25&&(h.a.firstScriptAvailable=!0))),P!=r.a.Version&&I()}catch(e){I()}else I();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(c.e)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}var N="import-game-restart-game-notice",A=Object(E.createElement)("p",{innerText:"Imported game! I would suggest saving the game and then reloading the page to make sure everything runs smoothly"}),M=Object(E.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(w.removeElementById)(N)}});Object(O.createPopup)(N,[A,M]),Object(v.a)(),console.log("Importing game"),o.Engine.setDisplayElements(),o.Engine.init(),i.d.init(),o.Engine._lastUpdate=(new Date).getTime();var L=h.a.lastUpdate,B=Math.floor((o.Engine._lastUpdate-L)/o.Engine._idleSpeed),j=Object(p.f)();h.a.isWorking&&(console.log("work() called in load() for "+B*o.Engine._idleSpeed+" milliseconds"),h.a.workType==r.a.WorkTypeFaction?h.a.workForFaction(B):h.a.workType==r.a.WorkTypeCreateProgram?h.a.createProgramWork(B):h.a.workType==r.a.WorkTypeStudyClass?h.a.takeClass(B):h.a.workType==r.a.WorkTypeCrime?h.a.commitCrime(B):h.a.workType==r.a.WorkTypeCompanyPartTime?h.a.workPartTime(B):h.a.work(B));var D=Object(u.d)(B);Object(s.j)(B);var F=B*o.Engine._idleSpeed;null==h.a.totalPlaytime&&(h.a.totalPlaytime=0),null==h.a.playtimeSinceLastAug&&(h.a.playtimeSinceLastAug=0),null==h.a.playtimeSinceLastBitnode&&(h.a.playtimeSinceLastBitnode=0),h.a.totalPlaytime+=F,h.a.playtimeSinceLastAug+=F,h.a.playtimeSinceLastBitnode+=F,h.a.reapplyAllAugmentations(),e("#terminal tr:not(:last)").remove(),h.a.lastUpdate=o.Engine._lastUpdate,o.Engine.start(),Object(b.dialogBoxCreate)("While you were offline, your scripts generated $"+Object(C.formatNumber)(j,2)+" and your Hacknet Nodes generated $"+Object(C.formatNumber)(D,2))}(T,n)},_.readAsText(n)}else Object(b.dialogBoxCreate)("Invalid file selected")}R.prototype.saveGame=function(e){this.PlayerSave=JSON.stringify(h.a);var t=JSON.parse(JSON.stringify(m.b),k.Reviver);for(var n in t){var u=t[n];if(null!=u)for(var p=0;p(Object(a.d)(e,e.server),!1)),document.getElementById("log-box-kill-script").style.display="inline-block",s=!0,document.getElementById("log-box-container").style.display="block",document.getElementById("log-box-text-header").innerHTML=l.filename+" "+Object(r.arrayToString)(l.args)+":

",l.logUpd=!0,u()}function u(){var e=document.getElementById("log-box-text");if(l&&s&&e&&l.logUpd){e.innerHTML="";for(var t=0;t";l.logUpd=!1}}}).call(this,n(53))},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return h});var a=n(21),i=n(0),r=n(19),o=n(25),s=n(66),l=n(2);function c(){if(r.a.hasOwnProperty("Darkweb Server")){var e=r.a["Darkweb Server"];if(!Object(s.isValidIPAddress)(e))return;e==i.a.getCurrentServer().ip&&Object(o.c)("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")}}function u(e){if(0!=e.length)switch(e[0]){case"buy":if(2!=e.length)return Object(o.c)("Incorrect number of arguments. Usage: "),Object(o.c)("buy -l"),void Object(o.c)("buy [item name]");var t=e[1];"-l"==t?function(){for(const e in h){const t=h[e];Object(o.c)(t.toString())}}():function(e){e=e.toLowerCase();let t=null;for(const n in h){const a=h[n];a.program.toLowerCase()==e&&(t=a)}if(null===t)return void Object(o.c)("Unrecognized item: "+e);if(i.a.hasProgram(t.program))return void Object(o.c)("You already have the "+t.program+" program");if(i.a.money.lt(t.price))return void Object(o.c)("Not enough money to purchase "+t.program);i.a.loseMoney(t.price),i.a.getHomeComputer().programs.push(t.program),Object(o.c)("You have purchased the "+t.program+" program. The new program can be found on your home computer.")}(t);break;default:Object(o.c)("Command not found")}}function d(e,t,n){this.program=e,this.price=t,this.description=n}d.prototype.toString=function(){return[this.program,"$"+Object(l.formatNumber)(this.price),this.description].join(" - ")};const h={BruteSSHProgram:new d(a.a.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new d(a.a.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new d(a.a.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new d(a.a.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new d(a.a.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new d(a.a.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new d(a.a.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new d(a.a.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.roundToTwo=function(e){return+`${Math.round(parseFloat(`${e}e+2`))}e-2`}},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return r});var a=n(8);function i(e,t,n){this.title=e,this.fn=t,this.txt=n}function r(e){var t=o[e];if(null!=t){var n=""+t.title+"

"+t.txt;Object(a.dialogBoxCreate)(n)}}let o={};function s(){var e,t,n;e="The Beginner's Guide to Hacking",n="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.

-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)

-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()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-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

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-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.",o[t="hackers-starting-handbook.lit"]=new i(e,t,n),e="The Complete Handbook for Creating a Successful Corporation",n="Getting Started with Corporations
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.

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.

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.

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.

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').

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.

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.

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.

Tips/Pointers
-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-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.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-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

-Remember, you need to spend money to make money!

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",o[t="corporation-management-handbook.lit"]=new i(e,t,n),e="A Brief History of Synthoids",n="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.

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.

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.

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.

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.

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.

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.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

Nobody knows what happened to the terrorist group Ascendis Totalis.",o[t="history-of-synthoids.lit"]=new i(e,t,n),e="A Green Tomorrow",n="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 renwable sources such as solar and geothermal. Unfortunately, these efforts were not the huge success that they seem to be.

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.

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.

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.",o[t="A-Green-Tomorrow.lit"]=new i(e,t,n),e="Alpha and Omega",n="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.'

And once were 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.'",o[t="alpha-omega.lit"]=new i(e,t,n),e="Are We Living in a Computer Simulation?",n="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.

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 this is a reasonable outcome of continued technological advancement, then it is very likely that such a scenario has already happened.

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?",o[t="simulated-reality.lit"]=new i(e,t,n),e="Beyond Man",n="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.

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?

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.",o[t="beyond-man.lit"]=new i(e,t,n),e="Brighter than the Sun",n="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.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search, 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.

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.

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.",o[t="brighter-than-the-sun.lit"]=new i(e,t,n),e="Democracy is Dead: The Fall of an Empire",n="They rose from the shadows in the street
From the places where the oppressed meet
Their cries echoed loudly through the air
As they once did in Tiananmen Square
Loudness in the silence, Darkness in the light
They came forth with power and might
Once the beacon of democracy, America was first
Its pillars of society destroyed and dispersed
Soon the cries rose everywhere, with revolt and riot
Until one day, finally, all was quiet
From the ashes rose a new order, corporatocracy was its name
Rome, Mongol, Byzantine, all of history is just the same
For man will never change in a fundamental way
And now democracy is dead, in the USA",o[t="democracy-is-dead.lit"]=new i(e,t,n),e="Figures Show Rising Crime Rates in Sector-12",n="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.

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.",o[t="sector-12-crime.lit"]=new i(e,t,n),e="Man and the Machine",n="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?

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.",o[t="man-and-machine.lit"]=new i(e,t,n),e="Secret Societies",n="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.

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.

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.",o[t="secret-societies.lit"]=new i(e,t,n),e="Space: The Failed Frontier",n="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.

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.

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.",o[t="the-failed-frontier.lit"]=new i(e,t,n),e="Coded Intelligence: Myth or Reality?",n="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.

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.

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.'",o[t="coded-intelligence.lit"]=new i(e,t,n),e="Synthetic Muscles",n="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.

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.",o[t="synthetic-muscles.lit"]=new i(e,t,n),e="Tensions rise in global tech race",n="Have we entered a new Cold War? Is WWIII just beyond the horizon?

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.",o[t="tensions-in-tech-race.lit"]=new i(e,t,n),e="The Cost of Immortality",n="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.

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.

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.",o[t="cost-of-immortality.lit"]=new i(e,t,n),e="The Hidden World",n="WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

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.

OPEN YOUR EYES

It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

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.",o[t="the-hidden-world.lit"]=new i(e,t,n),e="The New God",n="Everyone has that moment in their life where they wonder about the bigger questions

What's the point of all of this? What is my purpose?

Some people dare to think even bigger

What will be the fate of the human race?

We live in an era vastly different from that of even 15 or 20 years ago. We have gone where no man has gone before. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into something greater. This is our future

Embrace it, and you will obey a new god. The God in the Machine",o[t="the-new-god.lit"]=new i(e,t,n),e="The New Triads",n="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.

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.

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.",o[t="new-triads.lit"]=new i(e,t,n),e="The Secret War",n="",o[t="the-secret-war.lit"]=new i(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProgressBarText=function(e){const t=Object.assign({},{progress:0,totalTicks:20},e),n=Math.floor(t.progress/(1/t.totalTicks)),a=t.totalTicks-n;return`[${"|".repeat(n+1)}${"-".repeat(a+1)}]`}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i}),e(document).click(function(t){a&&null==e(t.target).closest(".game-options-box").get(0)&&i()});var a=!1;function i(){a=!1,document.getElementById("game-options-container").style.display="none"}function r(){document.getElementById("game-options-container").style.display="block",setTimeout(function(){a=!0},500)}document.addEventListener("DOMContentLoaded",function(){document.getElementById("options-menu-link").addEventListener("click",function(){return r(),!1}),document.getElementById("game-options-close-button").addEventListener("click",function(){return i(),!1})},!1)}).call(this,n(53))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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";(function(e){n.d(t,"a",function(){return T}),n.d(t,"b",function(){return R});n(51);var a=n(18),i=n(16),r=n(28),o=n(74),s=n(11),l=n(21),c=n(6),u=n(12),d=n(41),h=(n(4),n(33)),p=n(34),m=n(23),g=n(0),y=n(9),f=n(19),b=n(24),v=n(25),_=n(26),k=n(8),E=n(20),O=n(3),C=n(36),w=n(42);n(15);let S=25e7;function T(){Object(i.c)(),g.a.prestigeAugmentation(),Object(m.e)();var t=g.a.getHomeComputer();for(var n in Object(y.h)(),Object(f.e)(),Object(y.a)(t),Object(y.i)(t),Object(a.f)(a.b.Neurolink)&&a.c[a.b.Neurolink].owned&&(t.programs.push(l.a.FTPCrackProgram.name),t.programs.push(l.a.RelaySMTPProgram.name)),Object(a.f)(a.b.CashRoot)&&a.c[a.b.CashRoot].owned&&(g.a.setMoney(new _.a(1e6)),t.programs.push(l.a.BruteSSHProgram.name)),Object(y.f)(),document.getElementById("location-purchase-tor").setAttribute("class","a-link-button"),s.a)s.a.hasOwnProperty(n)&&s.a[n].gainFavor();for(var n in u.b)u.b.hasOwnProperty(n)&&u.b[n].gainFavor();c.Engine._actionInProgress&&(c.Engine._actionInProgress=!1,v.b.finishAction(!0)),Object(u.f)(),Object(a.h)(),g.a.reapplyAllSourceFiles(),Object(s.h)(),e("#terminal tr:not(:last)").remove(),Object(v.d)(),Object(h.d)(),g.a.hasWseAccount&&(Object(b.g)(),Object(b.i)()),Object(b.m)(!1);for(var o=document.getElementById("stock-market-list");o.firstChild;)o.removeChild(o.firstChild);if(2==g.a.bitNodeN&&g.a.inGang()){var d=u.b[g.a.gang.facName];d instanceof u.a&&Object(u.h)(d)}if(g.a.bladeburner instanceof r.a&&g.a.bladeburner.prestige(),8===g.a.bitNodeN&&(g.a.money=new _.a(S)),(8===g.a.bitNodeN||p.f)&&(g.a.hasWseAccount=!0,g.a.hasTixApiAccess=!0),document.getElementById("mainmenu-container").style.visibility="visible",v.b.resetTerminalInput(),c.Engine.loadTerminalContent(),Object(a.f)(a.b.TheRedPill)&&a.c[a.b.TheRedPill].owned){var k=y.b[f.a[f.b.WorldDaemon]],E=y.b[f.a[f.b.DaedalusServer]];k&&E&&(k.serversOnNetwork.push(E.ip),E.serversOnNetwork.push(k.ip))}}function R(){Object(i.c)(),g.a.prestigeSourceFile(),Object(m.e)();var t=g.a.getHomeComputer();Object(y.h)(),Object(f.e)(),Object(y.a)(t),Object(y.i)(t),Object(y.f)();for(var n=!1,r=0;r(Object(E.removeElementById)(e),!1)});Object(C.createPopup)(e,[t,n,a])}).catch(function(e){Object(w.a)(e)})}8===g.a.bitNodeN&&(g.a.money=new _.a(S)),(8===g.a.bitNodeN||p.f)&&(g.a.hasWseAccount=!0,g.a.hasTixApiAccess=!0),g.a.gainIntelligenceExp(5)}}).call(this,n(53))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrays=function(e,t){if(e.length!==t.length)return!1;for(let n=0;n=t.length)return Promise.resolve(!0);return(a=t[n],new Promise(function(e,t){var n=document.getElementById("cinematic-text-container"),i=document.createElement("p");n.appendChild(i);var r=function e(t,n,a=0){return new Promise(function(i,r){setTimeout(function(){if(a>=n.length){var o=n.substring(0,a);return t.innerHTML=o,i(!0)}var o=n.substring(0,a);t.innerHTML=o+"";var s=e(t,n,a+1);s.then(function(e){i(e)},function(e){r(e)})},15)})}(i,a,0);r.then(function(t){e(t)},function(e){t(e)})})).then(function(){return e(t,n+1)});var a}(e).then(function(){return e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container"),e.appendChild(Object(r.createElement)("br")),new Promise(function(n,o){e.appendChild(Object(r.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(i.removeChildrenFromElement)(e),a.Engine.loadTerminalContent(),t.style.visibility="visible",l=!1,n()}}))});var e,t}).catch(function(e){Object(o.a)(e)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalHelpText="Type 'help name' to learn more about the command 'name'

alias [-g] [name=\"value\"] Create or display Terminal aliases
analyze Get information about the current machine
buy [-l/program] Purchase a program through the Dark Web
cat [file] Display a .msg, .lit, or .txt file
check [script] [args...] Print a script's logs to Terminal
clear Clear all text on the terminal
cls See 'clear' command
connect [ip/hostname] Connects to a remote server
download [script/text file] Downloads scripts or text files to your computer
free Check the machine's memory (RAM) usage
hack Hack the current machine
help [command] Display this help text, or the help text for a command
home Connect to home computer
hostname Displays the hostname of the machine
ifconfig Displays the IP address of the machine
kill [script] [args...] Stops the specified script on the current server
killall Stops all running scripts on the current machine
ls [| grep pattern] Displays all files on the machine
lscpu Displays the number of CPU cores on the machine
mem [script] [-t] [n] Displays the amount of RAM required to run the script
nano [file] Text editor - Open up and edit a script or text file
ps Display all scripts that are currently running
rm [file] Delete a file from the server
run [name] [-t] [n] [args...] Execute a program or script
scan Prints all immediately-available network connections
scan-analyze [d] [-a] Prints info for all servers up to d nodes away
scp [file] [server] Copies a file to a destination server
sudov Shows whether you have root access on this computer
tail [script] [args...] Displays dynamic logs for the specified script
theme [preset] | bg txt hlgt Change the color scheme of the UI
top Displays all running scripts and their RAM usage
unalias \"[alias name]\" Deletes the specified alias
",t.HelpTexts={alias:"alias [-g] [name=\"value\"]
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:

alias nuke=\"run NUKE.exe\"

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:

alias worm=\"HTTPWorm.exe\"

and then you tried to run the following terminal command:

run worm

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:

alias -g worm=\"HTTPWorm.exe\"

Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command.

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.

The 'unalias' command can be used to remove aliases.

",analyze:"analze
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.",buy:"buy [-l / program]
Purchase a program through the Dark Web. Requires a TOR router to use.

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.

Otherwise, the name of the program must be passed in as a parameter. This is name is NOT case-sensitive.",cat:"cat [file]
Display message (.msg), literature (.lit), or text (.txt) files. Examples:

cat j1.msg
cat foo.lit
cat servers.txt",check:"check [script name] [args...]
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:

run foo.script 1 2 foodnstuff

Then to run the 'check' command on this script you would have to pass the same arguments in:

check foo.script 1 2 foodnstuff",clear:"clear
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
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]
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]
Downloads a script or text file to your computer (like your real life computer).
You can also download all of your scripts/text files as a zip file using the following Terminal commands:

Download all scripts and text files: download *
Download all scripts: download *.script
Download all text files: download *.txt
",free:"free
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
Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics
",help:"help [command]
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:

help alias
help scan-analyze",home:"home
Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname
Prints the hostname of the current server",ifconfig:"ipconfig
Prints the IP address of the current server",kill:"kill [script name] [args...]
Kill 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 are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 sigma-cosmetics

Then to kill this script the same arguments would have to be used:

kill foo.script 1 sigma-cosmetics

Note that after issuing the 'kill' command 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.",killall:"killall
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 [| grep pattern]
The ls command, with no arguments, prints all files on the current server to the Terminal screen. This includes all scripts, programs, and message files. The files will be displayed in alphabetical order.

The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern. For example, if you wanted to only display files with the .script extension, you could use:

ls | grep .script

Alternatively, if you wanted to display all files with the word purchase in the filename, you could use:

ls | grep purchase",lscpu:"lscpu
Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]
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:

mem foo.script
mem foo.script -t 50
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.",nano:"nano [file name]
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
Prints all scripts that are running on the current server",rm:"rm [file]
Removes the specified file from the current server. A file can be a script, a program, or a message file.

WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]
Execute a program or a script.

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.

[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.

",scan:"scan
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]
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.

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.

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.

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]
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
Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]
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:

run foo.script 10 50000

Then in order to check its logs with 'tail' the same arguments must be used:

tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]
Change the color of the game's user interface

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:

theme #ffffff #385 #235012

A color picker such as Google's can be used to get your desired hex color values

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
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]"
Deletes the specified alias. Note that the double quotation marks are required.

As an example, if an alias was declared using:

alias r="run"

Then it could be removed using:

unalias "r"

It is not necessary to differentiate between global and non-global aliases when using \'unalias\''}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(50),i=n(34),r=n(56);function o(e,t){this.vars=t?Object.assign({},t.vars):Object(i.a)(e),this.parent=t,this.stopFlag=!1}o.prototype={extend:function(){return new o(null,this)},lookup:function(e){for(var t=this;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null},get:function(e){if(e in this.vars)return this.vars[e];throw new Error("Undefined variable "+e)},set:function(e,t){var n=this.lookup(e);return null!==n?n.vars[e]=t:this.vars[e]=t},setArrayElement:function(e,t,n){if(!(t instanceof Array))throw new Error("idx parameter is not an Array");var i=this.lookup(e);if(!i&&this.parent)throw new Error("Undefined variable "+e);var o=(i||this).vars[e];if(!(o.constructor===Array||o instanceof Array))throw new Error("Variable is not an array: "+e);for(var s=o,l=0;l=s.length)throw new Error("Out-of-bounds array access");s=s[c]}if(s[t[t.length-1]]instanceof a.a)throw new Error("Cannot assign a Hacknet Node handle to a new value");if(s[t[t.length-1]]instanceof r.a)throw new Error("Cannot assign a Netscript Port handle to a new value");return s[t[t.length-1]]=n},def:function(e,t){return this.vars[e]=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__(7);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urlStack=null,script=workerScript.getScript();""===script.module&&(urlStack=_getScriptUrls(script,scripts,[]),script.module=await eval("import(urlStack[urlStack.length - 1])")),loadedModule=script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.d)(workerScript,`${script.filename} cannot be run because it does not have a main function.`);return loadedModule.main(ns)}finally{if(null!=urlStack)for(const e in urlStack)URL.revokeObjectURL(e)}}function _getScriptUrls(e,t,n){const a=[];n.push(e);try{const i=e.code.replace(/((?:from|import)\s+(?:'|"))([^'"]+)('|";)/g,(e,i,r,o)=>{if(!t.some(e=>e.filename==r))return e;const[s]=t.filter(e=>e.filename==r),l=_getScriptUrls(s,t,n);return a.push(...l),[i,l[l.length-1],o].join("")});return a.push(URL.createObjectURL(makeScriptBlob(i))),a}catch(e){for(const e in a)URL.revokeObjectURL(e);throw e}finally{n.pop()}}},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"a",function(){return u});var a=n(1),i=n(0),r=n(9),o=n(8),s=n(17),l=n(15);function c(e,t){if(i.a.money.lt(t))Object(o.dialogBoxCreate)("You don't have enough money to purchase this server!");else if(i.a.purchasedServers.length>=a.a.PurchasedServerLimit)Object(o.dialogBoxCreate)("You have reached the maximum limit of "+a.a.PurchasedServerLimit+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");else{var n=Object(l.h)();if(""!=n){var c=new r.d({ip:Object(s.a)(),hostname:n,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:e});Object(r.a)(c),i.a.purchasedServers.push(c.ip);var u=i.a.getHomeComputer();u.serversOnNetwork.push(c.ip),c.serversOnNetwork.push(u.ip),i.a.loseMoney(t),Object(o.dialogBoxCreate)("Server successfully purchased with hostname "+n)}else Object(o.dialogBoxCreate)("You must enter a hostname for your new server!")}}function u(e){if(i.a.money.lt(e))Object(o.dialogBoxCreate)("You do not have enough money to purchase additional RAM for your home computer");else{var t=i.a.getHomeComputer();t.maxRam*=2,i.a.loseMoney(e),Object(o.dialogBoxCreate)("Purchased additional RAM for home computer! It now has "+t.maxRam+"GB of RAM.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a{constructor(e,t,n,a,i,r){this.infoText=e,this.enemies=t,this.offerHackingMission=n,this.offerHackingWork=a,this.offerFieldWork=i,this.offerSecurityWork=r,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}}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.

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 things that others don't. We imagine. We create. We invent. We build things that 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.

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.

Legal Insight - Business Instinct - Experience Innovation",[],!0,!0,!0,!0),"Blade Industries":new a("Augmentation is salvation",[],!0,!0,!0,!0),NWO:new a("The human being does not truly desire freedom. It wants to be observed, understood, and judged. It wants to be given purpose and direction in its life. That is why humans created God. And that is why humans 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("Unlocking the power of the genome",[],!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.

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.

So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new a(" __..__
_.nITESECNIt.
.-'NITESECNITESEc.
.' NITESECNITESECn
/ NITESECNITESEC;
: :NITESECNITESEC;
; $ NITESECNITESECN
: _, ,N'ITESECNITESEC
: .+^^`, : `NITESECNIT
) /), `-,-=,NITESECNI
/ ^ ,-;|NITESECN;
/ _.' '-';NITESECN
( , ,-''`^NITE'
)` :`. .'
)-- ; `- /
' _.-' :
( _.-' .
------.
.
_.nIt
_.nITESECNi
nITESECNIT^'
NITE^' ___
/ .gP''''Tp.
: d' . `b
; d' o `b ;
/ d; `b|
/, $; @ `:
/' $$ ;
.' $$b o |
.' d$$$; :
/ .d$$$$; , ;
d .dNITESEC $ |
:bp.__.gNITESEC$$ :$ ;
NITESECNITESECNIT $$b :
",[],!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, Honour, 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's all 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.\n\nThat'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 Righteousness",[],!0,!0,!1,!0),CyberSec:new a("The Internet is the first thing that humanity has built that humanity doesn’t understand, the largest experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by the internet, society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to protect the world from its imminent collapse.",[],!0,!0,!1,!1),Bladeburners:new a("It's too bad they won't live. But then again, who does?

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";Object.defineProperty(t,"__esModule",{value:!0});const a=n(44),i=n(20);t.removeLoadingScreen=function(){i.removeElementById("loader"),a.getElementById("entire-game-container").style.visibility="visible"}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(0),i=n(14),r=n.n(i);function o(){this.hp=document.getElementById("character-hp-text"),this.money=document.getElementById("character-money-text"),this.hack=document.getElementById("character-hack-text"),this.str=document.getElementById("character-str-text"),this.def=document.getElementById("character-def-text"),this.dex=document.getElementById("character-dex-text"),this.agi=document.getElementById("character-agi-text"),this.cha=document.getElementById("character-cha-text"),this.int=document.getElementById("character-int-text"),this.intWrapper=document.getElementById("character-int-wrapper"),this.repaintElem=document.getElementById("character-overview-text")}o.prototype.repaint=function(){this.repaintElem.getClientRects()},o.prototype.update=function(){null==a.a.hp&&(a.a.hp=a.a.max_hp);const e=function(e,t){return e.textContent!==t&&(e.textContent=t,!0)};let t=!1;t=e(this.hp,a.a.hp+" / "+a.a.max_hp)||t,t=e(this.money,r()(a.a.money.toNumber()).format("($0.000a)"))||t,t=e(this.hack,a.a.hacking_skill.toLocaleString())||t,t=e(this.str,a.a.strength.toLocaleString())||t,t=e(this.def,a.a.defense.toLocaleString())||t,t=e(this.dex,a.a.dexterity.toLocaleString())||t,t=e(this.agi,a.a.agility.toLocaleString())||t,t=e(this.cha,a.a.charisma.toLocaleString())||t,t=e(this.int,a.a.intelligence.toLocaleString())||t;const n=this.intWrapper,i=n.style.display,o=a.a.intelligence>=1?"":"none";i!==o&&(n.style.display=o,t=!0),t&&this.repaint()}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(37),i=function(e,t,n=0){this.sourceCode=e,this.sourceCodeLineOffset=n,"string"==typeof e&&(e=a.parse(e,i.PARSE_OPTIONS)),this.ast=e,this.initFunc_=t,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var r,o,s=/^step([A-Z]\w*)$/;for(var l in this)"function"==typeof this[l]&&(r=l.match(s))&&(this.stepFunctions_[r[1]]=this[l].bind(this));this.global=this.createScope(this.ast,null),this.ast=a.parse(this.polyfills_.join("\n"),i.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new i.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=e,(o=new i.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack};i.PARSE_OPTIONS={ecmaVersion:5,locations:!0},i.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},i.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},i.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},i.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},i.STEP_ERROR={},i.SCOPE_REFERENCE={},i.VALUE_IN_DESCRIPTOR={},i.toStringCycles_=[],i.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}},i.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)"},i.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.parse(e,i.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,r=0;n=e.body[r];r++)t.node.body.push(n);t.done=!1},i.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 r=this.stepFunctions_[a](e,t,n)}catch(e){if(e!==i.STEP_ERROR)throw e}return r&&e.push(r),!!n.end||this.step()},i.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},i.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,i.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,i.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,i.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,i.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,i.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new i.Object(null),this.FUNCTION_PROTO=new i.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,i.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"]],r=0;r>> 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(',');","}","});","")},i.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),i.NONENUMERABLE_DESCRIPTOR);for(var a=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],r=0;r= 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;","};","}","")},i.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)},i.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"],r=0;r>>0;return t===Number(e)?t:NaN},i.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},i.Value,i.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},i.Object.prototype.proto=null,i.Object.prototype.isObject=!0,i.Object.prototype.class="Object",i.Object.prototype.data=null,i.Object.prototype.toString=function(){if("Array"===this.class){(a=i.toStringCycles_).push(this);try{for(var e=[],t=0;t0;r.pop()){var o=r[r.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:e,value:t,label:n});case"CallExpression":case"NewExpression":if(e===i.Completion.RETURN)return void(o.value=t);if(e!==i.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===i.Completion.BREAK){if(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop||o.isSwitch)return void r.pop()}else if(e===i.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},i.prototype.createGetter_=function(e,t){var n=Array.isArray(t)?t[0]:t,a=new this.nodeConstructor;a.type="CallExpression";var r=new i.State(a,this.stateStack[this.stateStack.length-1].scope);return r.doneCallee_=!0,r.funcThis_=n,r.func_=e,r.doneArgs_=!0,r.arguments_=[],r},i.prototype.createSetter_=function(e,t,n){var a=Array.isArray(t)?t[0]:this.global,r=new this.nodeConstructor;r.type="CallExpression";var o=new i.State(r,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=a,o.func_=e,o.doneArgs_=!0,o.arguments_=[n],o},i.State=function(e,t){this.node=e,this.scope=t},i.prototype.stepArrayExpression=function(e,t,n){var a=n.elements,r=t.n_||0;for(t.array_?(this.setProperty(t.array_,r,t.value),r++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=a.length);r>=":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},i.prototype.stepBinaryExpression=function(e,t,n){if(!t.doneLeft_)return t.doneLeft_=!0,new i.State(n.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new i.State(n.right,t.scope);e.pop();var a,r=t.leftValue_,o=t.value;switch(n.operator){case"==":a=r==o;break;case"!=":a=r!=o;break;case"===":a=r===o;break;case"!==":a=r!==o;break;case">":a=r>o;break;case">=":a=r>=o;break;case"<":a=r>":a=r>>o;break;case">>>":a=r>>>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,r);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=!!r.isObject&&this.isa(r,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=a},i.prototype.stepBlockStatement=function(e,t,n){var a=t.n_||0,r=n.body[a];if(r)return t.n_=a+1,new i.State(r,t.scope);e.pop()},i.prototype.stepBreakStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(i.Completion.BREAK,void 0,a)},i.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var r=new i.State(n.callee,t.scope);return r.components=!0,r}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o,n),o[0]===i.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 i.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;uu?t.arguments_[u]:void 0;this.setProperty(c,d,h)}var p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;ut===e.name);return-1===t?console.log("ERROR: Could not find faction in Player.factionInvitations"):r.a.factionInvitations.splice(t,1),Object(a.h)(e),s(),i.Engine.currentPage===i.Engine.Page.Factions&&i.Engine.loadFactionsContent(),!1}),Object(o.clearEventListeners)("faction-invitation-box-no").addEventListener("click",function(){return s(),!1}),document.getElementById("faction-invitation-box-container").style.display="block"}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var a=n(16),i=n(1),r=n(12),o=n(0),s=n(8),l=n(13),c=n(2),u="";function d(){document.getElementById("infiltration-box-container").style.display="none"}function h(e){var t=2*e.clearanceLevel/e.maxClearanceLevel;o.a.gainHackingExp(e.hackingExpGained*t),o.a.gainStrengthExp(e.strExpGained*t),o.a.gainDefenseExp(e.defExpGained*t),o.a.gainDexterityExp(e.dexExpGained*t),o.a.gainAgilityExp(e.agiExpGained*t),o.a.gainCharismaExp(e.chaExpGained*t),o.a.gainIntelligenceExp(e.intExpGained*t);for(var n=0,h=0;h"+o.a.factions[e]+"");if(""!==u)for(let e=0;e
You gained:
"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp
"+Object(c.formatNumber)(e.strExpGained,3)+" str exp
"+Object(c.formatNumber)(e.defExpGained,3)+" def exp
"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp
"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp
"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp
"),d(),!1)})},750);var b=Object(l.clearEventListeners)("infiltration-box-faction");setTimeout(function(){b.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=y.options[y.selectedIndex].value;u=n;var a=r.b[n];return null==a?(Object(s.dialogBoxCreate)("Error finding faction. This is a bug please report to developer"),!1):(a.playerReputation+=m,Object(s.dialogBoxCreate)("You gave the classified information you stole from "+e.companyName+" to "+n+" and gained "+Object(c.formatNumber)(m,3)+" reputation with the faction.

You gained:
"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp
"+Object(c.formatNumber)(e.strExpGained,3)+" str exp
"+Object(c.formatNumber)(e.defExpGained,3)+" def exp
"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp
"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp
"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp
"),d(),!1)})},750),document.getElementById("infiltration-box-container").style.display="block"}else Object(s.dialogBoxCreate)("You successfully escaped the facility but you did not steal anything of worth when infiltrating.

You gained:
"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp
"+Object(c.formatNumber)(e.strExpGained,3)+" str exp
"+Object(c.formatNumber)(e.defExpGained,3)+" def exp
"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp
"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp
"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp
")}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(16),i=n(1),r=n(6),o=n(0),s=n(8),l=n(13),c=n(5),u=n(98),d=n(2);let h={Guards:"You see an armed security guard patrolling the area.",TechOnly:"The area is equipped with a state-of-the-art security system: cameras, laser tripwires, and sentry turrets.",TechOrLockedDoor:"The area is equipped with a state-of-the-art security system. There is a locked door on the side of the room that can be used to bypass security.",Bots:"You see a few security bots patrolling the area."};function p(e,t,n,a,i){this.companyName=e,this.clearanceLevel=0,this.maxClearanceLevel=a,this.securityLevel=t,this.difficulty=i,this.baseValue=n,this.secretsStolen=[],this.hackingExpGained=0,this.strExpGained=0,this.defExpGained=0,this.dexExpGained=0,this.agiExpGained=0,this.chaExpGained=0,this.intExpGained=0}function m(e,t,n,a,i){var r=new p(e,t,n,a,i);document.getElementById("infiltration-status-text").innerHTML="",y(r)}function g(e,t){t&&Object(u.a)(e),Object(l.clearEventListeners)("infiltration-kill"),Object(l.clearEventListeners)("infiltration-knockout"),Object(l.clearEventListeners)("infiltration-stealthknockout"),Object(l.clearEventListeners)("infiltration-assassinate"),Object(l.clearEventListeners)("infiltration-hacksecurity"),Object(l.clearEventListeners)("infiltration-destroysecurity"),Object(l.clearEventListeners)("infiltration-sneak"),Object(l.clearEventListeners)("infiltration-pickdoor"),Object(l.clearEventListeners)("infiltration-bribe"),Object(l.clearEventListeners)("infiltration-escape"),r.Engine.loadLocationContent()}function y(e){++e.clearanceLevel,v(e);var t=Object(l.clearEventListeners)("infiltration-kill"),n=Object(l.clearEventListeners)("infiltration-knockout"),a=Object(l.clearEventListeners)("infiltration-stealthknockout"),r=Object(l.clearEventListeners)("infiltration-assassinate"),s=Object(l.clearEventListeners)("infiltration-hacksecurity"),u=Object(l.clearEventListeners)("infiltration-destroysecurity"),p=Object(l.clearEventListeners)("infiltration-sneak"),m=Object(l.clearEventListeners)("infiltration-pickdoor"),y=Object(l.clearEventListeners)("infiltration-bribe"),k=Object(l.clearEventListeners)("infiltration-escape");t.style.display="none",n.style.display="none",a.style.display="none",r.style.display="none",s.style.display="none",u.style.display="none",p.style.display="none",m.style.display="none",y.style.display="none",k.style.display="none";var O=null;switch(Object(c.getRandomInt)(0,5)){case 1:O=h.TechOnly,s.style.display="block",u.style.display="block",p.style.display="block",k.style.display="block";break;case 2:O=h.TechOrLockedDoor,s.style.display="block",u.style.display="block",p.style.display="block",m.style.display="block",k.style.display="block";break;case 3:O=h.Bots,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=E(e);if(n[0])return b("You SUCCESSFULLY killed the security bots! Unfortunately you alerted the rest of the facility's security. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.karma-=1,f(e),!1;var a=Math.max(1,Math.round(1.5*e.securityLevel/o.a.defense));b("You FAILED to kill the security bots. The bots fight back and raise the alarm! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e)}),r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return b("You SUCCESSFULLY assassinated the security bots without being detected!"),o.a.karma-=1,f(e),!1;b("You FAILED to assassinate the security bots. The bots have not detected you but are now more alert for an intruder. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e)}),s.style.display="block",p.style.display="block",k.style.display="block";break;default:O=h.Guards,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=E(e);if(n[0])return b("You SUCCESSFULLY killed the security guard! Unfortunately you alerted the rest of the facility's security. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.karma-=3,++o.a.numPeopleKilled,f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));b("You FAILED to kill the security guard. The guard fights back and raises the alarm! You take "+a+" damage and the facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e)}),n.style.display="block",a.style.display="block",r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return b("You SUCCESSFULLY assassinated the security guard without being detected!"),o.a.karma-=3,++o.a.numPeopleKilled,f(e),!1;b("You FAILED to assassinate the security guard. The guard has not detected you but is now more alert for an intruder. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e)}),p.style.display="block",y.style.display="block",k.style.display="block"}n.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=C(e);return e.gainStrengthExp(e.securityLevel/70),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/70),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/70),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/70),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.03,[!0,1.03]):(e.securityLevel*=1.1,[!1,1.1])}(e);if(n[0])return b("You SUCCESSFULLY knocked out the security guard! Unfortunately you made a lot of noise and alerted other security."),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));return b("You FAILED to knockout the security guard. The guard raises the alarm and fights back! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e),!1}),a.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=w(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDexterityExp(e.securityLevel/60),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/60),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.1,[!1,1.1])}(e);if(n[0])return b("You SUCCESSFULLY knocked out the security guard without making any noise!"),f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));return b("You FAILED to stealthily knockout the security guard. The guard raises the alarm and fights back! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e),!1}),s.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=x(e);return e.gainHackingExp(e.securityLevel/30),o.a.hacking_exp_mult,e.gainIntelligenceExp(e.securityLevel/680),Math.random()<=t?(e.securityLevel*=1.03,[!0,1.03]):(e.securityLevel*=1.05,[!1,1.05])}(e);return n[0]?(b("You SUCCESSFULLY hacked and disabled the security system!"),b("The facility's security level increased by "+(100*n[1]-100).toString()+"%"),f(e),!1):(b("You FAILED to hack the security system. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),u.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=R(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/75),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/75),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/75),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.05,[!0,1.05]):(e.securityLevel*=1.1,[!1,1.1])}(e);return n[0]?(b("You SUCCESSFULLY and violently destroy the security system!"),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(b("You FAILED to destroy the security system. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),p.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=I(e);return e.gainAgilityExp(e.securityLevel/30),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.08,[!1,1.08])}(e);return n[0]?(b("You SUCCESSFULLY sneak past the security undetected!"),f(e),!1):(b("You FAILED and were detected while trying to sneak past security! The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),m.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=P(e);return e.gainDexterityExp(e.securityLevel/25),o.a.dexterity_exp_mult,Math.random()<=t?(e.securityLevel*=1.01,[!0,1.01]):(e.securityLevel*=1.03,[!1,1.03])}(e);return n[0]?(b("You SUCCESSFULLY pick the locked door!"),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(b("You FAILED to pick the locked door. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),y.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=i.a.InfiltrationBribeBaseAmount*e.clearanceLevel;if(o.a.money.lt(n))return b("You do not have enough money to bribe the guard. You need $"+n),!1;var a=function(e){var t=N(e);return e.gainCharismaExp(e.securityLevel/8),o.a.charisma_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.15,[!1,1.15])}(e);return a[0]?(b("You SUCCESSFULLY bribed a guard to let you through to the next clearance level for $"+n),o.a.loseMoney(n),f(e),!1):(b("You FAILED to bribe a guard! The guard is alerting other security guards about your presence! The facility's security level increased by "+Object(d.formatNumber)(100*a[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),k.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=A(e);return e.gainAgilityExp(e.securityLevel/30),o.a.agility_exp_mult,e.gainDexterityExp(e.securityLevel/30),o.a.dexterity_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.05,[!1,1.05])}(e);return n[0]?(b("You SUCCESSFULLY escape from the facility with the stolen classified documents and company secrets!"),g(e,!0),!1):(b("You FAILED to escape from the facility. You took 1 damage. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(1)&&g(e,!1),_(e,O),v(e),!1)}),_(e,O),b(""),b("You are now on clearance level "+e.clearanceLevel+".
"+O)}function f(e){if(e.clearanceLevel%5==0){var t=e.baseValue*e.clearanceLevel/2,n=t*o.a.faction_rep_mult*i.a.InfiltrationRepValue*a.a.InfiltrationRep,r=t*i.a.InfiltrationMoneyValue*a.a.InfiltrationMoney;e.secretsStolen.push(t),Object(s.dialogBoxCreate)("You found and stole a set of classified documents from the company. These classified secrets could probably be sold for money ($"+Object(d.formatNumber)(r,2)+"), or they could be given to factions for reputation ("+Object(d.formatNumber)(n,3)+" rep)")}e.securityLevel*=1+e.difficulty/100,b("You move on to the facility's next clearance level. This clearance level has "+e.difficulty+"% higher security"),e.clearanceLevel>=e.maxClearanceLevel?g(e,!0):y(e)}function b(e){var t=document.getElementById("infiltration-status-text");t.innerHTML+=e+"
",t.parentElement.scrollTop=t.scrollHeight}function v(e){for(var t=0,n=0,r=0;rClearance Level: "+e.clearanceLevel+"
Security Level: "+Object(d.formatNumber)(e.securityLevel,3)+"

Total reputation value of secrets stolen: "+Object(d.formatNumber)(t,3)+"
Total monetary value of secrets stolen: $"+Object(d.formatNumber)(n,2)+"

Hack exp gained: "+Object(d.formatNumber)(e.hackingExpGained*s,3)+"
Str exp gained: "+Object(d.formatNumber)(e.strExpGained*s,3)+"
Def exp gained: "+Object(d.formatNumber)(e.defExpGained*s,3)+"
Dex exp gained: "+Object(d.formatNumber)(e.dexExpGained*s,3)+"
Agi exp gained: "+Object(d.formatNumber)(e.agiExpGained*s,3)+"
Cha exp gained: "+Object(d.formatNumber)(e.chaExpGained*s,3)}function _(e,t){var n=O(e),a=C(e),i=w(e),r=T(e),o=R(e),s=x(e),l=I(e),c=P(e),u=N(e),p=A(e);switch(document.getElementById("infiltration-escape").innerHTML="EscapeAttempt to escape the facility with the classified secrets and documents you have stolen. You have a "+Object(d.formatNumber)(100*p,2)+"% chance of success. If you fail, the security level will increase by 5%.",t){case h.TechOrLockedDoor:document.getElementById("infiltration-pickdoor").innerHTML="LockpickAttempt to pick the locked door. You have a "+Object(d.formatNumber)(100*c,2)+"% chance of success. If you succeed, the security level will increased by 1%. If you fail, the security level will increase by 3%.";case h.TechOnly:document.getElementById("infiltration-hacksecurity").innerHTML="HackAttempt to hack and disable the security system. You have a "+Object(d.formatNumber)(100*s,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 5%.",document.getElementById("infiltration-destroysecurity").innerHTML="Destroy securityAttempt to violently destroy the security system. You have a "+Object(d.formatNumber)(100*o,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-sneak").innerHTML="SneakAttempt to sneak past the security system. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. ";break;case h.Bots:document.getElementById("infiltration-kill").innerHTML="Destroy botsAttempt to destroy the security bots through combat. You have a "+Object(d.formatNumber)(100*n,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-assassinate").innerHTML="Assassinate botsAttempt to stealthily destroy the security bots through assassination. You have a "+Object(d.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-hacksecurity").innerHTML="Hack botsAttempt to disable the security bots by hacking them. You have a "+Object(d.formatNumber)(100*s,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 5%. ",document.getElementById("infiltration-sneak").innerHTML="SneakAttempt to sneak past the security bots. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. ";break;case h.Guards:default:document.getElementById("infiltration-kill").innerHTML="KillAttempt to kill the security guard. You have a "+Object(d.formatNumber)(100*n,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will decrease by 10%. ",document.getElementById("infiltration-knockout").innerHTML="KnockoutAttempt to knockout the security guard. You have a "+Object(d.formatNumber)(100*a,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-stealthknockout").innerHTML="Stealth KnockoutAttempt to stealthily knockout the security guard. You have a "+Object(d.formatNumber)(100*i,2)+"% chance of success. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-assassinate").innerHTML="AssassinateAttempt to assassinate the security guard. You have a "+Object(d.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 5%. ",document.getElementById("infiltration-sneak").innerHTML="SneakAttempt to sneak past the security guard. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. ",document.getElementById("infiltration-bribe").innerHTML="BribeAttempt to bribe the security guard. You have a "+Object(d.formatNumber)(100*u,2)+"% chance of success. If you fail, the security level will increase by 15%. "}}p.prototype.gainHackingExp=function(e){isNaN(e)||(this.hackingExpGained+=e)},p.prototype.gainStrengthExp=function(e){isNaN(e)||(this.strExpGained+=e)},p.prototype.gainDefenseExp=function(e){isNaN(e)||(this.defExpGained+=e)},p.prototype.gainDexterityExp=function(e){isNaN(e)||(this.dexExpGained+=e)},p.prototype.gainAgilityExp=function(e){isNaN(e)||(this.agiExpGained+=e)},p.prototype.gainCharismaExp=function(e){isNaN(e)||(this.chaExpGained+=e)},p.prototype.gainIntelligenceExp=function(e){isNaN(e)||(this.intExpGained+=e)};let k=i.a.IntelligenceInfiltrationWeight;function E(e){var t=O(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/75),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/75),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/75),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.05,[!0,1.05]):(e.securityLevel*=1.1,[!1,1.1])}function O(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.45*t))}function C(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.7*t))}function w(e){var t=e.securityLevel;return Math.min(.95,(.55*o.a.strength+2*o.a.dexterity+2*o.a.agility+k*o.a.intelligence)/(3*t))}function S(e){var t=T(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDexterityExp(e.securityLevel/55),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/55),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.05,[!1,1.05])}function T(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+.5*o.a.agility+k*o.a.intelligence)/(2*t))}function R(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(2*t))}function x(e){var t=e.securityLevel;return Math.min(.95,(o.a.hacking_skill+k*o.a.intelligence)/t)}function I(e){var t=e.securityLevel;return Math.min(.95,(o.a.agility+.5*o.a.dexterity+k*o.a.intelligence)/(2*t))}function P(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+k*o.a.intelligence)/t)}function N(e){var t=e.securityLevel;return Math.min(.95,o.a.charisma/t)}function A(e){var t=e.securityLevel;return Math.min(.95,(2*o.a.agility+o.a.dexterity+k*o.a.intelligence)/t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSelector=function(e){for(let t=e.options.length-1;t>=0;t--)e.remove(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerOfTwo=function(e){return!isNaN(e)&&0!==e&&0==(e&e-1)}},,,,,,,,,,,,,,,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,,,,,,,,function(e,t,n){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},r.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};a.inherits(r,i),r.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},r.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},r.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=r}),ace.define("ace/mode/netscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,r=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*";let s="hack|sleep|grow|weaken|print|tprint|scan|nuke|brutessh|ftpcrack|clearLog|disableLog|enableLog|relaysmtp|httpworm|sqlinject|run|exec|spawn|kill|killall|exit|scp|ls|hasRootAccess|getIp|getHackingMultipliers|getBitNodeMultipliers|getStats|isBusy|getHacknetMultipliers|getHostname|getHackingLevel|getServerMoneyAvailable|getServerMaxMoney|getServerGrowth|getServerSecurityLevel|getServerBaseSecurityLevel|getServerMinSecurityLevel|getServerRequiredHackingLevel|getServerNumPortsRequired|getServerRam|serverExists|fileExists|isRunning|deleteServer|getPurchasedServers|getPurchasedServerLimit|getPurchasedServerMaxRam|getPurchasedServerCost|purchaseServer|round|write|read|peek|clear|rm|getPortHandle|scriptRunning|scriptKill|getScriptName|getScriptRam|getHackTime|getGrowTime|getWeakenTime|getScriptIncome|getScriptExpGain|getTimeSinceLastAug|prompt|universityCourse|getCharacterInformation|gymWorkout|travelToCity|purchaseTor|purchaseProgram|upgradeHomeRam|getUpgradeHomeRamCost|workForCompany|applyToCompany|getCompanyRep|getCompanyFavor|stopAction|getFactionFavor|getFavorToDonate|getFactionFavorGain|getCompanyFavorGain|checkFactionInvitations|joinFaction|workForFaction|getFactionRep|createProgram|commitCrime|getCrimeChance|getOwnedAugmentations|getOwnedSourceFiles|getAugmentationsFromFaction|getAugmentationCost|purchaseAugmentation|installAugmentations|getStockPrice|getStockPosition|buyStock|sellStock|shortStock|sellShort|placeOrder|cancelOrder|hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|upgradeLevel|upgradeRam|upgradeCore|getLevelUpgradeCost|getRamUpgradeCost|getCoreUpgradeCost|bladeburner|getContractNames|getOperationNames|getBlackOpNames|getGeneralActionNames|getSkillNames|startAction|stopBladeburnerAction|getActionTime|getActionEstimatedSuccessChance|getActionCountRemaining|getActionMaxLevel|getActionCurrentLevel|getActionAutolevel|setActionAutolevel|setActionLevel|getRank|getSkillPoints|getSkillLevel|upgradeSkill|getTeamSize|setTeamSize|getCityEstimatedPopulation|getCityEstimatedCommunities|getCityChaos|switchCity|getStamina|joinBladeburnerFaction";var l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|ns|"+s+"|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),c("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"/|"+s+"|/"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&0==e.jsx||function(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var a="/"==e.charAt(1)?2:1;return 1==a?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==a&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==a?"":"end-")+"tag-open.xml",value:e.slice(0,a)},{type:"meta.tag.tag-name.xml",value:e.substr(a)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}a.inherits(l,r),t.NetscriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var a=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,r=e.findMatchingBracket({row:t,column:i});if(!r||r.row==t)return 0;var o=this.$getIndent(e.getLine(r.row));e.replace(new a(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var a=e("../../lib/oop"),i=e("../../range").Range,r=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};a.inherits(o,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var a=e.getLine(n);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(a)?"start":i},this.getFoldWidgetRange=function(e,t,n,a){var i,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(i=r.match(this.foldingStartMarker)){var o=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,o);var s=e.getCommentFoldRange(n,o+i[0].length,1);return s&&!s.isMultiLine()&&(a?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=r.match(this.foldingStopMarker))){o=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),a=n.search(/\S/),r=t,o=n.length,s=t+=1,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=r)break;if(u.isMultiLine())t=u.end.row;else if(a==c)break}s=t}}return new i(r,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var a=t.search(/\s*$/),r=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++no)return new i(o,a,n,t.length)}}.call(o.prototype)}),ace.define("ace/mode/netscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/netscript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,a){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./netscript_highlight_rules").NetscriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("../worker/worker_client").WorkerClient,c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new c,this.foldingRules=new u};i.inherits(d,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var a=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),r=i.tokens,o=i.state;if(r.length&&"comment"==r[r.length-1].type)return a;if("start"==e||"no_regex"==e)(s=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(a+=n);else if("doc-start"==e){if("start"==o||"no_regex"==o)return"";var s;(s=t.match(/^\s*(\/?)\*/))&&(s[1]&&(a+=" "),a+="* ")}return a},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],n(144),"JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/netscript"}.call(d.prototype),t.Mode=d})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){}]); +!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],d=0,h=[];d0?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),R.hp=Math.round(this.max_hp*e)},S.prototype.resetMultipliers=function(){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},S.prototype.calculateHackingChance=function(){var e=(100-this.getCurrentServer().hackDifficulty)/100,t=1.75*this.hacking_skill+.2*this.intelligence,n=(t-this.getCurrentServer().requiredHackingSkill)/t*e*this.hacking_chance_mult;return n>1?1:n<0?0:n},S.prototype.calculateHackingTime=function(){return 5*((2.5*(this.getCurrentServer().requiredHackingSkill*this.getCurrentServer().hackDifficulty)+200)/(this.hacking_skill+100+.1*this.intelligence))/this.hacking_speed_mult},S.prototype.calculatePercentMoneyHacked=function(){var e=(100-this.getCurrentServer().hackDifficulty)/100*((this.hacking_skill-(this.getCurrentServer().requiredHackingSkill-1))/this.hacking_skill)*this.hacking_money_mult/240;return console.log("Percent money hacked calculated to be: "+e),e<0?0:e>1?1:e*i.a.ManualHackMoney},S.prototype.calculateExpGain=function(){var e=this.getCurrentServer();return null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty),(e.baseDifficulty*this.hacking_exp_mult*.3+3)*i.a.HackExpGain},S.prototype.hack=function(){this.actionTime=this.calculateHackingTime(),console.log("Hacking time: "+this.actionTime),this.startAction=!0},S.prototype.analyze=function(){this.actionTime=1,this.startAction=!0},S.prototype.hasProgram=function(e){for(var t=R.getHomeComputer(),n=0;n0?this.intelligence_exp+=e:console.log("Not gaining intelligence experience bc it hasn't been unlocked yet")},S.prototype.queryStatFromString=function(e){var t=e.toLowerCase();return t.includes("hack")?R.hacking_skill:t.includes("str")?R.strength:t.includes("def")?R.defense:t.includes("dex")?R.dexterity:t.includes("agi")?R.agility:t.includes("cha")?R.charisma:t.includes("int")?R.intelligence:void 0},S.prototype.resetWorkStatus=function(){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.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",document.getElementById("work-in-progress-text").innerHTML=""},S.prototype.gainWorkExp=function(){this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)},S.prototype.finishWork=function(e,t=!1){e&&(this.workRepGained/=2),this.gainWorkExp(),r.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var n="You earned a total of:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the company
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(n=e?"You worked a short shift of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

Since you cancelled your work early, you only gained half of the reputation you earned.

"+n:"You worked a full shift of 8 hours!

"+n,t||Object(v.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),t){var a="You worked a short shift of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+Object(w.formatNumber)(this.workMoneyGained,2)+", "+Object(w.formatNumber)(this.workRepGained,4)+" reputation, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()},S.prototype.startWork=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.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=o.a.MillisecondsPer8Hours;var e=Object(_.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Cancel Work",e.addEventListener("click",function(){return R.finishWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.work=function(e){this.workRepGainRate=this.getWorkRepGain(),this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var t=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer8Hours){var n=o.a.GameCyclesPer8Hours;return this.workHackExpGained=this.workHackExpGainRate*n,this.workStrExpGained=this.workStrExpGainRate*n,this.workDefExpGained=this.workDefExpGainRate*n,this.workDexExpGained=this.workDexExpGainRate*n,this.workAgiExpGained=this.workAgiExpGainRate*n,this.workChaExpGained=this.workChaExpGainRate*n,this.workRepGained=this.workRepGainRate*n,this.workMoneyGained=this.workMoneyGainRate*n,void this.finishWork(!1)}var a=r.a[this.companyName],i="0";null!=a&&a instanceof r.b?i=a.playerReputation:console.log("ERROR: Could not find Company: "+this.companyName),document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition.positionName+" at "+this.companyName+" (Current Company Reputation: "+Object(w.formatNumber)(i,0)+")

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

You have earned:

$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ($"+Object(w.formatNumber)(this.workMoneyGainRate*t,2)+" / sec)

"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*t,4)+" / sec) reputation for this company

"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*t,4)+" / sec) hacking exp

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

"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*t,4)+" / sec) charisma exp

You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain half of the reputation you've earned so far."},S.prototype.startWorkPartTime=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.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=o.a.MillisecondsPer8Hours;var e=Object(_.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Stop Working",e.addEventListener("click",function(){return R.finishWorkPartTime(),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.workPartTime=function(e){this.workRepGainRate=this.getWorkRepGain(),this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var t=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer8Hours){var n=o.a.GameCyclesPer8Hours;return this.workHackExpGained=this.workHackExpGainRate*n,this.workStrExpGained=this.workStrExpGainRate*n,this.workDefExpGained=this.workDefExpGainRate*n,this.workDexExpGained=this.workDexExpGainRate*n,this.workAgiExpGained=this.workAgiExpGainRate*n,this.workChaExpGained=this.workChaExpGainRate*n,this.workRepGained=this.workRepGainRate*n,this.workMoneyGained=this.workMoneyGainRate*n,void this.finishWorkPartTime()}document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition.positionName+" at "+R.companyName+"

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

You have earned:

$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ($"+Object(w.formatNumber)(this.workMoneyGainRate*t,2)+" / sec)

"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*t,4)+" / sec) reputation for this company

"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*t,4)+" / sec) hacking exp

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

"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*t,4)+" / sec) charisma exp

You will automatically finish after working for 8 hours. You can cancel earlier if you wish,
and there will be no penalty because this is a part-time job."},S.prototype.finishWorkPartTime=function(e=!1){this.gainWorkExp(),r.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var t="You earned a total of:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the company
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(t="You worked for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

"+t,e||Object(v.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),e){var n="You worked for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+Object(w.formatNumber)(this.workMoneyGained,2)+", "+Object(w.formatNumber)(this.workRepGained,4)+" reputation, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},S.prototype.finishFactionWork=function(e,t=!1){this.gainWorkExp();var n=d.b[this.currentWorkFactionName];n.playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var a="You worked for your faction "+n.name+" for a total of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You earned a total of:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the faction
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(t||Object(v.dialogBoxCreate)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadFactionContent(),Object(d.c)(n.name),t){var i="You worked for your faction "+n.name+" for a total of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+Object(w.formatNumber)(this.workRepGained,4)+" rep, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agi exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" cha exp.";return this.resetWorkStatus(),i}this.resetWorkStatus()},S.prototype.startFactionWork=function(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=i.a.FactionWorkRepGain,this.isWorking=!0,this.workType=o.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=o.a.MillisecondsPer20Hours;var n=Object(_.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",function(){return R.finishFactionWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.startFactionHackWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.15*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.workRepGainRate=(this.hacking_skill+this.intelligence)/o.a.MaxSkillLevel*this.faction_rep_mult,this.factionWorkType=o.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)},S.prototype.startFactionFieldWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*i.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*i.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*i.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.getFactionFieldWorkRepGain(),this.factionWorkType=o.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)},S.prototype.startFactionSecurityWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.05*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*i.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*i.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*i.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.getFactionSecurityWorkRepGain(),this.factionWorkType=o.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)},S.prototype.workForFaction=function(e){var t=d.b[this.currentWorkFactionName];switch(this.factionWorkType){case o.a.FactionWorkHacking:this.workRepGainRate=(this.hacking_skill+this.intelligence)/o.a.MaxSkillLevel*this.faction_rep_mult;break;case o.a.FactionWorkField:this.workRepGainRate=this.getFactionFieldWorkRepGain();break;case o.a.FactionWorkSecurity:this.workRepGainRate=this.getFactionSecurityWorkRepGain()}var n=1+t.favor/100;isNaN(n)&&(n=1),this.workRepGainRate*=n,this.workRepGainRate*=i.a.FactionWorkRepGain,this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var a=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer20Hours){var r=o.a.GameCyclesPer20Hours;this.timeWorked=o.a.MillisecondsPer20Hours,this.workHackExpGained=this.workHackExpGainRate*r,this.workStrExpGained=this.workStrExpGainRate*r,this.workDefExpGained=this.workDefExpGainRate*r,this.workDexExpGained=this.workDexExpGainRate*r,this.workAgiExpGained=this.workAgiExpGainRate*r,this.workChaExpGained=this.workChaExpGainRate*r,this.workRepGained=this.workRepGainRate*r,this.workMoneyGained=this.workMoneyGainRate*r,this.finishFactionWork(!1)}document.getElementById("work-in-progress-text").innerHTML="You are currently "+this.currentWorkFactionDescription+" for your faction "+t.name+" (Current Faction Reputation: "+Object(w.formatNumber)(t.playerReputation,0)+"). You have been doing this for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ("+Object(w.formatNumber)(this.workMoneyGainRate*a,2)+" / sec)

"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*a,4)+" / sec) reputation for this faction

"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*a,4)+" / sec) hacking exp

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

"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*a,4)+" / sec) charisma exp

You will automatically finish after working for 20 hours. You can cancel earlier if you wish.
There is no penalty for cancelling earlier."},S.prototype.getWorkMoneyGain=function(){var e=1,t=r.a[this.companyName];return m.d&&(e=1+t.favor/100),this.companyPosition.baseSalary*t.salaryMultiplier*this.work_money_mult*i.a.CompanyWorkMoney*e},S.prototype.getWorkHackExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkStrExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.strengthExpGain*e.expMultiplier*this.strength_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkDefExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.defenseExpGain*e.expMultiplier*this.defense_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkDexExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkAgiExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.agilityExpGain*e.expMultiplier*this.agility_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkChaExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkRepGain=function(){var e=r.a[this.companyName],t=this.companyPosition.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);t+=this.intelligence/o.a.MaxSkillLevel;var n=1+e.favor/100;return isNaN(n)&&(n=1),t*this.company_rep_mult*n},S.prototype.getFactionSecurityWorkRepGain=function(){return.9*(this.hacking_skill/o.a.MaxSkillLevel+this.strength/o.a.MaxSkillLevel+this.defense/o.a.MaxSkillLevel+this.dexterity/o.a.MaxSkillLevel+this.agility/o.a.MaxSkillLevel)/4.5*this.faction_rep_mult},S.prototype.getFactionFieldWorkRepGain=function(){return.9*(this.hacking_skill/o.a.MaxSkillLevel+this.strength/o.a.MaxSkillLevel+this.defense/o.a.MaxSkillLevel+this.dexterity/o.a.MaxSkillLevel+this.agility/o.a.MaxSkillLevel+this.charisma/o.a.MaxSkillLevel+this.intelligence/o.a.MaxSkillLevel)/5.5*this.faction_rep_mult},S.prototype.startCreateProgramWork=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a=100)break;this.timeWorkedCreateProgram=s/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var l=Object(_.clearEventListeners)("work-in-progress-cancel-button");l.innerHTML="Cancel work on creating program",l.addEventListener("click",function(){return R.finishCreateProgramWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.createProgramWork=function(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t;n=1+(n-1)/5,this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=u.Engine._idleSpeed*e*n;var a=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1),document.getElementById("work-in-progress-text").innerHTML="You are currently working on coding "+a+".

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

The program is "+(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2)+"% complete.
If you cancel, your work will be saved and you can come back to complete the program later."},S.prototype.finishCreateProgramWork=function(e,t=!1){var n=this.createProgramName;if(!1===e)Object(v.dialogBoxCreate)("You've finished creating "+n+"!
The new program can be found on your home computer."),this.getHomeComputer().programs.push(n);else{var a=n+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(a)}e||this.gainIntelligenceExp(this.createProgramReqLvl/o.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadTerminalContent(),this.resetWorkStatus()},S.prototype.startClass=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeStudyClass,this.className=n;var a=1e3/u.Engine._idleSpeed,r=0,s=0,l=0,c=0,d=0,h=0,p=0;switch(n){case o.a.ClassStudyComputerScience:s=.5*t/a;break;case o.a.ClassDataStructures:r=o.a.ClassDataStructuresBaseCost*e/a,s=1*t/a;break;case o.a.ClassNetworks:r=o.a.ClassNetworksBaseCost*e/a,s=2*t/a;break;case o.a.ClassAlgorithms:r=o.a.ClassAlgorithmsBaseCost*e/a,s=4*t/a;break;case o.a.ClassManagement:r=o.a.ClassManagementBaseCost*e/a,p=2*t/a;break;case o.a.ClassLeadership:r=o.a.ClassLeadershipBaseCost*e/a,p=4*t/a;break;case o.a.ClassGymStrength:r=o.a.ClassGymBaseCost*e/a,l=1*t/a;break;case o.a.ClassGymDefense:r=o.a.ClassGymBaseCost*e/a,c=1*t/a;break;case o.a.ClassGymDexterity:r=o.a.ClassGymBaseCost*e/a,d=1*t/a;break;case o.a.ClassGymAgility:r=o.a.ClassGymBaseCost*e/a,h=1*t/a;break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=s*this.hacking_exp_mult*i.a.ClassGymExpGain,this.workStrExpGainRate=l*this.strength_exp_mult*i.a.ClassGymExpGain,this.workDefExpGainRate=c*this.defense_exp_mult*i.a.ClassGymExpGain,this.workDexExpGainRate=d*this.dexterity_exp_mult*i.a.ClassGymExpGain,this.workAgiExpGainRate=h*this.agility_exp_mult*i.a.ClassGymExpGain,this.workChaExpGainRate=p*this.charisma_exp_mult*i.a.ClassGymExpGain;var m=Object(_.clearEventListeners)("work-in-progress-cancel-button");n==o.a.ClassGymStrength||n==o.a.ClassGymDefense||n==o.a.ClassGymDexterity||n==o.a.ClassGymAgility?m.innerHTML="Stop training at gym":m.innerHTML="Stop taking course",m.addEventListener("click",function(){return R.finishClass(),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.takeClass=function(e){this.timeWorked+=u.Engine._idleSpeed*e;var t=this.className;this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e,this.workMoneyGained-=this.workMoneyLossRate*e;var n=1e3/u.Engine._idleSpeed;document.getElementById("work-in-progress-text").innerHTML="You have been "+t+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

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

You have gained:
"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*n,4)+" / sec) hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" ("+Object(w.formatNumber)(this.workStrExpGainRate*n,4)+" / sec) strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" ("+Object(w.formatNumber)(this.workDefExpGainRate*n,4)+" / sec) defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" ("+Object(w.formatNumber)(this.workDexExpGainRate*n,4)+" / sec) dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" ("+Object(w.formatNumber)(this.workAgiExpGainRate*n,4)+" / sec) agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*n,4)+" / sec) charisma exp
You may cancel at any time"},S.prototype.finishClass=function(e=!1){if(this.gainWorkExp(),this.gainIntelligenceExp(o.a.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");this.loseMoney(-1*this.workMoneyGained),this.updateSkillLevels();var t="After "+this.className+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+",
you spent a total of $"+Object(w.formatNumber)(-1*this.workMoneyGained,2)+".

You earned a total of:
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp
";if(e||Object(v.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),e){var n="After "+this.className+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of $"+Object(w.formatNumber)(-1*this.workMoneyGained,2)+". You earned a total of: "+Object(w.formatNumber)(this.workHackExpGained,3)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,3)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},S.prototype.startCrime=function(e,t,n,a,r,s,l,c,d=null){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCrime,d&&d.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=d.workerscript),this.workHackExpGained=e*this.hacking_exp_mult*i.a.CrimeExpGain,this.workStrExpGained=t*this.strength_exp_mult*i.a.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*i.a.CrimeExpGain,this.workDexExpGained=a*this.dexterity_exp_mult*i.a.CrimeExpGain,this.workAgiExpGained=r*this.agility_exp_mult*i.a.CrimeExpGain,this.workChaExpGained=s*this.charisma_exp_mult*i.a.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*i.a.CrimeMoney,this.timeNeededToCompleteWork=c;var h=Object(_.clearEventListeners)("work-in-progress-cancel-button");h.innerHTML="Cancel crime",h.addEventListener("click",function(){return R.finishCrime(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.commitCrime=function(e){if(this.timeWorked+=u.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+".
Time remaining: "+Object(w.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+a.replace(/ /g," ")}},S.prototype.finishCrime=function(e){if(!e){if(Object(c.b)(this.crimeType,this.workMoneyGained)){let e=null;for(const t in c.a)if(c.a[t].type==this.crimeType){e=c.a[t];break}null==e&&(console.log(this.crimeType),Object(v.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer")),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 "+C()(this.workMoneyGained).format("$0.000a")+", "+Object(w.formatNumber)(this.workHackExpGained,3)+" hack exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agi exp, "+Object(w.formatNumber)(this.workChaExpGained,3)+" cha exp."):Object(v.dialogBoxCreate)("Crime successful!

You gained:
$"+Object(w.formatNumber)(this.workMoneyGained,2)+"
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking experience
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength experience
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense experience
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity experience
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility experience
"+Object(w.formatNumber)(this.workChaExpGained,4)+" 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 "+Object(w.formatNumber)(this.workHackExpGained,3)+" hack exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agi exp, "+Object(w.formatNumber)(this.workChaExpGained,3)+" cha exp."):Object(v.dialogBoxCreate)("Crime failed!

You gained:
"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking experience
"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength experience
"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense experience
"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity experience
"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility experience
"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma experience");this.gainWorkExp()}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),u.Engine.loadLocationContent()},S.prototype.singularityStopWork=function(){if(!this.isWorking)return"";var e;switch(this.workType){case o.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case o.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case o.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case o.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case o.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0,!0);break;case o.a.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.log("ERROR: Unrecognized work type"),""}return e},S.prototype.takeDamage=function(e){return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0)},S.prototype.hospitalize=function(){Object(v.dialogBoxCreate)("You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged $"+Object(w.formatNumber)(this.max_hp*o.a.HospitalCostPerHp,2)),this.loseMoney(this.max_hp*o.a.HospitalCostPerHp),this.hp=this.max_hp},S.prototype.applyForJob=function(e,t=!1){var n="";""!=this.companyName&&(n=r.a[this.companyName]);var a="";""!=this.companyPosition&&(a=this.companyPosition.positionName);var i=r.a[this.location];if(t&&!(i instanceof r.b))return"ERROR: Invalid company name: "+this.location+". applyToCompany() failed";var o=e;if(!this.isQualified(i,o)){var s=Object(r.f)(i,o);return!t&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position
"+s)}for(;;){u.Engine.Debug&&console.log("Determining qualification for next Company Position");var l=Object(r.g)(o);if(null==l)break;if(!i.hasPosition(l))break;if(!this.isQualified(i,l))break;o=l}if(""==n||n.companyName!=i.companyName||o.positionName!=a){var c=!1,d="";if(""!=n&&n.companyName!=i.companyName&&(c=!0,d=n.companyName,i.playerReputation-=1e3,i.playerReputation<0&&(i.playerReputation=0)),this.companyName=i.companyName,this.companyPosition=o,!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),c){if(t)return!0;Object(v.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+o.positionName+"!
You lost 1000 reputation at your old company "+d+" because you left.")}else{if(t)return!0;Object(v.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+o.positionName+"!")}u.Engine.loadLocationContent()}else{var h=Object(r.g)(o);if(null==h){if(t)return!1;Object(v.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(i.hasPosition(h)){if(t)return!1;s=Object(r.f)(i,h);Object(v.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion
"+s)}else{if(t)return!1;Object(v.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}},S.prototype.getNextCompanyPosition=function(e,t){var n=null;return""!=this.companyName&&(n=r.a[this.companyName]),null==n||n.companyName!=e.companyName?t:this.companyPosition.isSoftwareJob()&&t.isSoftwareJob()||this.companyPosition.isITJob()&&t.isITJob()||this.companyPosition.isBusinessJob()&&t.isBusinessJob()||this.companyPosition.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||this.companyPosition.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||this.companyPosition.isSecurityJob()&&t.isSecurityJob()||this.companyPosition.isAgentJob()&&t.isAgentJob()||this.companyPosition.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||this.companyPosition.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||this.companyPosition.isPartTimeJob()&&t.isPartTimeJob()?Object(r.g)(this.companyPosition):t},S.prototype.applyForSoftwareJob=function(e=!1){return this.applyForJob(r.d.SoftwareIntern,e)},S.prototype.applyForSoftwareConsultantJob=function(e=!1){return this.applyForJob(r.d.SoftwareConsultant,e)},S.prototype.applyForItJob=function(e=!1){return this.applyForJob(r.d.ITIntern,e)},S.prototype.applyForSecurityEngineerJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.SecurityEngineer)?this.applyForJob(r.d.SecurityEngineer,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForNetworkEngineerJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.NetworkEngineer)?this.applyForJob(r.d.NetworkEngineer,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForBusinessJob=function(e=!1){return this.applyForJob(r.d.BusinessIntern,e)},S.prototype.applyForBusinessConsultantJob=function(e=!1){return this.applyForJob(r.d.BusinessConsultant,e)},S.prototype.applyForSecurityJob=function(e=!1){return this.applyForJob(r.d.SecurityGuard,e)},S.prototype.applyForAgentJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.FieldAgent)?this.applyForJob(r.d.FieldAgent,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForEmployeeJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.Employee)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.Employee,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForPartTimeEmployeeJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.PartTimeEmployee)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.PartTimeEmployee,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForWaiterJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.Waiter)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.Waiter,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForPartTimeWaiterJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.PartTimeWaiter)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.PartTimeWaiter,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.isQualified=function(e,t){var n=e.jobStatReqOffset,a=t.requiredHacking>0?t.requiredHacking+n:0,i=t.requiredStrength>0?t.requiredStrength+n:0,r=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>=i&&this.defense>=r&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation},S.prototype.reapplyAllAugmentations=function(e=!0){console.log("Re-applying augmentations"),e&&this.resetMultipliers();for(let e=0;e=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 s=d.b.Daedalus;!s.isBanned&&!s.isMember&&!s.alreadyInvited&&t>=30&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(s);var l=d.b["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=30&&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=d.b.ECorp;!c.isBanned&&!c.isMember&&!c.alreadyInvited&&this.companyName==p.a.AevumECorp&&a>=o.a.CorpFactionRepRequirement&&e.push(c);var u=d.b.MegaCorp;!u.isBanned&&!u.isMember&&!u.alreadyInvited&&this.companyName==p.a.Sector12MegaCorp&&a>=o.a.CorpFactionRepRequirement&&e.push(u);var h=d.b["Bachman & Associates"];!h.isBanned&&!h.isMember&&!h.alreadyInvited&&this.companyName==p.a.AevumBachmanAndAssociates&&a>=o.a.CorpFactionRepRequirement&&e.push(h);var m=d.b["Blade Industries"];!m.isBanned&&!m.isMember&&!m.alreadyInvited&&this.companyName==p.a.Sector12BladeIndustries&&a>=o.a.CorpFactionRepRequirement&&e.push(m);var f=d.b.NWO;!f.isBanned&&!f.isMember&&!f.alreadyInvited&&this.companyName==p.a.VolhavenNWO&&a>=o.a.CorpFactionRepRequirement&&e.push(f);var b=d.b["Clarke Incorporated"];!b.isBanned&&!b.isMember&&!b.alreadyInvited&&this.companyName==p.a.AevumClarkeIncorporated&&a>=o.a.CorpFactionRepRequirement&&e.push(b);var v=d.b["OmniTek Incorporated"];!v.isBanned&&!v.isMember&&!v.alreadyInvited&&this.companyName==p.a.VolhavenOmniTekIncorporated&&a>=o.a.CorpFactionRepRequirement&&e.push(v);var _=d.b["Four Sigma"];!_.isBanned&&!_.isMember&&!_.alreadyInvited&&this.companyName==p.a.Sector12FourSigma&&a>=o.a.CorpFactionRepRequirement&&e.push(_);var k=d.b["KuaiGong International"];!k.isBanned&&!k.isMember&&!k.alreadyInvited&&this.companyName==p.a.ChongqingKuaiGongInternational&&a>=o.a.CorpFactionRepRequirement&&e.push(k);var E=d.b["Fulcrum Secret Technologies"],O=g.b[y.a[y.b.FulcrumSecretTechnologies]];null==O?console.log("ERROR: Could not find Fulcrum Secret Technologies Server"):!E.isBanned&&!E.isMember&&!E.alreadyInvited&&O.manuallyHacked&&this.companyName==p.a.AevumFulcrumTechnologies&&a>=25e4&&e.push(E);var C=d.b.BitRunners,w=this.getHomeComputer(),S=g.b[y.a[y.b.BitRunnersServer]];null==S?console.log("ERROR: Could not find BitRunners Server"):!C.isBanned&&!C.isMember&&S.manuallyHacked&&!C.alreadyInvited&&this.hacking_skill>=500&&w.maxRam>=128&&e.push(C);var T=d.b["The Black Hand"],R=g.b[y.a[y.b.TheBlackHandServer]];null==R?console.log("ERROR: Could not find The Black Hand Server"):!T.isBanned&&!T.isMember&&R.manuallyHacked&&!T.alreadyInvited&&this.hacking_skill>=350&&w.maxRam>=64&&e.push(T);var x=d.b.NiteSec,I=g.b[y.a[y.b.NiteSecServer]];null==I?console.log("ERROR: Could not find NiteSec Server"):!x.isBanned&&!x.isMember&&I.manuallyHacked&&!x.alreadyInvited&&this.hacking_skill>=200&&w.maxRam>=32&&e.push(x);var P=d.b.Chongqing;P.isBanned||P.isMember||P.alreadyInvited||!this.money.gte(2e7)||this.city!=p.a.Chongqing||e.push(P);var N=d.b["Sector-12"];N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(15e6)||this.city!=p.a.Sector12||e.push(N);var A=d.b["New Tokyo"];A.isBanned||A.isMember||A.alreadyInvited||!this.money.gte(2e7)||this.city!=p.a.NewTokyo||e.push(A);var M=d.b.Aevum;M.isBanned||M.isMember||M.alreadyInvited||!this.money.gte(4e7)||this.city!=p.a.Aevum||e.push(M);var L=d.b.Ishima;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(3e7)||this.city!=p.a.Ishima||e.push(L);var B=d.b.Volhaven;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(5e7)||this.city!=p.a.Volhaven||e.push(B);var j=d.b["Speakers for the Dead"];!j.isBanned&&!j.isMember&&!j.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(j);var D=d.b["The Dark Army"];!D.isBanned&&!D.isMember&&!D.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==p.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(D);var F=d.b["The Syndicate"];!F.isBanned&&!F.isMember&&!F.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==p.a.Aevum||this.city==p.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(F);var H=d.b.Silhouette;H.isBanned||H.isMember||H.alreadyInvited||this.companyPosition.positionName!=r.d.CTO.positionName&&this.companyPosition.positionName!=r.d.CFO.positionName&&this.companyPosition.positionName!=r.d.CEO.positionName||!this.money.gte(15e6)||!(this.karma<=-22)||e.push(H);var W=d.b.Tetrads;!W.isBanned&&!W.isMember&&!W.alreadyInvited&&(this.city==p.a.Chongqing||this.city==p.a.NewTokyo||this.city==p.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(W);var G=d.b["Slum Snakes"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(G);for(var U=d.b.Netburners,q=0,K=0,V=0,Y=0;Y=80&&q>=8&&K>=4&&V>=100&&e.push(U);var z=d.b["Tian Di Hui"];z.isBanned||z.isMember||z.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=p.a.Chongqing&&this.city!=p.a.NewTokyo&&this.city!=p.a.Ishima||e.push(z);var J=d.b.CyberSec,$=g.b[y.a[y.b.CyberSecServer]];return null==$?console.log("ERROR: Could not find CyberSec Server"):!J.isBanned&&!J.isMember&&$.manuallyHacked&&!J.alreadyInvited&&this.hacking_skill>=50&&e.push(J),e},S.prototype.inGang=function(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof h.b},S.prototype.startGang=function(e,t){this.gang=new h.b(e,t)},S.prototype.setBitNodeNumber=function(e){this.bitNodeN=e},S.prototype.queueAugmentation=function(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.log("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.log("tried to queue "+e+" but we already have that aug");this.firstAugPurchased=!0,this.queuedAugmentations.push(new a.d(e))},S.prototype.toJSON=function(){return Object(E.Generic_toJSON)("PlayerObject",this)},S.fromJSON=function(e){return Object(E.Generic_fromJSON)(S,e.data)},E.Reviver.constructors.PlayerObject=S;let R=new S},function(e,t,n){"use strict";n.d(t,"a",function(){return a});let a={Version:"0.40.1",MaxSkillLevel:975,CorpFactionRepRequirement:2e5,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,BaseCostFor1GBOfRamHacknetNode:3e4,TravelCost:2e5,BaseCostForHacknetNode:1e3,BaseCostForHacknetNodeCore:5e5,HacknetNodeMoneyGainPerLevel:1.6,HacknetNodePurchaseNextMult:1.85,HacknetNodeUpgradeLevelMult:1.04,HacknetNodeUpgradeRamMult:1.28,HacknetNodeUpgradeCoreMult:1.48,HacknetNodeMaxLevel:200,HacknetNodeMaxRam:64,HacknetNodeMaxCores:16,BaseFavorToDonate:150,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,ScriptBaseRamCost:1.6,ScriptDomRamCost:100,ScriptWhileRamCost:0,ScriptForRamCost:0,ScriptIfRamCost:0,ScriptHackRamCost:.1,ScriptGrowRamCost:.15,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,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,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptSingularityFn1RamCost:1,ScriptSingularityFn2RamCost:2,ScriptSingularityFn3RamCost:3,ScriptBladeburnerApiBaseRamCost:4,NumNetscriptPorts:20,ServerBaseGrowthRate:1.03,ServerMaxGrowthRate:1.0035,ServerFortifyAmount:.002,ServerWeakenAmount:.05,PurchasedServerLimit:25,PurchasedServerMaxRam:1048576,AugmentationCostMultiplier:5,AugmentationRepMultiplier:2.5,MultipleAugMultiplier:1.9,TorRouterCost:2e5,InfiltrationBribeBaseAmount:1e5,InfiltrationMoneyValue:5e3,InfiltrationRepValue:1.4,WSEAccountCost:2e8,TIXAPICost:5e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.05,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.001,IntelligenceProgramBaseExpGain:500,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:.002,IntelligenceClassBaseExpGain:1e-6,IntelligenceHackingMissionBaseExpGain:.03,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.

In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.

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

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

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

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

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

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

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

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

There are six different types of Nodes:

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

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

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

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

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

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

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

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

Other Notes:

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

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

-Miscellaneous Nodes slowly raise their defense over time

-Nodes slowly regenerate health over time.",GangRespectToReputationRatio:2,MaximumGangMembers:20,GangRecruitCostMultiplier:2,GangTerritoryUpdateTimer:150,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,CrimeSingFnDivider:2,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",TutorialNetworkingText:"Servers are a central part of the game. You start with a single personal server (your home computer) and you can purchase additional servers as you progress through the game. Connecting to other servers and hacking them can be a major source of income and experience. Servers can also be used to run scripts which can automatically hack servers for you.

In order to navigate between machines, use the 'scan' or 'scan-analyze' Terminal command to see all servers that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' command to connect to one of the available machines.

The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the server you are currently connected to.",TutorialHackingText:"In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers. By hacking these servers, you can steal their money and gain experience.

Gaining root access


The key to hacking a server is to gain root access to that server. This can be done using the NUKE virus (NUKE.exe). You start the game with a copy of the NUKE virus on your home computer. The NUKE virus attacks the target server's open ports using buffer overflow exploits. When successful, you are granted root administrative access to the machine.

Typically, in order for the NUKE virus to succeed, the target server needs to have at least one of its ports opened. Some servers have no security and will not need any ports opened. Some will have very high security and will need many ports opened. In order to open ports on another server, you will need to run programs that attack the server to open specific ports. These programs can be coded once your hacking skill gets high enough, or they can be purchased if you can find a seller.

In order to determine how many ports need to be opened to successfully NUKE a server, connect to that server and run the 'analyze' command. This will also show you which ports have already been opened.

Once you have enough ports opened and have ran the NUKE virus to gain root access, the server can then be hacked by simply calling the 'hack' command through terminal, or by using a script.

Hacking mechanics


When you execute the hack command, either manually through the terminal or automatically through a script, you attempt to hack the server. This action takes time. The more advanced a server's security is, the more time it will take. Your hacking skill level also affects the hacking time, with a higher hacking skill leading to shorter hacking times. Also, running the hack command manually through terminal is faster than hacking from a script.

Your attempt to hack a server will not always succeed. The chance you have to successfully hack a server is also determined by the server's security and your hacking skill level. Even if your hacking attempt is unsuccessful, you will still gain experience points.

When you successfully hack a server. You steal a certain percentage of that server's total money. This percentage is determined by the server's security and your hacking skill level. The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking (since you are only hacking a certain percentage). You can increase the amount of money on a server using a script and the grow() function in Netscript.

Server Security


Each server has a security level, typically between 1 and 100. A higher number means the server has stronger security. It is possible for a server to have a security level of 100 or higher, in which case hacking that server will become impossible (0% chance to hack).

As mentioned above, a server's security level is an important factor to consider when hacking. You can check a server's security level using the 'analyze' command, although this only gives an estimate (with 5% uncertainty). You can also check a server's security in a script, using the getServerSecurityLevel(server) function in Netscript. See the Netscript documentation for more details. This function will give you an exact value for a server's security.

Whenever a server is hacked manually or through a script, its security level increases by a small amount. Calling the grow() command in a script will also increase security level of the target server. These actions will make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a server's security level in a script using the weaken(server) function in Netscript. See the Netscript documentation for more details.

A server has a minimum security level that is equal to one third of its starting security, rounded to the nearest integer. To be more precise:

server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))

This means that a server's security will not fall below this value if you are trying to weaken it.",TutorialScriptsText:"Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. Documentation about the Netscript language can be found in the 'Netscript Programming Language' section of this 'Tutorial' page.

It is highly recommended that you have a basic background in programming to start writing scripts. You by no means need to be an expert. All you need is some familiarity with basic programming constructs like for/while loops, if statements, functions, variables, etc. The Netscript programming language most resembles the Javascript language. Therefore, a good beginner's programming tutorial to read might be this one. Note that while the Netscript language is similar to Javascript, it is not the exact same, so the syntax will vary a little bit.

Running a script requires RAM. The more complex a script is, the more RAM it requires to run. Scripts can be run on any server you have root access to.

Here are some Terminal commands that are useful when working with scripts:

check [script] [args...]
Prints the logs of the script specified by the name and arguments to Terminal. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'check' it you must also add the 'foodnstuff' argument to the check command as so:
check foo.script foodnstuff

free
Shows the current server's RAM usage and availability

kill [script] [args...]
Stops a script that is running with the specified script name and arguments. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 1 and 2, then just typing 'kill foo.script' will not work. You have to use 'kill foo.script 1 2'.

mem [script] [-t] [n]
Check how much RAM a script requires to run with n threads

nano [script]
Create/Edit a script. The name of the script must end with the '.script' extension

ps
Displays all scripts that are actively running on the current server

rm [script]
Delete a script

run [script] [-t] [n] [args...]
Run a script with n threads and the specified arguments. Each argument should be separated by a space. Both the arguments and thread specification are optional. If neither are specified, then the script will be run single-threaded with no arguments.
Examples:
run foo.script
The command above will run 'foo.script' single-threaded with no arguments.
run foo.script -t 10
The command above will run 'foo.script' with 10 threads and no arguments.
run foo.script foodnstuff sigma-cosmetics 10
The command above will run 'foo.script' single-threaded with three arguments: [foodnstuff, sigma-cosmetics, 10]
run foo.script -t 50 foodnstuff
The command above will run 'foo.script' with 50 threads and a single argument: [foodnstuff]

tail [script] [args...]
Displays the logs of the script specified by the name and arguments. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'tail' it you must also add the 'foodnstuff' argument to the tail command as so:
tail foo.script foodnstuff

top
Displays all active scripts and their RAM usage

Multithreading scripts


Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of threads. For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would yield $50,000.

When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script with the number of threads, where the base cost refers to the amount of RAM required to run the script single-threaded. In the terminal, you can run the 'mem [scriptname] -t n' command to see how much RAM a script requires with n threads.

Every method for running a script has an option for making it multihreaded. To run a script with n threads from a Terminal:
run [scriptname] -t n

Using Netscript commands:
run('scriptname.script', n);
exec('scriptname.script, 'targetServer', n);

Notes about how scripts work offline


The scripts that you write and execute are interpreted in Javascript. For this reason, it is not possible for these scripts to run while offline (when the game is closed). It is important to note that for this reason, conditionals such as if/else statements and certain commands such as purchaseHacknetNode() or nuke() will not work while the game is offline.

However, Scripts WILL continue to generate money and hacking exp for you while the game is offline. This offline production is based off of the scripts' production while the game is online.

grow() and weaken() are two Netscript commands that will also be applied when the game is offline, although at a slower rate compared to if the game was open. This is done by having each script keep track of the rate at which the grow() and weaken() commands are called when the game is online. These calculated rates are used to determine how many times these function calls would be made while the game is offline.

Also, note that because of the way the Netscript interpreter is implemented, whenever you reload or re-open the game all of the scripts that you are running will start running from the BEGINNING of the code. The game does not keep track of where exactly the execution of a script is when it saves/loads.


",TutorialNetscriptText:"Netscript is a programming language implemented for this game. There are two versions of Netscript: Netscript 1.0 and Netscript 2.0 (NetscriptJS).

Click here for Bitburner's official Netscript documentation",TutorialTravelingText:"There are six major cities in the world that you are able to travel to:

Aevum
Chongqing
Sector-12
New Tokyo
Ishima
Volhaven

To travel between cities, visit your current city's travel agency through the 'World' page. From the travel agency you can travel to any other city. Doing so costs money.

Each city has its own set of companies and unique locations. Also, certain content is only available to you if you are in certain cities, so get exploring!",TutorialCompaniesText:"Hacking is not the only way to gain money and experience! Located around the world are many different companies which you can work for. By working for a company you can earn money, train your various labor skills, and unlock powerful passive perks.

To apply for a job, visit the company you want to work for through the 'World' menu. The company page will have options that let you apply to positions in the company. There might be several different positions you can apply for, ranging from software engineer to business analyst to security officer.

When you apply for a job, you will get the offer if your stats are high enough. Your first position at a company will be an entry-level position such as 'intern'. Once you get the job, an button will appear on the company page that allows you to work for the company. Click this button to start working.

Working occurs in 8 hour shifts. Once you start working, you will begin earning money, experience, and reputation. The rate at which you money and experience depends on the company and your position. The amount of reputation you gain for your company is based on your job performance, which is affected by your stats. Different positions value different stats. When you are working, you are unable to perform any other actions such as using your terminal or visiting other locations (However, note that any scripts you have running on servers will continue to run as you work!). It is possible to cancel your work shift before the 8 hours is up. However, if you have a full-time job, then cancelling a shift early will result in you gaining only half of the reputation that you had earned up to that point. There are also part-time/consultant jobs available where you will not be penalized if you cancel a work shift early. However, these positions pay less than full-time positions.

As you continue to work at a company, you will gain more and more reputation at that company. When your stats and reputation are high enough, you can get a promotion. You can apply for a promotion on the company page, just like you applied for the job originally. Higher positions at a company provide better salaries and stat gains.

Infiltrating Companies


Many companies have facilities that you can attempt to infiltrate. By infiltrating, you can steal classified company secrets and then sell these for money or for faction reputation. To try and infiltrate a company, visit a company through the 'World' menu. There will be an option that says 'Infiltrate Company'.

When infiltrating a company, you must progress through clearance levels in the facility. Every clearance level has some form of security that you must get past. There are several forms of security, ranging from high-tech security systems to armed guards. For each form of security, there are a variety of options that you can choose to try and bypass the security. Examples include hacking the security, engaging in combat, assassination, or sneaking past the security. The chance to succeed for each option is determined in part by your stats. So, for example, trying to hack the security system relies on your hacking skill, whereas trying to sneak past the security relies on your agility level.

The facility has a 'security level' that affects your chance of success when trying to get past a clearance level. Every time you advance to the next clearance level, the facility's security level will increase by a fixed amount. Furthermore the options you choose and whether you succeed or fail will affect the security level as well. For example, if you try to kill a security guard and fail, the security level will increase by a lot. If you choose to sneak past security and succeed, the security level will not increase at all.

Every 5 clearance levels, you will steal classified company secrets that can be sold for money or faction reputation. However, in order to sell these secrets you must successfully escape the facility using the 'Escape' option. Furthermore, companies have a max clearance level. If you reach the max clearance level you will automatically escape the facility with all of your stolen secrets.

",TutorialFactionsText:"Throughout the game you may receive invitations from factions. There are many different factions, and each faction has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial to progressing in the game and unlocking endgame content.

It is possible to join multiple factions if you receive invitations from them. However, note that joining a faction may prevent you from joining other rival factions.

The 'Factions' link on the menu brings up a list of all factions that you have joined. You can select a Faction on this list to go to that Faction page. This page displays general information about the Faction and also lets you perform work for the faction. Working for a Faction is similar to working for a company except that you don't get paid a salary. You will only earn reputation in your Faction and train your stats. Also, cancelling work early when working for a Faction does NOT result in reduced experience/reputation earnings.

Earning reputation for a Faction unlocks powerful Augmentations. Purchasing and installing these Augmentations will upgrade your abilities. The Augmentations that are available to unlock vary from faction to faction.",TutorialAugmentationsText:"Advances in science and medicine have lead to powerful new technologies that allow people to augment themselves beyond normal human capabilities. There are many different types of Augmentations, ranging from cybernetic to genetic to biological. Acquiring these Augmentations enhances the user's physical and mental faculties.

Because of how powerful these Augmentations are, the technology behind them is kept private and secret by the corporations and organizations that create them. Therefore, the only way for the player to obtain Augmentations is through Factions. After joining a Faction and earning enough reputation in it, you will be able to purchase its Augmentations. Different Factions offer different Augmentations. Augmentations must be purchased in order to be installed, and they are fairly expensive.

When you purchase an Augmentation, the price of purchasing another Augmentation increases by 90%. This multiplier stacks for each Augmentation you purchase. You will not gain the benefits of your purchased Augmentations until you install them. You can choose to install Augmentations through the 'Augmentations' menu tab. Once you install your purchased Augmentations, their costs are reset back to the original price.

Unfortunately, installing Augmentations has side effects. You will lose most of the progress you've made, including your skills, stats, and money. You will have to start over, but you will have all of the Augmentations you have installed to help you progress.

To summarize, here is a list of everything you will LOSE when you install an Augmentation:

Stats/Skills
Money
Scripts on all servers EXCEPT your home computer
Purchased servers
Hacknet Nodes
Company/faction reputation
Jobs and Faction memberships
Programs
Stocks
TOR router

Here is everything you will KEEP when you install an Augmentation:

Every Augmentation you have installed
Scripts on your home computer
RAM and CPU Core Upgrades on your home computer
World Stock Exchange account and TIX API Access
",LatestUpdate:"v0.40.1 - Community Update
* Added getPurchasedServerCost() Netscript function (by kopelli)
* Added getFavorToDonate() Netscript function (by hydroflame)
* Added getFactionFavorGain() and getCompanyFavorGain() Singularity functions (by hydroflame)
* Accumulated 'bonus' time in Bladeburner is now displayed in the UI (by hydroflame)
* The Red Pill can now be purchased with negative money (since its supposed to be free) (by hydroflame)
* Cranial Signal Processor Augmentations now have the previous generation as a prerequisite. i.e. Cranial Signal Processor - Gen II requires Gen I (by Kline-)
* Terminal now supports semicolon usage (end of command). This allows chaining multiple Terminal commands (by hydroflame)
* Bladeburner Raid operations can no longer be performed if your estimate of Synthoid communities is zero (by hydroflame)
* The difficulty of BN-12 now scales faster (by hydroflame)
* Active Scripts UI now shows a RAM Usage bar for each server (by kopelli)
* Bug Fix: Corrected terminal timestamp format (by kopelli)
* Bug Fix: NetscriptJS scripts should now die properly if they don't have a 'main' function (by hydroflame)
* Bug Fix: write(), read(), and tryWrite() Netscript functions should now work properly for writing Arrays/objects to Netscript Ports
* Various minor UI/QOL fixes by hydroflame, kopelli, and Kline-"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(32);function i(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){const t=Math.floor(e/1e3),n=Math.floor(t/86400),a=t%86400,i=Math.floor(a/3600),r=a%3600,o=Math.floor(r/60);let s="";return n>0&&(s+=`${n} days `),i>0&&(s+=`${i} hours `),o>0&&(s+=`${o} minutes `),s+=`${r%60} seconds `},t.longestCommonStart=function(e){if(!i(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],a=t[t.length-1],r=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;aYou will earn "+Object(k.formatNumber)(Be,0)+" faction favor upon resetting after installing an Augmentation
",j.innerHTML="Company Favor: "+Object(k.formatNumber)(Le.favor,0)+"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 an Augmentation. The amount of favor you gain depends on how much reputation you have with the company",M.style.display="block";var je=d.a.companyPosition;M.addEventListener("click",function(){return je.isPartTimeJob()?d.a.startWorkPartTime():d.a.startWork(),!1}),je.isSoftwareJob()?c.innerHTML="Apply for a promotion (Software)":je.isSoftwareConsultantJob()?h.innerHTML="Apply for a promotion (Software Consultant)":je.isITJob()?p.innerHTML="Apply for a promotion (IT)":je.isSecurityEngineerJob()?m.innerHTML="Apply for a promotion (Security Engineer)":je.isNetworkEngineerJob()?y.innerHTML="Apply for a promotion (Network Engineer)":je.isBusinessJob()?b.innerHTML="Apply for a promotion (Business)":je.isBusinessConsultantJob()?v.innerHTML="Apply for a promotion (Business Consultant)":je.isSecurityJob()?_.innerHTML="Apply for a promotion (Security)":je.isAgentJob()&&(E.innerHTML="Apply for a promotion (Agent)")}else L.style.display="none",B.style.display="none",j.style.display="none",D.style.display="none",F.style.display="none",H.style.display="none";d.a.hp<0&&(d.a.hp=0);var De=(d.a.max_hp-d.a.hp)*o.a.HospitalCostPerHp;switch(N(Me,i.d.SoftwareIntern,c),N(Me,i.d.SoftwareConsultant,h),N(Me,i.d.ITIntern,p),N(Me,i.d.SecurityEngineer,m),N(Me,i.d.NetworkEngineer,y),N(Me,i.d.BusinessIntern,b),N(Me,i.d.BusinessConsultant,v),N(Me,i.d.SecurityGuard,_),N(Me,i.d.FieldAgent,E),N(Me,i.d.Employee,C),N(Me,i.d.PartTimeEmployee,w),N(Me,i.d.Waiter,S),N(Me,i.d.PartTimeWaiter,A),Me){case O.AevumTravelAgency:ue.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.AevumSummitUniversity:var Fe=3;T(He=4),R(He,Fe);break;case O.AevumECorp:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumECorp,4800,116,150,6);break;case O.AevumBachmanAndAssociates:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.AevumBachmanAndAssociates,1350,42,60,4.1);break;case O.AevumClarkeIncorporated:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.AevumClarkeIncorporated,1800,34,75,3.6);break;case O.AevumFulcrumTechnologies:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumFulcrumTechnologies,4140,96,100,6.2);break;case O.AevumAeroCorp:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.AevumAeroCorp,1350,32,50,4.4);break;case O.AevumGalacticCybersystems:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.AevumGalacticCybersystems,1260,30,50,3.95);break;case O.AevumWatchdogSecurity:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.AevumWatchdogSecurity,690,20,30,3);break;case O.AevumRhoConstruction:n.innerHTML=i.a[Me].info,c.style.display="block",b.style.display="block",P(fe,O.AevumRhoConstruction,485,16,20,1.9);break;case O.AevumPolice:n.innerHTML=i.a[Me].info,c.style.display="block",_.style.display="block",P(fe,O.AevumPolice,565,18,25,2.2);break;case O.AevumNetLinkTechnologies:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",X.style.display="block",Q.style.display="block",Z.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumNetLinkTechnologies,144,10,25,1.4);break;case O.AevumCrushFitnessGym:Fe=2;x(He=3),I(He,Fe);break;case O.AevumSnapFitnessGym:Fe=5;x(He=10),I(He,Fe);break;case O.ChongqingTravelAgency:ue.style.display="block",de.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.ChongqingKuaiGongInternational:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.ChongqingKuaiGongInternational,4450,100,100,6.1);break;case O.ChongqingSolarisSpaceSystems:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.ChongqingSolarisSpaceSystems,2915,52,75,6);break;case O.Sector12TravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.Sector12RothmanUniversity:Fe=2;T(He=3),R(He,Fe);break;case O.Sector12MegaCorp:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12MegaCorp,4500,114,125,6.75);break;case O.Sector12BladeIndustries:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12BladeIndustries,2160,46,100,4.2);break;case O.Sector12FourSigma:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12FourSigma,1350,58,100,7);break;case O.Sector12IcarusMicrosystems:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.Sector12IcarusMicrosystems,730,32,70,5.4);break;case O.Sector12UniversalEnergy:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.Sector12UniversalEnergy,700,24,50,4.3);break;case O.Sector12DeltaOne:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.Sector12DeltaOne,970,38,75,4.5);break;case O.Sector12CIA:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.Sector12CIA,1170,44,80,4.6);break;case O.Sector12NSA:if(n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",6===d.a.bitNodeN||!0===u.c){if(8===d.a.bitNodeN)break;d.a.bladeburner instanceof a.a?Ae.innerText="Enter Bladeburner Headquarters":(P(fe,O.Sector12NSA,1135,40,80,5),Ae.innerText="Apply to Bladeburner Division"),Ae.style.display="block"}else P(fe,O.Sector12NSA,1135,40,80,5);break;case O.Sector12AlphaEnterprises:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",b.style.display="block",X.style.display="block",Q.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.Sector12AlphaEnterprises,200,14,40,2.25);break;case O.Sector12CarmichaelSecurity:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.Sector12CarmichaelSecurity,405,18,60,2.5);break;case O.Sector12FoodNStuff:n.innerHTML=i.a[Me].info,C.style.display="block",w.style.display="block";break;case O.Sector12JoesGuns:n.innerHTML=i.a[Me].info,C.style.display="block",w.style.display="block",P(fe,O.Sector12JoesGuns,120,8,20,1.8);break;case O.Sector12IronGym:Fe=1;x(He=1),I(He,Fe);break;case O.Sector12PowerhouseGym:Fe=10;x(He=20),I(He,Fe);break;case O.Sector12CityHall:Ne.style.display="block",d.a.corporation instanceof r.a?Ne.className="a-link-button-inactive":Ne.className="a-link-button";break;case O.NewTokyoTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.NewTokyoDefComm:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.NewTokyoDefComm,1050,28,70,4);break;case O.NewTokyoVitaLife:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.NewTokyoVitaLife,605,22,100,3.5);break;case O.NewTokyoGlobalPharmaceuticals:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.NewTokyoGlobalPharmaceuticals,700,24,80,3.8);break;case O.NewTokyoNoodleBar:n.innerHTML=i.a[Me].info,S.style.display="block",A.style.display="block";break;case O.IshimaTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ye.style.display="block";break;case O.IshimaStormTechnologies:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="none",E.style.display="none",C.style.display="none",S.style.display="none",te.style.display="block",ne.style.display="block",ae.style.display="block",ie.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.IshimaStormTechnologies,570,24,100,4.1);break;case O.IshimaNovaMedical:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.IshimaNovaMedical,485,20,50,3.2);break;case O.IshimaOmegaSoftware:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",b.style.display="block",Q.style.display="block",Z.style.display="block",ee.style.display="block",te.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.IshimaOmegaSoftware,130,10,40,1.6);break;case O.VolhavenTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block";break;case O.VolhavenZBInstituteOfTechnology:Fe=4;T(He=5),R(He,Fe);break;case O.VolhavenOmniTekIncorporated:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",P(fe,O.VolhavenOmniTekIncorporated,1215,44,100,4.4);break;case O.VolhavenNWO:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.VolhavenNWO,1460,56,200,6.8);break;case O.VolhavenHeliosLabs:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.VolhavenHeliosLabs,1080,28,75,3);break;case O.VolhavenOmniaCybersystems:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.VolhavenOmniaCybersystems,725,28,90,4.9);break;case O.VolhavenLexoCorp:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.VolhavenLexoCorp,340,14,60,2);break;case O.VolhavenSysCoreSecurities:n.innerHTML=i.a[Me].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.VolhavenSysCoreSecurities,430,18,75,2.4);break;case O.VolhavenCompuTek:n.innerHTML=i.a[Me].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",Z.style.display="block",ee.style.display="block",te.style.display="block",ne.style.display="block",ae.style.display="block",ie.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.VolhavenCompuTek,195,12,60,2.1);break;case O.VolhavenMilleniumFitnessGym:var He;Fe=4;x(He=7),I(He,Fe);break;case O.AevumSlums:case O.ChongqingSlums:case O.Sector12Slums:case O.NewTokyoSlums:case O.IshimaSlums:case O.VolhavenSlums:var We=s.a.Shoplift.successRate(),Ge=s.a.RobStore.successRate(),Ue=s.a.Mug.successRate(),qe=s.a.Larceny.successRate(),Ke=s.a.DealDrugs.successRate(),Ve=s.a.BondForgery.successRate(),Ye=s.a.TraffickArms.successRate(),ze=s.a.Homicide.successRate(),Je=s.a.GrandTheftAuto.successRate(),$e=s.a.Kidnap.successRate(),Xe=s.a.Assassination.successRate(),Qe=s.a.Heist.successRate();ve.style.display="block",_e.style.display="block",_e.innerHTML="Shoplift ("+(100*We).toFixed(3)+"% chance of success)",_e.innerHTML+=' Attempt to shoplift from a low-end retailer ',ke.style.display="block",ke.innerHTML="Rob store("+(100*Ge).toFixed(3)+"% chance of success)",ke.innerHTML+='Attempt to commit armed robbery on a high-end store ',Ee.style.display="block",Ee.innerHTML="Mug someone ("+(100*Ue).toFixed(3)+"% chance of success)",Ee.innerHTML+=' Attempt to mug a random person on the street ',Oe.style.display="block",Oe.innerHTML="Larceny ("+(100*qe).toFixed(3)+"% chance of success)",Oe.innerHTML+=" Attempt to rob property from someone's house ",Ce.style.display="block",Ce.innerHTML="Deal Drugs ("+(100*Ke).toFixed(3)+"% chance of success)",Ce.innerHTML+=' Attempt to deal drugs ',we.style.display="block",we.innerHTML="Bond Forgery("+(100*Ve).toFixed(3)+"% chance of success)",we.innerHTML+=" Attempt to forge corporate bonds",Se.style.display="block",Se.innerHTML="Traffick Illegal Arms ("+(100*Ye).toFixed(3)+"% chance of success)",Se.innerHTML+=' Attempt to smuggle illegal arms into the city and sell them to gangs and criminal organizations ',Te.style.display="block",Te.innerHTML="Homicide ("+(100*ze).toFixed(3)+"% chance of success)",Te.innerHTML+=' Attempt to murder a random person on the street',Re.style.display="block",Re.innerHTML="Grand Theft Auto ("+(100*Je).toFixed(3)+"% chance of success)",Re.innerHTML+=' Attempt to commit grand theft auto ',xe.style.display="block",xe.innerHTML="Kidnap and Ransom ("+(100*$e).toFixed(3)+"% chance of success)",xe.innerHTML+=' Attempt to kidnap and ransom a high-profile target ',Ie.style.display="block",Ie.innerHTML="Assassinate ("+(100*Xe).toFixed(3)+"% chance of success)",Ie.innerHTML+=' Attempt to assassinate a high-profile target ',Pe.style.display="block",Pe.innerHTML="Heist ("+(100*Qe).toFixed(3)+"% chance of success)",Pe.innerHTML+=' Attempt to pull off the ultimate heist ';break;case O.Hospital:be.innerText="Get treatment for wounds - $"+Object(k.formatNumber)(De,2).toString(),be.style.display="block";break;default:console.log("ERROR: INVALID LOCATION")}Me==d.a.companyName&&((je=d.a.companyPosition).positionName==i.d.Employee.positionName?C.style.display="none":je.positionName==i.d.Waiter.positionName?S.style.display="none":je.positionName==i.d.PartTimeEmployee.positionName?w.style.display="none":je.positionName==i.d.PartTimeWaiter.positionName&&(A.style.display="none"))}function w(){document.getElementById("aevum-travelagency").addEventListener("click",function(){return d.a.location=O.AevumTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-summituniversity").addEventListener("click",function(){return d.a.location=O.AevumSummitUniversity,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-ecorp").addEventListener("click",function(){return d.a.location=O.AevumECorp,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-bachmanandassociates").addEventListener("click",function(){return d.a.location=O.AevumBachmanAndAssociates,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-clarkeincorporated").addEventListener("click",function(){return d.a.location=O.AevumClarkeIncorporated,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-fulcrumtechnologies").addEventListener("click",function(){return d.a.location=O.AevumFulcrumTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-aerocorp").addEventListener("click",function(){return d.a.location=O.AevumAeroCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-galacticcybersystems").addEventListener("click",function(){return d.a.location=O.AevumGalacticCybersystems,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-watchdogsecurity").addEventListener("click",function(){return d.a.location=O.AevumWatchdogSecurity,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-rhoconstruction").addEventListener("click",function(){return d.a.location=O.AevumRhoConstruction,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-aevumpolice").addEventListener("click",function(){return d.a.location=O.AevumPolice,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-netlinktechnologies").addEventListener("click",function(){return d.a.location=O.AevumNetLinkTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-crushfitnessgym").addEventListener("click",function(){return d.a.location=O.AevumCrushFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-snapfitnessgym").addEventListener("click",function(){return d.a.location=O.AevumSnapFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-slums").addEventListener("click",function(){return d.a.location=O.AevumSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-travelagency").addEventListener("click",function(){return d.a.location=O.ChongqingTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-kuaigonginternational").addEventListener("click",function(){return d.a.location=O.ChongqingKuaiGongInternational,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-solarisspacesystems").addEventListener("click",function(){return d.a.location=O.ChongqingSolarisSpaceSystems,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-slums").addEventListener("click",function(){return d.a.location=O.ChongqingSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-travelagency").addEventListener("click",function(){return d.a.location=O.Sector12TravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-rothmanuniversity").addEventListener("click",function(){return d.a.location=O.Sector12RothmanUniversity,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-megacorp").addEventListener("click",function(){return d.a.location=O.Sector12MegaCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-bladeindustries").addEventListener("click",function(){return d.a.location=O.Sector12BladeIndustries,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-foursigma").addEventListener("click",function(){return d.a.location=O.Sector12FourSigma,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-icarusmicrosystems").addEventListener("click",function(){return d.a.location=O.Sector12IcarusMicrosystems,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-universalenergy").addEventListener("click",function(){return d.a.location=O.Sector12UniversalEnergy,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-deltaone").addEventListener("click",function(){return d.a.location=O.Sector12DeltaOne,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-cia").addEventListener("click",function(){return d.a.location=O.Sector12CIA,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-nsa").addEventListener("click",function(){return d.a.location=O.Sector12NSA,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-alphaenterprises").addEventListener("click",function(){return d.a.location=O.Sector12AlphaEnterprises,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-carmichaelsecurity").addEventListener("click",function(){return d.a.location=O.Sector12CarmichaelSecurity,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-foodnstuff").addEventListener("click",function(){return d.a.location=O.Sector12FoodNStuff,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-joesguns").addEventListener("click",function(){return d.a.location=O.Sector12JoesGuns,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-irongym").addEventListener("click",function(){return d.a.location=O.Sector12IronGym,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-powerhousegym").addEventListener("click",function(){return d.a.location=O.Sector12PowerhouseGym,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-slums").addEventListener("click",function(){return d.a.location=O.Sector12Slums,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-cityhall").addEventListener("click",function(){return d.a.location=O.Sector12CityHall,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-travelagency").addEventListener("click",function(){return d.a.location=O.NewTokyoTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-defcomm").addEventListener("click",function(){return d.a.location=O.NewTokyoDefComm,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-vitalife").addEventListener("click",function(){return d.a.location=O.NewTokyoVitaLife,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-globalpharmaceuticals").addEventListener("click",function(){return d.a.location=O.NewTokyoGlobalPharmaceuticals,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-noodlebar").addEventListener("click",function(){return d.a.location=O.NewTokyoNoodleBar,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-slums").addEventListener("click",function(){return d.a.location=O.NewTokyoSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-travelagency").addEventListener("click",function(){return d.a.location=O.IshimaTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-stormtechnologies").addEventListener("click",function(){return d.a.location=O.IshimaStormTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-novamedical").addEventListener("click",function(){return d.a.location=O.IshimaNovaMedical,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-omegasoftware").addEventListener("click",function(){return d.a.location=O.IshimaOmegaSoftware,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-slums").addEventListener("click",function(){return d.a.location=O.IshimaSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-travelagency").addEventListener("click",function(){return d.a.location=O.VolhavenTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-zbinstituteoftechnology").addEventListener("click",function(){return d.a.location=O.VolhavenZBInstituteOfTechnology,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-omnitekincorporated").addEventListener("click",function(){return d.a.location=O.VolhavenOmniTekIncorporated,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-nwo").addEventListener("click",function(){return d.a.location=O.VolhavenNWO,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-helioslabs").addEventListener("click",function(){return d.a.location=O.VolhavenHeliosLabs,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-omniacybersystems").addEventListener("click",function(){return d.a.location=O.VolhavenOmniaCybersystems,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-lexocorp").addEventListener("click",function(){return d.a.location=O.VolhavenLexoCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-syscoresecurities").addEventListener("click",function(){return d.a.location=O.VolhavenSysCoreSecurities,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-computek").addEventListener("click",function(){return d.a.location=O.VolhavenCompuTek,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-milleniumfitnessgym").addEventListener("click",function(){return d.a.location=O.VolhavenMilleniumFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-slums").addEventListener("click",function(){return d.a.location=O.VolhavenSlums,l.Engine.loadLocationContent(),!1});var e=document.getElementById("location-software-job"),t=document.getElementById("location-software-consultant-job"),n=document.getElementById("location-it-job"),i=document.getElementById("location-security-engineer-job"),c=document.getElementById("location-network-engineer-job"),u=document.getElementById("location-business-job"),m=document.getElementById("location-business-consultant-job"),f=document.getElementById("location-security-job"),v=document.getElementById("location-agent-job"),w=document.getElementById("location-employee-job"),S=document.getElementById("location-parttime-employee-job"),T=document.getElementById("location-waiter-job"),R=document.getElementById("location-parttime-waiter-job"),x=(document.getElementById("location-work"),document.getElementById("location-purchase-2gb")),I=document.getElementById("location-purchase-4gb"),P=document.getElementById("location-purchase-8gb"),N=document.getElementById("location-purchase-16gb"),L=document.getElementById("location-purchase-32gb"),B=document.getElementById("location-purchase-64gb"),j=document.getElementById("location-purchase-128gb"),D=document.getElementById("location-purchase-256gb"),F=document.getElementById("location-purchase-512gb"),H=document.getElementById("location-purchase-1tb"),W=document.getElementById("location-purchase-tor"),G=document.getElementById("location-purchase-home-ram"),U=document.getElementById("location-purchase-home-cores"),q=document.getElementById("location-travel-to-aevum"),K=document.getElementById("location-travel-to-chongqing"),V=document.getElementById("location-travel-to-sector12"),Y=document.getElementById("location-travel-to-newtokyo"),z=document.getElementById("location-travel-to-ishima"),J=document.getElementById("location-travel-to-volhaven"),$=document.getElementById("location-slums-shoplift"),X=document.getElementById("location-slums-rob-store"),Q=document.getElementById("location-slums-mug"),Z=document.getElementById("location-slums-larceny"),ee=document.getElementById("location-slums-deal-drugs"),te=document.getElementById("location-slums-bond-forgery"),ne=document.getElementById("location-slums-traffic-arms"),ae=document.getElementById("location-slums-homicide"),ie=document.getElementById("location-slums-gta"),re=document.getElementById("location-slums-kidnap"),oe=document.getElementById("location-slums-assassinate"),se=document.getElementById("location-slums-heist"),le=document.getElementById("location-cityhall-create-corporation"),ce=document.getElementById("location-nsa-bladeburner"),ue=document.getElementById("location-hospital-treatment");e.addEventListener("click",function(){return d.a.applyForSoftwareJob(),!1}),t.addEventListener("click",function(){return d.a.applyForSoftwareConsultantJob(),!1}),n.addEventListener("click",function(){return d.a.applyForItJob(),!1}),i.addEventListener("click",function(){return d.a.applyForSecurityEngineerJob(),!1}),c.addEventListener("click",function(){return d.a.applyForNetworkEngineerJob(),!1}),u.addEventListener("click",function(){return d.a.applyForBusinessJob(),!1}),m.addEventListener("click",function(){return d.a.applyForBusinessConsultantJob(),!1}),f.addEventListener("click",function(){return d.a.applyForSecurityJob(),!1}),v.addEventListener("click",function(){return d.a.applyForAgentJob(),!1}),w.addEventListener("click",function(){return d.a.applyForEmployeeJob(),!1}),S.addEventListener("click",function(){return d.a.applyForPartTimeEmployeeJob(),!1}),T.addEventListener("click",function(){return d.a.applyForWaiterJob(),!1}),R.addEventListener("click",function(){return d.a.applyForPartTimeWaiterJob(),!1}),x.addEventListener("click",function(){return M(2,2*o.a.BaseCostFor1GBOfRamServer),!1}),I.addEventListener("click",function(){return M(4,4*o.a.BaseCostFor1GBOfRamServer),!1}),P.addEventListener("click",function(){return M(8,8*o.a.BaseCostFor1GBOfRamServer),!1}),N.addEventListener("click",function(){return M(16,16*o.a.BaseCostFor1GBOfRamServer),!1}),L.addEventListener("click",function(){return M(32,32*o.a.BaseCostFor1GBOfRamServer),!1}),B.addEventListener("click",function(){return M(64,64*o.a.BaseCostFor1GBOfRamServer),!1}),j.addEventListener("click",function(){return M(128,128*o.a.BaseCostFor1GBOfRamServer),!1}),D.addEventListener("click",function(){return M(256,256*o.a.BaseCostFor1GBOfRamServer),!1}),F.addEventListener("click",function(){return M(512,512*o.a.BaseCostFor1GBOfRamServer),!1}),H.addEventListener("click",function(){return M(1024,1024*o.a.BaseCostFor1GBOfRamServer),!1}),W.addEventListener("click",function(){return function(){if(d.a.money.lt(o.a.TorRouterCost))return void Object(y.dialogBoxCreate)("You cannot afford to purchase the Tor router");d.a.loseMoney(o.a.TorRouterCost);var e=new h.d({ip:Object(b.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(h.a)(e),g.a.addIp("Darkweb Server",e.ip);const t=document.getElementById("location-purchase-tor");t.setAttribute("class","a-link-button-bought"),t.innerHTML="TOR Router - Purchased",d.a.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(d.a.getHomeComputer().ip),Object(y.dialogBoxCreate)("You have purchased a Tor router!
You now have access to the dark web from your home computer
Use the scan/scan-analyze commands to search for the dark web connection.")}(),!1}),G.addEventListener("click",function(){const e=d.a.getUpgradeHomeRamCost(),t=d.a.getHomeComputer().maxRam;var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Purchase",a.innerHTML="Cancel",n.addEventListener("click",()=>{Object(p.a)(e),Object(E.a)()}),a.addEventListener("click",()=>{Object(E.a)()}),Object(E.b)("Would you like to purchase additional RAM for your home computer?

This will upgrade your RAM from "+t+"GB to "+2*t+"GB.

This will cost "+_()(e).format("$0.000a"))}),U.addEventListener("click",function(){var e=d.a.getHomeComputer().cpuCores;if(!(e>=8)){var t=[0,1e10,25e10,5e12,1e14,1e15,2e16,2e17];t=t[e];var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Purchase",a.innerHTML="Cancel",n.addEventListener("click",()=>{d.a.money.lt(t)?Object(y.dialogBoxCreate)("You do not have enough mone to purchase an additional CPU Core for your home computer!"):(d.a.loseMoney(t),d.a.getHomeComputer().cpuCores++,Object(y.dialogBoxCreate)("You purchased an additional CPU Core for your home computer! It now has "+d.a.getHomeComputer().cpuCores+" cores.")),Object(E.a)()}),a.addEventListener("click",()=>{Object(E.a)()}),Object(E.b)("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.

Purchasing an additional core (for a total of "+(d.a.getHomeComputer().cpuCores+1)+") will cost "+_()(t).format("$0.000a"))}}),q.addEventListener("click",function(){return A(O.Aevum,o.a.TravelCost),!1}),K.addEventListener("click",function(){return A(O.Chongqing,o.a.TravelCost),!1}),V.addEventListener("click",function(){return A(O.Sector12,o.a.TravelCost),!1}),Y.addEventListener("click",function(){return A(O.NewTokyo,o.a.TravelCost),!1}),z.addEventListener("click",function(){return A(O.Ishima,o.a.TravelCost),!1}),J.addEventListener("click",function(){return A(O.Volhaven,o.a.TravelCost),!1}),$.addEventListener("click",function(){return s.a.Shoplift.commit(),!1}),X.addEventListener("click",function(){return s.a.RobStore.commit(),!1}),Q.addEventListener("click",function(){return s.a.Mug.commit(),!1}),Z.addEventListener("click",function(){return s.a.Larceny.commit(),!1}),ee.addEventListener("click",function(){return s.a.DealDrugs.commit(),!1}),te.addEventListener("click",function(){return s.a.BondForgery.commit(),!1}),ne.addEventListener("click",function(){return s.a.TraffickArms.commit(),!1}),ae.addEventListener("click",function(){return s.a.Homicide.commit(),!1}),ie.addEventListener("click",function(){return s.a.GrandTheftAuto.commit(),!1}),re.addEventListener("click",function(){return s.a.Kidnap.commit(),!1}),oe.addEventListener("click",function(){return s.a.Assassination.commit(),!1}),se.addEventListener("click",function(){return s.a.Heist.commit(),!1}),le.addEventListener("click",function(){var e=Object(E.j)(),t=Object(E.i)();e.innerText="Create Corporation",t.innerText="Cancel",e.addEventListener("click",function(){if(d.a.money.lt(15e10))return Object(y.dialogBoxCreate)("You don't have enough money to create a corporation! You need $150b"),Object(E.f)();d.a.loseMoney(15e10);var e=Object(E.h)();return null==e||""==e?(Object(y.dialogBoxCreate)("Invalid company name!"),!1):(d.a.corporation=new r.a({name:e}),C(),document.getElementById("corporation-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(y.dialogBoxCreate)("Congratulations! You just started your own corporation. You can visit and manage your company in the City"),Object(E.f)())}),t.addEventListener("click",function(){return Object(E.f)()}),d.a.corporation instanceof r.a||Object(E.g)("Would you like to start a corporation? This will require $150b for registration and initial funding.

If so, please enter a name for your corporation below:")}),ce.addEventListener("click",function(){d.a.bladeburner&&d.a.bladeburner instanceof a.a?l.Engine.loadBladeburnerContent():d.a.strength>=100&&d.a.defense>=100&&d.a.dexterity>=100&&d.a.agility>=100?(d.a.bladeburner=new a.a({new:!0}),Object(y.dialogBoxCreate)("You have been accepted into the Bladeburner division!"),C(),document.getElementById("bladeburner-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()):Object(y.dialogBoxCreate)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}),ue.addEventListener("click",function(){d.a.hp<0&&(d.a.hp=0);var e=(d.a.max_hp-d.a.hp)*o.a.HospitalCostPerHp;return d.a.loseMoney(e),Object(y.dialogBoxCreate)("You were healed to full health! The hospital billed you for $"+Object(k.formatNumber)(e,2).toString()),d.a.hp=d.a.max_hp,C(),!1})}function S(e,t){!1===d.a.firstTimeTraveled&&(d.a.firstTimeTraveled=!0,document.getElementById("travel-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),d.a.money.lt(t)?Object(y.dialogBoxCreate)("You cannot afford to travel to "+e):(d.a.loseMoney(t),d.a.city=e,Object(y.dialogBoxCreate)("You are now in "+e+"!"),l.Engine.loadWorldContent())}function T(e){var t=document.getElementById("location-study-computer-science"),n=document.getElementById("location-data-structures-class"),a=document.getElementById("location-networks-class"),i=document.getElementById("location-algorithms-class"),r=document.getElementById("location-management-class"),s=document.getElementById("location-leadership-class");t.style.display="block",n.style.display="block",a.style.display="block",i.style.display="block",r.style.display="block",s.style.display="block";var l=o.a.ClassDataStructuresBaseCost*e,c=o.a.ClassNetworksBaseCost*e,u=o.a.ClassAlgorithmsBaseCost*e,d=o.a.ClassManagementBaseCost*e,h=o.a.ClassLeadershipBaseCost*e;n.innerHTML="Take Data Structures course ($"+l+" / sec)",a.innerHTML="Take Networks course ($"+c+" / sec)",i.innerHTML="Take Algorithms course ($"+u+" / sec)",r.innerHTML="Take Management course ($"+d+" / sec)",s.innerHTML="Take Leadership course ($"+h+" / sec)"}function R(e,t){Object(f.clearEventListeners)("location-study-computer-science").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassStudyComputerScience),!1}),Object(f.clearEventListeners)("location-data-structures-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassDataStructures),!1}),Object(f.clearEventListeners)("location-networks-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassNetworks),!1}),Object(f.clearEventListeners)("location-algorithms-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassAlgorithms),!1}),Object(f.clearEventListeners)("location-management-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassManagement),!1}),Object(f.clearEventListeners)("location-leadership-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassLeadership),!1})}function x(e){var t=document.getElementById("location-gym-train-str"),n=document.getElementById("location-gym-train-def"),a=document.getElementById("location-gym-train-dex"),i=document.getElementById("location-gym-train-agi");t.style.display="block",n.style.display="block",a.style.display="block",i.style.display="block";var r=o.a.ClassGymBaseCost*e;t.innerHTML="Train Strength ($"+r+" / sec)",n.innerHTML="Train Defense ($"+r+" / sec)",a.innerHTML="Train Dexterity ($"+r+" / sec)",i.innerHTML="Train Agility ($"+r+" / sec)"}function I(e,t){Object(f.clearEventListeners)("location-gym-train-str").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymStrength),!1}),Object(f.clearEventListeners)("location-gym-train-def").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymDefense),!1}),Object(f.clearEventListeners)("location-gym-train-dex").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymDexterity),!1}),Object(f.clearEventListeners)("location-gym-train-agi").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymAgility),!1})}function P(e,t,n,a,i,r){e.style.display="block",e.addEventListener("click",function(){return l.Engine.loadInfiltrationContent(),Object(c.a)(t,n,a,i,r),!1})}function N(e,t,n){var a=i.a[e];if(null!=a){var r=d.a.getNextCompanyPosition(a,t);if(null!=r&&a.hasPosition(r)){var o=Object(i.f)(a,r,!0);n.innerHTML+=""+o+""}}}function A(e,t){if(m.a.SuppressTravelConfirmation)S(e,t);else{var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Yes",a.innerHTML="No",a.addEventListener("click",()=>(Object(E.a)(),!1)),n.addEventListener("click",()=>(Object(E.a)(),S(e,t),!1)),Object(E.b)("Would you like to travel to "+e+"? The trip will cost $"+Object(k.formatNumber)(t,2)+".")}}function M(e,t){var n=Object(E.j)(),a=Object(E.i)();n.innerHTML="Purchase Server",a.innerHTML="Cancel",n.addEventListener("click",function(){Object(p.b)(e,t),Object(E.f)()}),a.addEventListener("click",function(){Object(E.f)()}),Object(E.g)("Would you like to purchase a new server with "+e+"GB of RAM for $"+Object(k.formatNumber)(t,2)+"?

Please enter the server hostname below:
")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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),function(e){n.d(t,"Engine",function(){return V});var a=n(8),i=n(65),r=n(27),o=n(13),s=n(3),l=n(42),c=n(87),u=n(14),d=n.n(u),h=n(2),p=n(60),m=n(51),g=n(18),y=n(16),f=n(28),b=n(95),v=n(74),_=n(11),k=n(48),E=n(1),O=n(21),C=n(12),w=n(38),S=n(4),T=n(41),R=n(50),x=n(29),I=n(63),P=n(33),N=n(39),A=n(34),M=n(23),L=n(0),B=n(67),j=n(47),D=n(57),F=n(30),H=n(9),W=n(22),G=n(49),U=n(19),q=n(24),K=n(25);n(134),n(132),n(130),n(128),n(126),n(124),n(122),n(120),n(118),n(116);e(document).keydown(function(e){if(!0!==W.a.DisableHotkeys){if(!(L.a.isWorking||j.b||N.c||v.a))if(84==e.keyCode&&e.altKey)e.preventDefault(),V.loadTerminalContent();else if(e.keyCode===K.a.C&&e.altKey)e.preventDefault(),V.loadCharacterContent();else if(e.keyCode===K.a.E&&e.altKey)e.preventDefault(),V.loadScriptEditorContent();else if(e.keyCode===K.a.S&&e.altKey)e.preventDefault(),V.loadActiveScriptsContent();else if(e.keyCode===K.a.H&&e.altKey)e.preventDefault(),V.loadHacknetNodesContent();else if(e.keyCode===K.a.W&&e.altKey)e.preventDefault(),V.loadWorldContent();else if(e.keyCode===K.a.J&&e.altKey)e.preventDefault(),V.loadJobContent();else if(e.keyCode===K.a.R&&e.altKey)e.preventDefault(),V.loadTravelContent();else if(e.keyCode===K.a.P&&e.altKey)e.preventDefault(),V.loadCreateProgramContent();else if(e.keyCode===K.a.F&&e.altKey){if(V.currentPage===V.Page.Terminal&&w.a.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),V.loadFactionsContent()}else e.keyCode===K.a.A&&e.altKey?(e.preventDefault(),V.loadAugmentationsContent()):e.keyCode===K.a.U&&e.altKey&&(e.preventDefault(),V.loadTutorialContent());e.keyCode===K.a.O&&e.altKey&&(e.preventDefault(),Object(i.b)())}});let V={version:"",Debug:!0,Clickables:{terminalMainMenuButton:null,characterMainMenuButton:null,scriptEditorMainMenuButton:null,activeScriptsMainMenuButton:null,hacknetNodesMainMenuButton:null,worldMainMenuButton:null,travelMainMenuButton:null,jobMainMenuButton:null,createProgramMainMenuButton:null,factionsMainMenuButton:null,augmentationsMainMenuButton:null,tutorialMainMenuButton:null,bladeburnerMenuButton:null,corporationMenuButton:null,gangMenuButton:null,devMainMenuButton:null,saveMainMenuButton:null,deleteMainMenuButton:null,tutorialNetworkingButton:null,tutorialHackingButton:null,tutorialScriptsButton:null,tutorialNetscriptButton:null,tutorialTravelingButton:null,tutorialCompaniesButton:null,tutorialFactionsButton:null,tutorialAugmentationsButton:null,tutorialBackButton:null,devMenuGiveMoney:null,devMenuGiveRam:null,devMenuAugDropdown:null,devMenuAddAug:null,devMenuTriggerBitFlume:null,devMenuFactionDropdown:null,devMenuAddFaction:null,devMenuOpen:null,devMenuMinSecurity:null,devMenuMaxMoney:null,devMenuConnectDropdown:null,devMenuConnect:null,devMenuProgramsDropdown:null,devMenuAddProgram:null,devMenuHackingExp:null,devMenuAddHacking:null,devMenuStrengthExp:null,devMenuAddStrength:null,devMenuDefenseExp:null,devMenuAddDefense:null,devMenuDexterityExp:null,devMenuAddDexterity:null,devMenuAgilityExp:null,devMenuAddAgility:null,devMenuCharismaExp:null,devMenuAddCharisma:null,devMenuIntelligenceExp:null,devMenuAddIntelligence:null,devMenuEnableIntelligence:null,devMenuDisableIntelligence:null,devMenuSFN:null,devMenuSFLvl:null,devMenuAddSF:null},Display:{progress:null,statusText:null,hacking_skill:null,terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,worldContent:null,createProgramContent:null,factionsContent:null,factionContent:null,factionAugmentationsContent:null,augmentationsContent:null,tutorialContent:null,devMenuContent:null,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},Page:{Terminal:"Terminal",CharacterInfo:"CharacterInfo",ScriptEditor:"ScriptEditor",ActiveScripts:"ActiveScripts",HacknetNodes:"HacknetNodes",World:"World",CreateProgram:"CreateProgram",Factions:"Factions",Faction:"Faction",Augmentations:"Augmentations",Tutorial:"Tutorial",DevMenu:"Dev Menu",Location:"Location",workInProgress:"WorkInProgress",RedPill:"RedPill",CinematicText:"CinematicText",Infiltration:"Infiltration",StockMarket:"StockMarket",Gang:"Gang",Mission:"Mission",Corporation:"Corporation",Bladeburner:"Bladeburner"},currentPage:null,overview:new b.a,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){V.hideAllContent(),V.Display.terminalContent.style.display="block",V.currentPage=V.Page.Terminal,document.getElementById("terminal-menu-link").classList.add("active")},loadCharacterContent:function(){V.hideAllContent(),V.Display.characterContent.style.display="block",V.displayCharacterInfo(),V.currentPage=V.Page.CharacterInfo,document.getElementById("stats-menu-link").classList.add("active")},loadScriptEditorContent:function(e="",t=""){V.hideAllContent(),V.Display.scriptEditorContent.style.display="block";var n=ace.edit("javascript-editor");""!=e&&(document.getElementById("script-editor-filename").value=e,n.setValue(t)),n.focus(),Object(F.h)(),V.currentPage=V.Page.ScriptEditor,document.getElementById("create-script-menu-link").classList.add("active")},loadActiveScriptsContent:function(){V.hideAllContent(),V.Display.activeScriptsContent.style.display="block",Object(m.c)(),V.currentPage=V.Page.ActiveScripts,document.getElementById("active-scripts-menu-link").classList.add("active")},loadHacknetNodesContent:function(){V.hideAllContent(),V.Display.hacknetNodesContent.style.display="block",Object(R.b)(),V.currentPage=V.Page.HacknetNodes,document.getElementById("hacknet-nodes-menu-link").classList.add("active")},loadWorldContent:function(){V.hideAllContent(),V.Display.worldContent.style.display="block",V.displayWorldInfo(),V.currentPage=V.Page.World,document.getElementById("city-menu-link").classList.add("active")},loadCreateProgramContent:function(){V.hideAllContent(),V.Display.createProgramContent.style.display="block",Object(O.b)(),V.currentPage=V.Page.CreateProgram,document.getElementById("create-program-menu-link").classList.add("active")},loadFactionsContent:function(){V.hideAllContent(),V.Display.factionsContent.style.display="block",V.displayFactionsInfo(),V.currentPage=V.Page.Factions,document.getElementById("factions-menu-link").classList.add("active")},loadFactionContent:function(){V.hideAllContent(),V.Display.factionContent.style.display="block",V.currentPage=V.Page.Faction},loadAugmentationsContent:function(){V.hideAllContent(),V.Display.augmentationsContent.style.display="block",Object(g.g)(),V.currentPage=V.Page.Augmentations,document.getElementById("augmentations-menu-link").classList.add("active")},loadTutorialContent:function(){V.hideAllContent(),V.Display.tutorialContent.style.display="block",V.displayTutorialContent(),V.currentPage=V.Page.Tutorial,document.getElementById("tutorial-menu-link").classList.add("active")},loadDevMenuContent:function(){V.hideAllContent(),V.Display.devMenuContent.style.display="block",V.displayDevMenuContent(),V.currentPage=V.Page.DevMenu,document.getElementById("dev-menu-link").classList.add("active")},loadLocationContent:function(){V.hideAllContent(),V.Display.locationContent.style.display="block",Object(S.b)(),V.currentPage=V.Page.Location},loadTravelContent:function(){switch(L.a.city){case S.a.Aevum:L.a.location=S.a.AevumTravelAgency;break;case S.a.Chongqing:L.a.location=S.a.ChongqingTravelAgency;break;case S.a.Sector12:L.a.location=S.a.Sector12TravelAgency;break;case S.a.NewTokyo:L.a.location=S.a.NewTokyoTravelAgency;break;case S.a.Ishima:L.a.location=S.a.IshimaTravelAgency;break;case S.a.Volhaven:L.a.location=S.a.VolhavenTravelAgency;break;default:Object(a.dialogBoxCreate)("ERROR: Invalid city. This is a bug please contact game dev")}V.loadLocationContent()},loadJobContent:function(){""!=L.a.companyName?(L.a.location=L.a.companyName,V.loadLocationContent()):Object(a.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.")},loadWorkInProgressContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",V.Display.workInProgressContent.style.display="block",V.currentPage=V.Page.WorkInProgress},loadRedPillContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",V.Display.redPillContent.style.display="block",V.currentPage=V.Page.RedPill},loadCinematicTextContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",V.Display.cinematicTextContent.style.display="block",V.currentPage=V.Page.CinematicText},loadInfiltrationContent:function(){V.hideAllContent(),V.Display.infiltrationContent.style.display="block",V.currentPage=V.Page.Infiltration},loadStockMarketContent:function(){V.hideAllContent(),V.Display.stockMarketContent.style.display="block",V.currentPage=V.Page.StockMarket,Object(q.f)()},loadGangContent:function(){V.hideAllContent(),document.getElementById("gang-container")||L.a.inGang()?(Object(T.d)(),V.currentPage=V.Page.Gang):(V.loadTerminalContent(),V.currentPage=V.Page.Terminal)},loadMissionContent:function(){V.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",V.Display.missionContent.style.display="block",V.currentPage=V.Page.Mission},loadCorporationContent:function(){L.a.corporation instanceof k.a&&(V.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",L.a.corporation.createUI(),V.currentPage=V.Page.Corporation)},loadBladeburnerContent:function(){if(L.a.bladeburner instanceof f.a)try{V.hideAllContent(),V.currentPage=V.Page.Bladeburner,L.a.bladeburner.createContent()}catch(e){Object(l.a)(e)}},hideAllContent:function(){V.Display.terminalContent.style.display="none",V.Display.characterContent.style.display="none",V.Display.scriptEditorContent.style.display="none",V.Display.activeScriptsContent.style.display="none",V.Display.hacknetNodesContent.style.display="none",V.Display.worldContent.style.display="none",V.Display.createProgramContent.style.display="none",V.Display.factionsContent.style.display="none",V.Display.factionContent.style.display="none",V.Display.factionAugmentationsContent.style.display="none",V.Display.augmentationsContent.style.display="none",V.Display.tutorialContent.style.display="none",V.Display.devMenuContent.style.display="none",V.Display.locationContent.style.display="none",V.Display.workInProgressContent.style.display="none",V.Display.redPillContent.style.display="none",V.Display.cinematicTextContent.style.display="none",V.Display.infiltrationContent.style.display="none",V.Display.stockMarketContent.style.display="none",V.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),L.a.corporation instanceof k.a&&L.a.corporation.clearUI(),L.a.bladeburner instanceof f.a&&L.a.bladeburner.clearContent(),V.aevumLocationsList.style.display="none",V.chongqingLocationsList.style.display="none",V.sector12LocationsList.style.display="none",V.newTokyoLocationsList.style.display="none",V.ishimaLocationsList.style.display="none",V.volhavenLocationsList.style.display="none",document.getElementById("terminal-menu-link").classList.remove("active"),document.getElementById("create-script-menu-link").classList.remove("active"),document.getElementById("active-scripts-menu-link").classList.remove("active"),document.getElementById("create-program-menu-link").classList.remove("active"),document.getElementById("stats-menu-link").classList.remove("active"),document.getElementById("factions-menu-link").classList.remove("active"),document.getElementById("augmentations-menu-link").classList.remove("active"),document.getElementById("hacknet-nodes-menu-link").classList.remove("active"),document.getElementById("city-menu-link").classList.remove("active"),document.getElementById("tutorial-menu-link").classList.remove("active"),document.getElementById("options-menu-link").classList.remove("active"),document.getElementById("dev-menu-link").classList.remove("active"),document.getElementById("bladeburner-menu-link").classList.remove("active"),document.getElementById("corporation-menu-link").classList.remove("active"),document.getElementById("gang-menu-link").classList.remove("active")},displayCharacterOverviewInfo:function(){V.overview.update();const e=document.getElementById("character-overview-save-button");W.a.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},displayCharacterInfo:function(){Object(r.removeChildrenFromElement)(V.Display.characterInfo);var e="";""!=L.a.companyPosition&&(e=L.a.companyPosition.positionName);var t="";L.a.intelligence>0&&(t="Intelligence: "+L.a.intelligence.toLocaleString()+"


");let n="";if(L.a.sourceFiles.length>0&&(n="Time played since last Bitnode destroyed: "+Object(h.convertTimeMsToTimeElapsedString)(L.a.playtimeSinceLastBitnode)+"
"),V.Display.characterInfo.appendChild(Object(s.createElement)("pre",{innerHTML:"General

Current City: "+L.a.city+"

Employer: "+L.a.companyName+"
Job Title: "+e+"

Money: $"+Object(h.formatNumber)(L.a.money.toNumber(),2)+"


Stats

Hacking Level: "+L.a.hacking_skill.toLocaleString()+" ("+d()(L.a.hacking_exp).format("(0.000a)")+" experience)
Strength: "+L.a.strength.toLocaleString()+" ("+d()(L.a.strength_exp).format("(0.000a)")+" experience)
Defense: "+L.a.defense.toLocaleString()+" ("+d()(L.a.defense_exp).format("(0.000a)")+" experience)
Dexterity: "+L.a.dexterity.toLocaleString()+" ("+d()(L.a.dexterity_exp).format("(0.000a)")+" experience)
Agility: "+L.a.agility.toLocaleString()+" ("+d()(L.a.agility_exp).format("(0.000a)")+" experience)
Charisma: "+L.a.charisma.toLocaleString()+" ("+d()(L.a.charisma_exp).format("(0.000a)")+" experience)
"+t+"Multipliers

Hacking Chance multiplier: "+Object(h.formatNumber)(100*L.a.hacking_chance_mult,2)+"%
Hacking Speed multiplier: "+Object(h.formatNumber)(100*L.a.hacking_speed_mult,2)+"%
Hacking Money multiplier: "+Object(h.formatNumber)(100*L.a.hacking_money_mult,2)+"%
Hacking Growth multiplier: "+Object(h.formatNumber)(100*L.a.hacking_grow_mult,2)+"%

Hacking Level multiplier: "+Object(h.formatNumber)(100*L.a.hacking_mult,2)+"%
Hacking Experience multiplier: "+Object(h.formatNumber)(100*L.a.hacking_exp_mult,2)+"%

Strength Level multiplier: "+Object(h.formatNumber)(100*L.a.strength_mult,2)+"%
Strength Experience multiplier: "+Object(h.formatNumber)(100*L.a.strength_exp_mult,2)+"%

Defense Level multiplier: "+Object(h.formatNumber)(100*L.a.defense_mult,2)+"%
Defense Experience multiplier: "+Object(h.formatNumber)(100*L.a.defense_exp_mult,2)+"%

Dexterity Level multiplier: "+Object(h.formatNumber)(100*L.a.dexterity_mult,2)+"%
Dexterity Experience multiplier: "+Object(h.formatNumber)(100*L.a.dexterity_exp_mult,2)+"%

Agility Level multiplier: "+Object(h.formatNumber)(100*L.a.agility_mult,2)+"%
Agility Experience multiplier: "+Object(h.formatNumber)(100*L.a.agility_exp_mult,2)+"%

Charisma Level multiplier: "+Object(h.formatNumber)(100*L.a.charisma_mult,2)+"%
Charisma Experience multiplier: "+Object(h.formatNumber)(100*L.a.charisma_exp_mult,2)+"%

Hacknet Node production multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_money_mult,2)+"%
Hacknet Node purchase cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_purchase_cost_mult,2)+"%
Hacknet Node RAM upgrade cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_ram_cost_mult,2)+"%
Hacknet Node Core purchase cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_core_cost_mult,2)+"%
Hacknet Node level upgrade cost multiplier: "+Object(h.formatNumber)(100*L.a.hacknet_node_level_cost_mult,2)+"%

Company reputation gain multiplier: "+Object(h.formatNumber)(100*L.a.company_rep_mult,2)+"%
Faction reputation gain multiplier: "+Object(h.formatNumber)(100*L.a.faction_rep_mult,2)+"%
Salary multiplier: "+Object(h.formatNumber)(100*L.a.work_money_mult,2)+"%
Crime success multiplier: "+Object(h.formatNumber)(100*L.a.crime_success_mult,2)+"%
Crime money multiplier: "+Object(h.formatNumber)(100*L.a.crime_money_mult,2)+"%


Misc

Servers owned: "+L.a.purchasedServers.length+"
Hacknet Nodes owned: "+L.a.hacknetNodes.length+"
Augmentations installed: "+L.a.augmentations.length+"
Time played since last Augmentation: "+Object(h.convertTimeMsToTimeElapsedString)(L.a.playtimeSinceLastAug)+"
"+n+"Time played: "+Object(h.convertTimeMsToTimeElapsedString)(L.a.totalPlaytime)})),0!==L.a.sourceFiles.length){var a="BitNode"+L.a.bitNodeN;V.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",innerHTML:"
Current BitNode: "+L.a.bitNodeN+" ("+y.b[a].name+")

"})),V.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",fontSize:"13px",marginLeft:"4%",innerHTML:y.b[a].info}))}},aevumLocationsList:null,chongqingLocationsList:null,sector12LocationsList:null,newTokyoLocationsList:null,ishimaLocationsList:null,volhavenLocationsList:null,displayWorldInfo:function(){V.aevumLocationsList.style.display="none",V.chongqingLocationsList.style.display="none",V.sector12LocationsList.style.display="none",V.newTokyoLocationsList.style.display="none",V.ishimaLocationsList.style.display="none",V.volhavenLocationsList.style.display="none",document.getElementById("world-city-name").innerHTML=L.a.city;document.getElementById("world-city-desc");switch(L.a.city){case S.a.Aevum:V.aevumLocationsList.style.display="inline";break;case S.a.Chongqing:V.chongqingLocationsList.style.display="inline";break;case S.a.Sector12:V.sector12LocationsList.style.display="inline",3!==L.a.bitNodeN&&!A.e||8===L.a.bitNodeN?document.getElementById("sector12-cityhall-li").style.display="none":document.getElementById("sector12-cityhall-li").style.display="block";break;case S.a.NewTokyo:V.newTokyoLocationsList.style.display="inline";break;case S.a.Ishima:V.ishimaLocationsList.style.display="inline";break;case S.a.Volhaven:V.volhavenLocationsList.style.display="inline";break;default:console.log("Invalid city value in Player object!")}var e,t=document.getElementById("generic-locations-list");(t.style.display="inline",Object(r.removeChildrenFromElement)(t),(e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"World Stock Exchange",class:"a-link-button",clickListener:()=>(L.a.location=S.a.WorldStockExchange,V.loadStockMarketContent(),!1)})),t.appendChild(e),L.a.corporation instanceof k.a&&null==document.getElementById("location-corporation-button"))&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:L.a.corporation.name,id:"location-corporation-button",class:"a-link-button",clickListener:()=>(V.loadCorporationContent(),!1)})),t.appendChild(e));L.a.bladeburner instanceof f.a&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"Bladeburner Headquarters",class:"a-link-button",clickListener:()=>(V.loadBladeburnerContent(),!1)})),t.appendChild(e))},displayFactionsInfo:function(){Object(r.removeChildrenFromElement)(V.Display.factionsContent),V.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Factions"})),V.Display.factionsContent.appendChild(Object(s.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(s.createElement)("ul");V.Display.factionsContent.appendChild(Object(s.createElement)("br"));for(var t=0;t(V.loadFactionContent(),Object(C.c)(n),!1)})),e.appendChild(Object(s.createElement)("br"))}();V.Display.factionsContent.appendChild(e),V.Display.factionsContent.appendChild(Object(s.createElement)("br")),V.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),V.Display.factionsContent.appendChild(Object(s.createElement)("p",{width:"70%",innerText:"Lists factions you have been invited to, as well as factions you have previously rejected. You can accept these faction invitations at any time."}));var n=Object(s.createElement)("ul");for(t=0;t{Object(C.h)(C.b[e]);for(var t=0;t0&&(V._lastUpdate=e-n,L.a.lastUpdate=e-n,V.updateGame(t)),window.requestAnimationFrame(V.idleTimer)},updateGame:function(e=1){var t=e*V._idleSpeed;null==L.a.totalPlaytime&&(L.a.totalPlaytime=0),null==L.a.playtimeSinceLastAug&&(L.a.playtimeSinceLastAug=0),null==L.a.playtimeSinceLastBitnode&&(L.a.playtimeSinceLastBitnode=0),L.a.totalPlaytime+=t,L.a.playtimeSinceLastAug+=t,L.a.playtimeSinceLastBitnode+=t,1==L.a.startAction&&(V._totalActionTime=L.a.actionTime,V._actionTimeLeft=L.a.actionTime,V._actionInProgress=!0,V._actionProgressBarCount=1,V._actionProgressStr="[ ]",V._actionTimeStr="Time left: ",L.a.startAction=!1),L.a.isWorking&&(L.a.workType==E.a.WorkTypeFaction?L.a.workForFaction(e):L.a.workType==E.a.WorkTypeCreateProgram?L.a.createProgramWork(e):L.a.workType==E.a.WorkTypeStudyClass?L.a.takeClass(e):L.a.workType==E.a.WorkTypeCrime?L.a.commitCrime(e):L.a.workType==E.a.WorkTypeCompanyPartTime?L.a.workPartTime(e):L.a.work(e)),2==L.a.bitNodeN&&L.a.inGang()&&L.a.gang.process(e),N.c&&N.b&&N.b.process(e),L.a.corporation instanceof k.a&&L.a.corporation.storeCycles(e),L.a.bladeburner instanceof f.a&&L.a.bladeburner.storeCycles(e),V.decrementAllCounters(e),V.checkCounters(),1==V._actionInProgress&&V.updateHackProgress(e),Object(M.g)(e),Object(R.d)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:600,messages:150,stockTick:30,sCr:1500,mechanicProcess:5},decrementAllCounters:function(e=1){for(var t in V.Counters)V.Counters.hasOwnProperty(t)&&(V.Counters[t]=V.Counters[t]-e)},checkCounters:function(){if(V.Counters.autoSaveCounter<=0&&(D.b.saveGame(Y),null==W.a.AutosaveInterval&&(W.a.AutosaveInterval=60),0===W.a.AutosaveInterval?V.Counters.autoSaveCounter=1/0:V.Counters.autoSaveCounter=5*W.a.AutosaveInterval),V.Counters.updateSkillLevelsCounter<=0&&(L.a.updateSkillLevels(),V.Counters.updateSkillLevelsCounter=10),V.Counters.updateActiveScriptsDisplay<=0&&(Object(m.c)(),V.currentPage===V.Page.ActiveScripts?V.Counters.updateActiveScriptsDisplay=5:V.Counters.updateActiveScriptsDisplay=10),V.Counters.updateDisplays<=0&&(V.displayCharacterOverviewInfo(),V.currentPage==V.Page.CharacterInfo?V.displayCharacterInfo():V.currentPage==V.Page.HacknetNodes?Object(R.f)():V.currentPage==V.Page.CreateProgram&&Object(O.b)(),p.b&&Object(p.c)(),V.Counters.updateDisplays=3),V.Counters.updateDisplaysMed<=0&&(V.currentPage===V.Page.Corporation&&L.a.corporation.updateUIContent(),V.Counters.updateDisplaysMed=9),V.Counters.updateDisplaysLong<=0&&(V.currentPage===V.Page.Gang?Object(T.g)():V.currentPage===V.Page.ScriptEditor&&Object(F.h)(),V.Counters.updateDisplaysLong=15),V.Counters.createProgramNotifications<=0){var e=Object(O.c)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),V.Counters.createProgramNotifications=10}if(V.Counters.checkFactionInvitations<=0){var n=L.a.checkForFactionInvitations();if(n.length>0){!1===L.a.firstFacInvRecvd&&(L.a.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=n[Math.floor(Math.random()*n.length)];Object(C.g)(a)}V.Counters.checkFactionInvitations=100}if(V.Counters.passiveFactionGrowth<=0){var i=Math.floor(600-V.Counters.passiveFactionGrowth);Object(C.j)(i),V.Counters.passiveFactionGrowth=600}if(V.Counters.messages<=0&&(Object(P.c)(),g.c[g.b.TheRedPill].owned?V.Counters.messages=4500:V.Counters.messages=150),V.Counters.stockTick<=0&&(L.a.hasWseAccount&&Object(q.q)(),V.Counters.stockTick=30),V.Counters.sCr<=0&&(L.a.hasWseAccount&&Object(q.o)(),V.Counters.sCr=1500),V.Counters.mechanicProcess<=0){if(L.a.corporation instanceof k.a&&L.a.corporation.process(),L.a.bladeburner instanceof f.a)try{L.a.bladeburner.process()}catch(e){Object(l.a)("Exception caught in Bladeburner.process(): "+e)}V.Counters.mechanicProcess=5}},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*V._idleSpeed;V._actionTimeLeft-=t/1e3,V._actionTimeLeft=Math.max(V._actionTimeLeft,0);for(var n=Math.round(100*(1-V._actionTimeLeft/V._totalActionTime));2*V._actionProgressBarCount<=n;)V._actionProgressStr=Object(h.replaceAt)(V._actionProgressStr,V._actionProgressBarCount,"|"),V._actionProgressBarCount+=1;V._actionTimeStr="Time left: "+Math.max(0,Math.round(V._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=V._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=V._actionProgressStr.replace(/ /g," "),n>=100&&(V._actionInProgress=!1,K.b.finishAction())},_prevTimeout:null,createStatusText:function(e){null!=V._prevTimeout&&(clearTimeout(V._prevTimeout),V._prevTimeout=null);var t=document.getElementById("status-text");t.style.display="inline-block",t.setAttribute("class","status-text"),t.innerHTML=e,V._prevTimeout=setTimeout(function(){t.style.display="none",t.removeAttribute("class"),t.innerHTML=""},3e3)},closeMainMenuHeader:function(e){for(var t=0;t{t.delay=null,n()},e),t.delayResolve=n})}function y(e,t,n=null){var a="";null!=n&&(a=" (Line "+b(n,e)+")");return"|"+e.serverIp+"|"+e.name+"|"+t+a}function f(e,t,n,a,i=1){if(null!=(d=Object(s.d)(t,n,e)))return a.scriptRef.log(t+" is already running on "+e.hostname),h.resolve(!1);for(var o=0;op?(a.scriptRef.log("Cannot run script "+t+"(t="+i+") on "+e.hostname+" because there is not enough available RAM!"),h.resolve(!1)):(null==a.disableLogs.ALL&&null==a.disableLogs.exec&&null==a.disableLogs.run&&null==a.disableLogs.spawn&&a.scriptRef.log("Running script: "+t+" on "+e.hostname+" with "+i+" threads and args: "+Object(c.arrayToString)(n)+". May take a few seconds to start up..."),(d=new s.b(l,n)).threads=i,e.runningScripts.push(d),Object(r.c)(d,e),h.resolve(!0))}return a.scriptRef.log("Could not find script "+t+" on "+e.hostname),h.resolve(!1)}function b(e,t){var n=t.scriptRef.scriptRef.code;try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}function v(e){if(!Object(d.isString)(e))return!1;let t=e.split("|");if(4!=t.length)return!1;var n=t[1];return!!Object(u.isValidIPAddress)(n)}function _(e){var t=(100-e.hackDifficulty)/100,n=1.75*i.a.hacking_skill+.2*i.a.intelligence,a=(n-e.requiredHackingSkill)/n*t*i.a.hacking_chance_mult;return a>1?1:a<0?0:a}function k(e){return 5*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult}function E(e){return null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty),(e.baseDifficulty*i.a.hacking_exp_mult*.3+3)*a.a.HackExpGain}function O(e){var t=(100-e.hackDifficulty)/100*((i.a.hacking_skill-(e.requiredHackingSkill-1))/i.a.hacking_skill)*i.a.hacking_money_mult/240;return t<0?0:t>1?1:t*a.a.ScriptHackMoney}function C(e){return 1e3*(16*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult)}function w(e){return 1e3*(20*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult)}h.config({warnings:!1,longStackTraces:!1,cancellation:!0,monitoring:!1})},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"dialogBoxCreate",function(){return r}),n.d(t,"dialogBoxOpened",function(){return i});let a=[];e(document).click(function(t){i&&a.length>=1&&(e(t.target).closest(a[0]).length||(a[0].remove(),a.splice(0,1),0==a.length?i=!1:a[0].style.visibility="visible"))}),e(document).on("click",".dialog-box-close-button",function(e){i&&a.length>=1&&(a[0].remove(),a.splice(0,1),0==a.length?i=!1:a[0].style.visibility="visible")});var i=!1;function r(e,t=!1){var n=document.createElement("div");n.setAttribute("class","dialog-box-container");var r=document.createElement("div");r.setAttribute("class","dialog-box-content");var o,s=document.createElement("span");s.setAttribute("class","dialog-box-close-button"),s.innerHTML="×",t?(o=document.createElement("pre")).innerHTML=e:(o=document.createElement("p")).innerHTML=e.replace(/(?:\r\n|\r|\n)/g,"
"),r.appendChild(s),r.appendChild(o),n.appendChild(r),document.body.appendChild(n),a.length>=1&&(n.style.visibility="hidden"),a.push(n),setTimeout(function(){i=!0},400)}}.call(this,n(53))},function(e,t,n){"use strict";n.d(t,"d",function(){return h}),n.d(t,"b",function(){return y}),n.d(t,"e",function(){return k}),n.d(t,"c",function(){return _}),n.d(t,"g",function(){return b}),n.d(t,"a",function(){return v}),n.d(t,"j",function(){return m}),n.d(t,"f",function(){return p}),n.d(t,"h",function(){return f}),n.d(t,"i",function(){return g});var a=n(16),i=n(1),r=n(21),o=n(0),s=(n(30),n(19)),l=n(5),c=n(17),u=n(10),d=n(66);function h(e={ip:Object(c.a)(),hostname:""}){this.ip=e.ip?e.ip:Object(c.a)();for(var t=e.hostname,n=0,i="";null!=_(t+i);)i="-"+n,++n;this.hostname=t+i,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights,this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.manuallyHacked=!1,this.maxRam=null!=e.maxRam?e.maxRam:0,this.ramUsed=0,this.cpuCores=1,this.scripts=[],this.runningScripts=[],this.programs=[],this.messages=[],this.textFiles=[],this.dir=0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*a.a.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*a.a.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*a.a.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.serversOnNetwork=[],this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5,this.sshPortOpen=!1,this.ftpPortOpen=!1,this.smtpPortOpen=!1,this.httpPortOpen=!1,this.sqlPortOpen=!1,this.openPortCount=0}function p(){var e=new h({ip:Object(c.a)(),hostname:"ecorp",organizationName:"ECorp",requiredHackingSkill:Object(l.getRandomInt)(1150,1300),moneyAvailable:Object(l.getRandomInt)(3e10,7e10),hackDifficulty:99,serverGrowth:99,numOpenPortsRequired:5});v(e);var t=new h({ip:Object(c.a)(),hostname:"megacorp",organizationName:"MegaCorp",requiredHackingSkill:Object(l.getRandomInt)(1150,1300),moneyAvailable:Object(l.getRandomInt)(4e10,6e10),hackDifficulty:99,serverGrowth:99,numOpenPortsRequired:5});v(t);var n=new h({ip:Object(c.a)(),hostname:"b-and-a",organizationName:"Bachman & Associates",requiredHackingSkill:Object(l.getRandomInt)(1e3,1050),moneyAvailable:Object(l.getRandomInt)(2e10,25e9),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(65,75),numOpenPortsRequired:5});v(n);var a=new h({ip:Object(c.a)(),hostname:"blade",organizationName:"Blade Industries",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(1e3,1100),moneyAvailable:Object(l.getRandomInt)(12e9,2e10),hackDifficulty:Object(l.getRandomInt)(90,95),serverGrowth:Object(l.getRandomInt)(60,75),numOpenPortsRequired:5});a.messages.push("beyond-man.lit"),v(a);var i=new h({ip:Object(c.a)(),hostname:"nwo",organizationName:"New World Order",requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(25e9,35e9),hackDifficulty:99,serverGrowth:Object(l.getRandomInt)(75,85),numOpenPortsRequired:5});i.messages.push("the-hidden-world.lit"),v(i);var r=new h({ip:Object(c.a)(),hostname:"clarkeinc",organizationName:"Clarke Incorporated",requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(15e9,25e9),hackDifficulty:Object(l.getRandomInt)(50,60),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});r.messages.push("beyond-man.lit"),r.messages.push("cost-of-immortality.lit"),v(r);var u=new h({ip:Object(c.a)(),hostname:"omnitek",organizationName:"OmniTek Incorporated",maxRam:256,requiredHackingSkill:Object(l.getRandomInt)(900,1100),moneyAvailable:Object(l.getRandomInt)(15e9,2e10),hackDifficulty:Object(l.getRandomInt)(90,99),serverGrowth:Object(l.getRandomInt)(95,99),numOpenPortsRequired:5});u.messages.push("coded-intelligence.lit"),u.messages.push("history-of-synthoids.lit"),v(u);var d=new h({ip:Object(c.a)(),hostname:"4sigma",organizationName:"FourSigma",requiredHackingSkill:Object(l.getRandomInt)(950,1200),moneyAvailable:Object(l.getRandomInt)(15e9,25e9),hackDifficulty:Object(l.getRandomInt)(60,70),serverGrowth:Object(l.getRandomInt)(75,99),numOpenPortsRequired:5});v(d);var p=new h({ip:Object(c.a)(),hostname:"kuai-gong",organizationName:"KuaiGong International",requiredHackingSkill:Object(l.getRandomInt)(1e3,1250),moneyAvailable:Object(l.getRandomInt)(2e10,3e10),hackDifficulty:Object(l.getRandomInt)(95,99),serverGrowth:Object(l.getRandomInt)(90,99),numOpenPortsRequired:5});v(p);var m=new h({ip:Object(c.a)(),hostname:"fulcrumtech",organizationName:"Fulcrum Technologies",maxRam:512,requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(14e8,18e8),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(80,99),numOpenPortsRequired:5});m.messages.push("simulated-reality.lit"),v(m);var g=new h({ip:Object(c.a)(),hostname:"fulcrumassets",organizationName:"Fulcrum Technologies Assets",requiredHackingSkill:Object(l.getRandomInt)(1200,1500),moneyAvailable:1e6,hackDifficulty:99,serverGrowth:1,numOpenPortsRequired:5});v(g),s.a.addIp(s.b.FulcrumSecretTechnologies,g.ip);var y=new h({ip:Object(c.a)(),hostname:"stormtech",organizationName:"Storm Technologies",requiredHackingSkill:Object(l.getRandomInt)(900,1050),moneyAvailable:Object(l.getRandomInt)(1e9,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});v(y);var f=new h({ip:Object(c.a)(),hostname:"defcomm",organizationName:"DefComm",requiredHackingSkill:Object(l.getRandomInt)(900,1e3),moneyAvailable:Object(l.getRandomInt)(8e8,95e7),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});v(f);var b=new h({ip:Object(c.a)(),hostname:"infocomm",organizationName:"InfoComm",requiredHackingSkill:Object(l.getRandomInt)(875,950),moneyAvailable:Object(l.getRandomInt)(6e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,90),serverGrowth:Object(l.getRandomInt)(35,75),numOpenPortsRequired:5});v(b);var _=new h({ip:Object(c.a)(),hostname:"helios",organizationName:"Helios Labs",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(55e7,75e7),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});_.messages.push("beyond-man.lit"),v(_);var k=new h({ip:Object(c.a)(),hostname:"vitalife",organizationName:"VitaLife",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(775,900),moneyAvailable:Object(l.getRandomInt)(7e8,8e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(60,80),numOpenPortsRequired:5});k.messages.push("A-Green-Tomorrow.lit"),v(k);var E=new h({ip:Object(c.a)(),hostname:"icarus",organizationName:"Icarus Microsystems",requiredHackingSkill:Object(l.getRandomInt)(850,925),moneyAvailable:Object(l.getRandomInt)(9e8,1e9),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(85,95),numOpenPortsRequired:5});v(E);var O=new h({ip:Object(c.a)(),hostname:"univ-energy",organizationName:"Universal Energy",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(11e8,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(80,90),numOpenPortsRequired:4});v(O);var C=new h({ip:Object(c.a)(),hostname:"titan-labs",organizationName:"Titan Laboratories",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(800,875),moneyAvailable:Object(l.getRandomInt)(75e7,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(60,80),numOpenPortsRequired:5});C.messages.push("coded-intelligence.lit"),v(C);var w=new h({ip:Object(c.a)(),hostname:"microdyne",organizationName:"Microdyne Technologies",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(800,875),moneyAvailable:Object(l.getRandomInt)(5e8,7e8),hackDifficulty:Object(l.getRandomInt)(65,75),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});w.messages.push("synthetic-muscles.lit"),v(w);var S=new h({ip:Object(c.a)(),hostname:"taiyang-digital",organizationName:"Taiyang Digital",requiredHackingSkill:Object(l.getRandomInt)(850,950),moneyAvailable:Object(l.getRandomInt)(8e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});S.messages.push("A-Green-Tomorrow.lit"),S.messages.push("brighter-than-the-sun.lit"),v(S);var T=new h({ip:Object(c.a)(),hostname:"galactic-cyber",organizationName:"Galactic Cybersystems",requiredHackingSkill:Object(l.getRandomInt)(825,875),moneyAvailable:Object(l.getRandomInt)(75e7,85e7),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});v(T);var R=new h({ip:Object(c.a)(),hostname:"aerocorp",organizationName:"AeroCorp",requiredHackingSkill:Object(l.getRandomInt)(850,925),moneyAvailable:Object(l.getRandomInt)(1e9,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(55,65),numOpenPortsRequired:5});R.messages.push("man-and-machine.lit"),v(R);var x=new h({ip:Object(c.a)(),hostname:"omnia",organizationName:"Omnia Cybersystems",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(850,950),moneyAvailable:Object(l.getRandomInt)(9e8,1e9),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(60,70),numOpenPortsRequired:5});x.messages.push("history-of-synthoids.lit"),v(x);var I=new h({ip:Object(c.a)(),hostname:"zb-def",organizationName:"ZB Defense Industries",requiredHackingSkill:Object(l.getRandomInt)(775,825),moneyAvailable:Object(l.getRandomInt)(9e8,11e8),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(65,75),numOpenPortsRequired:4});I.messages.push("synthetic-muscles.lit"),v(I);var P=new h({ip:Object(c.a)(),hostname:"applied-energetics",organizationName:"Applied Energetics",requiredHackingSkill:Object(l.getRandomInt)(775,850),moneyAvailable:Object(l.getRandomInt)(7e8,1e9),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(70,75),numOpenPortsRequired:4});v(P);var N=new h({ip:Object(c.a)(),hostname:"solaris",organizationName:"Solaris Space Systems",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(750,850),moneyAvailable:Object(l.getRandomInt)(7e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});N.messages.push("A-Green-Tomorrow.lit"),N.messages.push("the-failed-frontier.lit"),v(N);var A=new h({ip:Object(c.a)(),hostname:"deltaone",organizationName:"Delta One",requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(13e8,17e8),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});v(A);var M=new h({ip:Object(c.a)(),hostname:"global-pharm",organizationName:"Global Pharmaceuticals",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(750,850),moneyAvailable:Object(l.getRandomInt)(15e8,175e7),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(80,90),numOpenPortsRequired:4});M.messages.push("A-Green-Tomorrow.lit"),v(M);var L=new h({ip:Object(c.a)(),hostname:"nova-med",organizationName:"Nova Medical",requiredHackingSkill:Object(l.getRandomInt)(775,850),moneyAvailable:Object(l.getRandomInt)(11e8,125e7),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(65,85),numOpenPortsRequired:4});v(L);var B=new h({ip:Object(c.a)(),hostname:"zeus-med",organizationName:"Zeus Medical",requiredHackingSkill:Object(l.getRandomInt)(800,850),moneyAvailable:Object(l.getRandomInt)(13e8,15e8),hackDifficulty:Object(l.getRandomInt)(70,90),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});v(B);var j=new h({ip:Object(c.a)(),hostname:"unitalife",organizationName:"UnitaLife Group",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(775,825),moneyAvailable:Object(l.getRandomInt)(1e9,11e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:4});v(j);var D=new h({ip:Object(c.a)(),hostname:"lexo-corp",organizationName:"Lexo Corporation",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(650,750),moneyAvailable:Object(l.getRandomInt)(7e8,8e8),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(55,65),numOpenPortsRequired:4});v(D);var F=new h({ip:Object(c.a)(),hostname:"rho-construction",organizationName:"Rho Construction",requiredHackingSkill:Object(l.getRandomInt)(475,525),moneyAvailable:Object(l.getRandomInt)(5e8,7e8),hackDifficulty:Object(l.getRandomInt)(40,60),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:3});v(F);var H=new h({ip:Object(c.a)(),hostname:"alpha-ent",organizationName:"Alpha Enterprises",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(500,600),moneyAvailable:Object(l.getRandomInt)(6e8,75e7),hackDifficulty:Object(l.getRandomInt)(50,70),serverGrowth:Object(l.getRandomInt)(50,60),numOpenPortsRequired:4});H.messages.push("sector-12-crime.lit"),v(H);var W=new h({ip:Object(c.a)(),hostname:"aevum-police",organizationName:"Aevum Police Network",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(400,450),moneyAvailable:Object(l.getRandomInt)(2e8,4e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(30,50),numOpenPortsRequired:4});v(W);var G=new h({ip:Object(c.a)(),hostname:"rothman-uni",organizationName:"Rothman University Network",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(370,430),moneyAvailable:Object(l.getRandomInt)(175e6,25e7),hackDifficulty:Object(l.getRandomInt)(45,55),serverGrowth:Object(l.getRandomInt)(35,45),numOpenPortsRequired:3});G.messages.push("secret-societies.lit"),G.messages.push("the-failed-frontier.lit"),G.messages.push("tensions-in-tech-race.lit"),v(G);var U=new h({ip:Object(c.a)(),hostname:"zb-institute",organizationName:"ZB Institute of Technology Network",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(725,775),moneyAvailable:Object(l.getRandomInt)(8e8,11e8),hackDifficulty:Object(l.getRandomInt)(65,85),serverGrowth:Object(l.getRandomInt)(75,85),numOpenPortsRequired:5});v(U);var q=new h({ip:Object(c.a)(),hostname:"summit-uni",organizationName:"Summit University Network",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(425,475),moneyAvailable:Object(l.getRandomInt)(2e8,35e7),hackDifficulty:Object(l.getRandomInt)(45,65),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:3});q.messages.push("secret-societies.lit"),q.messages.push("the-failed-frontier.lit"),q.messages.push("synthetic-muscles.lit"),v(q);var K=new h({ip:Object(c.a)(),hostname:"syscore",organizationName:"SysCore Securities",requiredHackingSkill:Object(l.getRandomInt)(550,650),moneyAvailable:Object(l.getRandomInt)(4e8,6e8),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(60,70),numOpenPortsRequired:4});v(K);var V=new h({ip:Object(c.a)(),hostname:"catalyst",organizationName:"Catalyst Ventures",requiredHackingSkill:Object(l.getRandomInt)(400,450),moneyAvailable:Object(l.getRandomInt)(3e8,55e7),hackDifficulty:Object(l.getRandomInt)(60,70),serverGrowth:Object(l.getRandomInt)(25,55),numOpenPortsRequired:3});V.messages.push("tensions-in-tech-race.lit"),v(V);var Y=new h({ip:Object(c.a)(),hostname:"the-hub",organizationName:"The Hub",requiredHackingSkill:Object(l.getRandomInt)(275,325),moneyAvailable:Object(l.getRandomInt)(15e7,2e8),hackDifficulty:Object(l.getRandomInt)(35,45),serverGrowth:Object(l.getRandomInt)(45,55),numOpenPortsRequired:2});v(Y);var z=new h({ip:Object(c.a)(),hostname:"comptek",organizationName:"CompuTek",requiredHackingSkill:Object(l.getRandomInt)(300,400),moneyAvailable:Object(l.getRandomInt)(22e7,25e7),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(45,65),numOpenPortsRequired:3});z.messages.push("man-and-machine.lit"),v(z);var J=new h({ip:Object(c.a)(),hostname:"netlink",organizationName:"NetLink Technologies",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(375,425),moneyAvailable:275e6,hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(45,75),numOpenPortsRequired:3});J.messages.push("simulated-reality.lit"),v(J);var $=new h({ip:Object(c.a)(),hostname:"johnson-ortho",organizationName:"Johnson Orthopedics",requiredHackingSkill:Object(l.getRandomInt)(250,300),moneyAvailable:Object(l.getRandomInt)(7e7,85e6),hackDifficulty:Object(l.getRandomInt)(35,65),serverGrowth:Object(l.getRandomInt)(35,65),numOpenPortsRequired:2});v($);var X=new h({ip:Object(c.a)(),hostname:"foodnstuff",organizationName:"Food N Stuff Supermarket",maxRam:16,requiredHackingSkill:1,moneyAvailable:2e6,hackDifficulty:10,serverGrowth:5,numOpenPortsRequired:0});X.messages.push("sector-12-crime.lit"),v(X);var Q=new h({ip:Object(c.a)(),hostname:"sigma-cosmetics",organizationName:"Sigma Cosmetics",maxRam:16,requiredHackingSkill:5,moneyAvailable:23e5,hackDifficulty:10,serverGrowth:10,numOpenPortsRequired:0});v(Q);var Z=new h({ip:Object(c.a)(),hostname:"joesguns",organizationName:"Joe's Guns",maxRam:16,requiredHackingSkill:10,moneyAvailable:25e5,hackDifficulty:15,serverGrowth:20,numOpenPortsRequired:0});v(Z);var ee=new h({ip:Object(c.a)(),hostname:"zer0",organizationName:"ZER0 Nightclub",maxRam:32,requiredHackingSkill:75,moneyAvailable:75e5,hackDifficulty:25,serverGrowth:40,numOpenPortsRequired:1});v(ee);var te=new h({ip:Object(c.a)(),hostname:"nectar-net",organizationName:"Nectar Nightclub Network",maxRam:16,requiredHackingSkill:20,moneyAvailable:275e4,hackDifficulty:20,serverGrowth:25,numOpenPortsRequired:0});v(te);var ne=new h({ip:Object(c.a)(),hostname:"neo-net",organizationName:"Neo Nightclub Network",maxRam:32,requiredHackingSkill:50,moneyAvailable:5e6,hackDifficulty:25,serverGrowth:25,numOpenPortsRequired:1});ne.messages.push("the-hidden-world.lit"),v(ne);var ae=new h({ip:Object(c.a)(),hostname:"silver-helix",organizationName:"Silver Helix",maxRam:64,requiredHackingSkill:150,moneyAvailable:45e6,hackDifficulty:30,serverGrowth:30,numOpenPortsRequired:2});ae.messages.push("new-triads.lit"),v(ae);var ie=new h({ip:Object(c.a)(),hostname:"hong-fang-tea",organizationName:"HongFang Teahouse",maxRam:16,requiredHackingSkill:30,moneyAvailable:3e6,hackDifficulty:15,serverGrowth:20,numOpenPortsRequired:0});ie.messages.push("brighter-than-the-sun.lit"),v(ie);var re=new h({ip:Object(c.a)(),hostname:"harakiri-sushi",organizationName:"HaraKiri Sushi Bar Network",maxRam:16,requiredHackingSkill:40,moneyAvailable:4e6,hackDifficulty:15,serverGrowth:40,numOpenPortsRequired:0});v(re);var oe=new h({ip:Object(c.a)(),hostname:"phantasy",organizationName:"Phantasy Club",maxRam:32,requiredHackingSkill:100,moneyAvailable:24e6,hackDifficulty:20,serverGrowth:35,numOpenPortsRequired:2});v(oe);var se=new h({ip:Object(c.a)(),hostname:"max-hardware",organizationName:"Max Hardware Store",maxRam:32,requiredHackingSkill:80,moneyAvailable:1e7,hackDifficulty:15,serverGrowth:30,numOpenPortsRequired:1});v(se);var le=new h({ip:Object(c.a)(),hostname:"omega-net",organizationName:"Omega Software",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(180,220),moneyAvailable:Object(l.getRandomInt)(6e7,7e7),hackDifficulty:Object(l.getRandomInt)(25,35),serverGrowth:Object(l.getRandomInt)(30,40),numOpenPortsRequired:2});le.messages.push("the-new-god.lit"),v(le);var ce=new h({ip:Object(c.a)(),hostname:"crush-fitness",organizationName:"Crush Fitness",requiredHackingSkill:Object(l.getRandomInt)(225,275),moneyAvailable:Object(l.getRandomInt)(4e7,6e7),hackDifficulty:Object(l.getRandomInt)(35,45),serverGrowth:Object(l.getRandomInt)(27,33),numOpenPortsRequired:2});v(ce);var ue=new h({ip:Object(c.a)(),hostname:"iron-gym",organizationName:"Iron Gym Network",maxRam:32,requiredHackingSkill:100,moneyAvailable:2e7,hackDifficulty:30,serverGrowth:20,numOpenPortsRequired:1});v(ue);var de=new h({ip:Object(c.a)(),hostname:"millenium-fitness",organizationName:"Millenium Fitness Network",requiredHackingSkill:Object(l.getRandomInt)(475,525),moneyAvailable:25e7,hackDifficulty:Object(l.getRandomInt)(45,55),serverGrowth:Object(l.getRandomInt)(25,45),numOpenPortsRequired:3});v(de);var he=new h({ip:Object(c.a)(),hostname:"powerhouse-fitness",organizationName:"Powerhouse Fitness",requiredHackingSkill:Object(l.getRandomInt)(950,1100),moneyAvailable:9e8,hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(50,60),numOpenPortsRequired:5});v(he);var pe=new h({ip:Object(c.a)(),hostname:"snap-fitness",organizationName:"Snap Fitness",requiredHackingSkill:Object(l.getRandomInt)(675,800),moneyAvailable:45e7,hackDifficulty:Object(l.getRandomInt)(40,60),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:4});v(pe);var me=new h({ip:Object(c.a)(),hostname:"run4theh111z",organizationName:"The Runners",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(505,550),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:4});me.messages.push("simulated-reality.lit"),me.messages.push("the-new-god.lit"),v(me),s.a.addIp(s.b.BitRunnersServer,me.ip);var ge=new h({ip:Object(c.a)(),hostname:"I.I.I.I",organizationName:"I.I.I.I",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(340,365),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:3});ge.messages.push("democracy-is-dead.lit"),v(ge),s.a.addIp(s.b.TheBlackHandServer,ge.ip);var ye=new h({ip:Object(c.a)(),hostname:"avmnite-02h",organizationName:"NiteSec",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(202,220),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:2});ye.messages.push("democracy-is-dead.lit"),v(ye),s.a.addIp(s.b.NiteSecServer,ye.ip);var fe=new h({ip:Object(c.a)(),hostname:".",organizationName:".",maxRam:16,requiredHackingSkill:Object(l.getRandomInt)(505,550),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:4});v(fe),s.a.addIp(s.b.TheDarkArmyServer,fe.ip);var be=new h({ip:Object(c.a)(),hostname:"CSEC",organizationName:"CyberSec",maxRam:8,requiredHackingSkill:Object(l.getRandomInt)(51,60),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:1});be.messages.push("democracy-is-dead.lit"),v(be),s.a.addIp(s.b.CyberSecServer,be.ip);var ve=new h({ip:Object(c.a)(),hostname:"The-Cave",organizationName:"Helios",requiredHackingSkill:925,moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:5});ve.messages.push("alpha-omega.lit"),v(ve),s.a.addIp(s.b.DaedalusServer,ve.ip);var _e=new h({ip:Object(c.a)(),hostname:s.b.WorldDaemon,organizationName:s.b.WorldDaemon,requiredHackingSkill:3e3,moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:5});v(_e),s.a.addIp(s.b.WorldDaemon,_e.ip);for(var ke=[ue,X,Q,Z,ie,re],Ee=[se,te,ee,be],Oe=[le,oe,ae,ne],Ce=[ce,J,z,Y,$,ye],we=[V,K,q,U,G,ge],Se=[D,F,H,W,de],Te=[M,R,T,pe],Re=[A,j,x],xe=[B,N,O,E,f],Ie=[L,I,S,b],Pe=[P,w,C,me],Ne=[k,_,y,m],Ae=[p,d,u,fe],Me=[he,r,i,a,n],Le=[g,t,e,ve],Be=0;Bei.a.ServerMaxGrowthRate&&(r=i.a.ServerMaxGrowthRate);const s=n*(e.serverGrowth/100)*a.a.ServerGrowthRate;var l=Math.pow(r,s*o.a.hacking_grow_mult);l<1&&(console.log("WARN: serverGrowth calculated to be less than 1"),l=1);const c=e.moneyAvailable;if(e.moneyAvailable*=l,e.moneyMax&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),e.moneyMax&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),c!==e.moneyAvailable){let t=function(e,t){let n=1+(i.a.ServerBaseGrowthRate-1)/e.hackDifficulty;n>i.a.ServerMaxGrowthRate&&(n=i.a.ServerMaxGrowthRate);const a=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*o.a.hacking_grow_mult*a)}(e,e.moneyAvailable/c);t=Math.max(0,t),e.fortify(2*i.a.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/c}function g(e){e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(r.a.NukeProgram.name),e.scripts.forEach(function(e){e.updateRamUsage()}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")}h.prototype.setMaxRam=function(e){this.maxRam=e},h.prototype.getServerOnNetwork=function(e){if(!(e>this.serversOnNetwork.length))return y[this.serversOnNetwork[e]];console.log("Tried to get server on network that was out of range")},h.prototype.getScript=function(e){for(var t=0;t1e6&&(this.hackDifficulty=1e6)},h.prototype.fortify=function(e){this.hackDifficulty+=e,this.capDifficulty()},h.prototype.weaken=function(e){this.hackDifficulty-=e*a.a.ServerWeakenRate,this.capDifficulty()},h.prototype.toJSON=function(){return Object(u.Generic_toJSON)("Server",this)},h.fromJSON=function(e){return Object(u.Generic_fromJSON)(h,e.data)},u.Reviver.constructors.Server=h;let y={};function f(){for(var e in y)delete y[e];y={}}function b(e){y=JSON.parse(e,u.Reviver)}function v(e){var t=e.ip;if(Object(c.b)(t))throw console.log("IP of server that's being added: "+t),console.log("Hostname of the server thats being added: "+e.hostname),console.log("The server that already has this IP is: "+y[t].hostname),new Error("Error: Trying to add a server with an existing IP");y[t]=e}function _(e){for(var t in y)if(y.hasOwnProperty(t)&&y[t].hostname==e)return y[t];return null}function k(e){return Object(d.isValidIPAddress)(e)?void 0!==y[e]?y[e]:null:_(e)}function E(e,t,n){this.s=e,this.p=t,this.c=[],this.n=n,this.d=t.d+1,this.scrs=[],this.pgms=[],this.msgs=[]}E.prototype.createSubdir=function(e){new E(this.s,this,e)},E.prototype.getPath=function(e){for(var t=[],n=this;null!==n;)t.unshift(n.n,"/"),n=n.parent;return t.unshift("/"),t.join("")}},function(e,t,n){"use strict";function a(e,t){var n;return null==t?(console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0):"object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data&&"function"==typeof(n=a.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON?n.fromJSON(t):t}function i(e,t,n){var a,i,r;for(n||(n=Object.keys(t)),a={},i=0;i0&&t>=n;)++e,t-=n,n*=a.a.FactionReputationToFavorMult;return[e,t]},o.prototype.toJSON=function(){return Object(r.Generic_toJSON)("Company",this)},o.fromJSON=function(e){return Object(r.Generic_fromJSON)(o,e.data)},r.Reviver.constructors.Company=o,s.prototype.setPerformanceParameters=function(e,t,n,a,i,r,o=1){e+t+n+a+i+r==100?(this.hackingEffectiveness=e,this.strengthEffectiveness=t,this.defenseEffectiveness=n,this.dexterityEffectiveness=a,this.agilityEffectiveness=i,this.charismaEffectiveness=r,this.positionMultiplier=o):console.log("CompanyPosition.setPerformanceParameters() arguments do not total to 100")},s.prototype.setExperienceGains=function(e,t,n,a,i,r){this.hackingExpGain=e,this.strengthExpGain=t,this.defenseExpGain=n,this.dexterityExpGain=a,this.agilityExpGain=i,this.charismaExpGain=r},s.prototype.calculateJobPerformance=function(e,t,n,i,r,o){var s=this.hackingEffectiveness*e/a.a.MaxSkillLevel,l=this.strengthEffectiveness*t/a.a.MaxSkillLevel,c=this.defenseEffectiveness*n/a.a.MaxSkillLevel,u=this.dexterityEffectiveness*i/a.a.MaxSkillLevel,d=this.agilityEffectiveness*r/a.a.MaxSkillLevel,h=this.charismaEffectiveness*o/a.a.MaxSkillLevel,p=this.positionMultiplier*(s+l+c+u+d+h)/100;return isNaN(p)&&(console.log("ERROR: Code should not reach here"),p=(s+l+c+u+d+h)/100),p},s.prototype.isSoftwareJob=function(){return"Software Engineering Intern"==this.positionName||"Junior Software Engineer"==this.positionName||"Senior Software Engineer"==this.positionName||"Lead Software Developer"==this.positionName||"Head of Software"==this.positionName||"Head of Engineering"==this.positionName||"Vice President of Technology"==this.positionName||"Chief Technology Officer"==this.positionName},s.prototype.isITJob=function(){return"IT Intern"==this.positionName||"IT Analyst"==this.positionName||"IT Manager"==this.positionName||"Systems Administrator"==this.positionName},s.prototype.isSecurityEngineerJob=function(){return"Security Engineer"==this.positionName},s.prototype.isNetworkEngineerJob=function(){return"Network Engineer"==this.positionName||"Network Administrator"==this.positionName},s.prototype.isBusinessJob=function(){return"Business Intern"==this.positionName||"Business Analyst"==this.positionName||"Business Manager"==this.positionName||"Operations Manager"==this.positionName||"Chief Financial Officer"==this.positionName||"Chief Executive Officer"==this.positionName},s.prototype.isSecurityJob=function(){return"Security Guard"==this.positionName||"Police Officer"==this.positionName||"Security Officer"==this.positionName||"Security Supervisor"==this.positionName||"Head of Security"==this.positionName},s.prototype.isAgentJob=function(){return"Field Agent"==this.positionName||"Secret Agent"==this.positionName||"Special Operative"==this.positionName},s.prototype.isSoftwareConsultantJob=function(){return"Software Consultant"==this.positionName||"Senior Software Consultant"==this.positionName},s.prototype.isBusinessConsultantJob=function(){return"Business Consultant"==this.positionName||"Senior Business Consultant"==this.positionName},s.prototype.isPartTimeJob=function(){return!(!this.isSoftwareConsultantJob()&&!this.isBusinessConsultantJob()&&"Part-time Waiter"!=this.positionName&&"Part-time Employee"!=this.positionName)},s.prototype.toJSON=function(){return Object(r.Generic_toJSON)("CompanyPosition",this)},s.fromJSON=function(e){return Object(r.Generic_fromJSON)(s,e.data)},r.Reviver.constructors.CompanyPosition=s;let l={SoftwareIntern:new s("Software Engineering Intern",1,0,0,0,0,0,0,33),JuniorDev:new s("Junior Software Engineer",51,0,0,0,0,0,8e3,80),SeniorDev:new s("Senior Software Engineer",251,0,0,0,0,51,4e4,165),LeadDev:new s("Lead Software Developer",401,0,0,0,0,151,2e5,500),FreelanceDeveloper:new s("Freelance Developer",0,0,0,0,0,0,0,0),SoftwareConsultant:new s("Software Consultant",51,0,0,0,0,0,0,66),SeniorSoftwareConsultant:new s("Senior Software Consultant",251,0,0,0,0,51,0,132),ITIntern:new s("IT Intern",1,0,0,0,0,0,0,26),ITAnalyst:new s("IT Analyst",26,0,0,0,0,0,7e3,66),ITManager:new s("IT Manager",151,0,0,0,0,51,35e3,132),SysAdmin:new s("Systems Administrator",251,0,0,0,0,76,175e3,410),SecurityEngineer:new s("Security Engineer",151,0,0,0,0,26,35e3,121),NetworkEngineer:new s("Network Engineer",151,0,0,0,0,26,35e3,121),NetworkAdministrator:new s("Network Administrator",251,0,0,0,0,76,175e3,410),HeadOfSoftware:new s("Head of Software",501,0,0,0,0,251,4e5,800),HeadOfEngineering:new s("Head of Engineering",501,0,0,0,0,251,8e5,1650),VicePresident:new s("Vice President of Technology",601,0,0,0,0,401,16e5,2310),CTO:new s("Chief Technology Officer",751,0,0,0,0,501,32e5,2640),BusinessIntern:new s("Business Intern",1,0,0,0,0,1,0,46),BusinessAnalyst:new s("Business Analyst",6,0,0,0,0,51,8e3,100),BusinessManager:new s("Business Manager",51,0,0,0,0,101,4e4,200),OperationsManager:new s("Operations Manager",51,0,0,0,0,226,2e5,660),CFO:new s("Chief Financial Officer",76,0,0,0,0,501,8e5,1950),CEO:new s("Chief Executive Officer",101,0,0,0,0,751,32e5,3900),BusinessConsultant:new s("Business Consultant",6,0,0,0,0,51,0,88),SeniorBusinessConsultant:new s("Senior Business Consultant",51,0,0,0,0,226,0,525),PartTimeWaiter:new s("Part-time Waiter",0,0,0,0,0,0,0,20),PartTimeEmployee:new s("Part-time Employee",0,0,0,0,0,0,0,20),Waiter:new s("Waiter",0,0,0,0,0,0,0,22),Employee:new s("Employee",0,0,0,0,0,0,0,22),PoliceOfficer:new s("Police Officer",11,101,101,101,101,51,8e3,82),PoliceChief:new s("Police Chief",101,301,301,301,301,151,36e3,460),SecurityGuard:new s("Security Guard",0,51,51,51,51,1,0,50),SecurityOfficer:new s("Security Officer",26,151,151,151,151,51,8e3,195),SecuritySupervisor:new s("Security Supervisor",26,251,251,251,251,101,36e3,660),HeadOfSecurity:new s("Head of Security",51,501,501,501,501,151,144e3,1320),FieldAgent:new s("Field Agent",101,101,101,101,101,101,8e3,330),SecretAgent:new s("Secret Agent",201,251,251,251,251,201,32e3,990),SpecialOperative:new s("Special Operative",251,501,501,501,501,251,162e3,2e3),init:function(){l.SoftwareIntern.setPerformanceParameters(85,0,0,0,0,15,.9),l.SoftwareIntern.setExperienceGains(.05,0,0,0,0,.02),l.JuniorDev.setPerformanceParameters(85,0,0,0,0,15,1.1),l.JuniorDev.setExperienceGains(.1,0,0,0,0,.05),l.SeniorDev.setPerformanceParameters(80,0,0,0,0,20,1.3),l.SeniorDev.setExperienceGains(.4,0,0,0,0,.08),l.LeadDev.setPerformanceParameters(75,0,0,0,0,25,1.5),l.LeadDev.setExperienceGains(.8,0,0,0,0,.1),l.SoftwareConsultant.setPerformanceParameters(80,0,0,0,0,20,1),l.SoftwareConsultant.setExperienceGains(.08,0,0,0,0,.03),l.SeniorSoftwareConsultant.setPerformanceParameters(75,0,0,0,0,25,1.2),l.SeniorSoftwareConsultant.setExperienceGains(.25,0,0,0,0,.06),l.ITIntern.setPerformanceParameters(90,0,0,0,0,10,.9),l.ITIntern.setExperienceGains(.04,0,0,0,0,.01),l.ITAnalyst.setPerformanceParameters(85,0,0,0,0,15,1.1),l.ITAnalyst.setExperienceGains(.08,0,0,0,0,.02),l.ITManager.setPerformanceParameters(80,0,0,0,0,20,1.3),l.ITManager.setExperienceGains(.3,0,0,0,0,.1),l.SysAdmin.setPerformanceParameters(80,0,0,0,0,20,1.4),l.SysAdmin.setExperienceGains(.5,0,0,0,0,.05),l.SecurityEngineer.setPerformanceParameters(85,0,0,0,0,15,1.2),l.SecurityEngineer.setExperienceGains(.4,0,0,0,0,.05),l.NetworkEngineer.setPerformanceParameters(85,0,0,0,0,15,1.2),l.NetworkEngineer.setExperienceGains(.4,0,0,0,0,.05),l.NetworkAdministrator.setPerformanceParameters(80,0,0,0,0,20,1.3),l.NetworkAdministrator.setExperienceGains(.5,0,0,0,0,.1),l.HeadOfSoftware.setPerformanceParameters(75,0,0,0,0,25,1.6),l.HeadOfSoftware.setExperienceGains(1,0,0,0,0,.5),l.HeadOfEngineering.setPerformanceParameters(75,0,0,0,0,25,1.6),l.HeadOfEngineering.setExperienceGains(1.1,0,0,0,0,.5),l.VicePresident.setPerformanceParameters(70,0,0,0,0,30,1.75),l.VicePresident.setExperienceGains(1.2,0,0,0,0,.6),l.CTO.setPerformanceParameters(65,0,0,0,0,35,2),l.CTO.setExperienceGains(1.5,0,0,0,0,1),l.BusinessIntern.setPerformanceParameters(10,0,0,0,0,90,.9),l.BusinessIntern.setExperienceGains(.01,0,0,0,0,.08),l.BusinessAnalyst.setPerformanceParameters(15,0,0,0,0,85,1.1),l.BusinessAnalyst.setExperienceGains(.02,0,0,0,0,.15),l.BusinessManager.setPerformanceParameters(15,0,0,0,0,85,1.3),l.BusinessManager.setExperienceGains(.02,0,0,0,0,.3),l.OperationsManager.setPerformanceParameters(15,0,0,0,0,85,1.5),l.OperationsManager.setExperienceGains(.02,0,0,0,0,.4),l.CFO.setPerformanceParameters(10,0,0,0,0,90,1.6),l.CFO.setExperienceGains(.05,0,0,0,0,1),l.CEO.setPerformanceParameters(10,0,0,0,0,90,1.75),l.CEO.setExperienceGains(.1,0,0,0,0,1.5),l.BusinessConsultant.setPerformanceParameters(20,0,0,0,0,80,1),l.BusinessConsultant.setExperienceGains(.015,0,0,0,0,.15),l.SeniorBusinessConsultant.setPerformanceParameters(15,0,0,0,0,85,1.2),l.SeniorBusinessConsultant.setExperienceGains(.015,0,0,0,0,.3),l.PartTimeWaiter.setPerformanceParameters(0,10,0,10,10,70),l.PartTimeWaiter.setExperienceGains(0,.0075,.0075,.0075,.0075,.04),l.PartTimeEmployee.setPerformanceParameters(0,10,0,10,10,70),l.PartTimeEmployee.setExperienceGains(0,.0075,.0075,.0075,.0075,.03),l.Waiter.setPerformanceParameters(0,10,0,10,10,70),l.Waiter.setExperienceGains(0,.02,.02,.02,.02,.05),l.Employee.setPerformanceParameters(0,10,0,10,10,70),l.Employee.setExperienceGains(0,.02,.02,.02,.02,.04),l.SecurityGuard.setPerformanceParameters(5,20,20,20,20,15,1),l.SecurityGuard.setExperienceGains(.01,.04,.04,.04,.04,.02),l.PoliceOfficer.setPerformanceParameters(5,20,20,20,20,15,1),l.PoliceOfficer.setExperienceGains(.02,.08,.08,.08,.08,.04),l.PoliceChief.setPerformanceParameters(5,20,20,20,20,15,1.25),l.PoliceChief.setExperienceGains(.02,.1,.1,.1,.1,.1),l.SecurityOfficer.setPerformanceParameters(10,20,20,20,20,10,1.1),l.SecurityOfficer.setExperienceGains(.02,.1,.1,.1,.1,.05),l.SecuritySupervisor.setPerformanceParameters(10,15,15,15,15,30,1.25),l.SecuritySupervisor.setExperienceGains(.02,.12,.12,.12,.12,.1),l.HeadOfSecurity.setPerformanceParameters(10,15,15,15,15,30,1.4),l.HeadOfSecurity.setExperienceGains(.05,.15,.15,.15,.15,.15),l.FieldAgent.setPerformanceParameters(10,15,15,20,20,20,1),l.FieldAgent.setExperienceGains(.04,.08,.08,.08,.08,.05),l.SecretAgent.setPerformanceParameters(15,15,15,20,20,15,1.25),l.SecretAgent.setExperienceGains(.1,.15,.15,.15,.15,.1),l.SpecialOperative.setPerformanceParameters(15,15,15,20,20,15,1.5),l.SpecialOperative.setExperienceGains(.15,.2,.2,.2,.2,.15)}};function c(e){return null==e?null:e.positionName==l.SoftwareIntern.positionName?l.JuniorDev:e.positionName==l.JuniorDev.positionName?l.SeniorDev:e.positionName==l.SeniorDev.positionName?l.LeadDev:e.positionName==l.LeadDev.positionName?l.HeadOfSoftware:e.positionName==l.SoftwareConsultant.positionName?l.SeniorSoftwareConsultant:e.positionName==l.ITIntern.positionName?l.ITAnalyst:e.positionName==l.ITAnalyst.positionName?l.ITManager:e.positionName==l.ITManager.positionName?l.SysAdmin:e.positionName==l.SysAdmin.positionName?l.HeadOfEngineering:e.positionName==l.SecurityEngineer.positionName?l.HeadOfEngineering:e.positionName==l.NetworkEngineer.positionName?l.NetworkAdministrator:e.positionName==l.NetworkAdministrator.positionName?l.HeadOfEngineering:e.positionName==l.HeadOfSoftware.positionName?l.HeadOfEngineering:e.positionName==l.HeadOfEngineering.positionName?l.VicePresident:e.positionName==l.VicePresident.positionName?l.CTO:e.positionName==l.BusinessIntern.positionName?l.BusinessAnalyst:e.positionName==l.BusinessAnalyst.positionName?l.BusinessManager:e.positionName==l.BusinessManager.positionName?l.OperationsManager:e.positionName==l.OperationsManager.positionName?l.CFO:e.positionName==l.CFO.positionName?l.CEO:e.positionName==l.BusinessConsultant.positionName?l.SeniorBusinessConsultant:e.positionName==l.PoliceOfficer.positionName?l.PoliceChief:e.positionName==l.SecurityGuard.positionName?l.SecurityOfficer:e.positionName==l.SecurityOfficer.positionName?l.SecuritySupervisor:e.positionName==l.SecuritySupervisor.positionName?l.HeadOfSecurity:e.positionName==l.FieldAgent.positionName?l.SecretAgent:e.positionName==l.SecretAgent.positionName?l.SpecialOperative:null}function u(){var e=new o(i.a.AevumECorp,3,3,249);e.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumECorp)&&(e.favor=d[i.a.AevumECorp].favor,delete d[i.a.AevumECorp]),p(e);var t=new o(i.a.Sector12MegaCorp,3,3,249);t.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12MegaCorp)&&(t.favor=d[i.a.Sector12MegaCorp].favor,delete d[i.a.Sector12MegaCorp]),p(t);var n=new o(i.a.AevumBachmanAndAssociates,2.6,2.6,224);n.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumBachmanAndAssociates)&&(n.favor=d[i.a.AevumBachmanAndAssociates].favor,delete d[i.a.AevumBachmanAndAssociates]),p(n);var a=new o(i.a.Sector12BladeIndustries,2.75,2.75,224);a.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12BladeIndustries)&&(a.favor=d[i.a.Sector12BladeIndustries].favor,delete d[i.a.Sector12BladeIndustries]),p(a);var r=new o(i.a.VolhavenNWO,2.75,2.75,249);r.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenNWO)&&(r.favor=d[i.a.VolhavenNWO].favor,delete d[i.a.VolhavenNWO]),p(r);var s=new o(i.a.AevumClarkeIncorporated,2.25,2.25,224);s.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumClarkeIncorporated)&&(s.favor=d[i.a.AevumClarkeIncorporated].favor,delete d[i.a.AevumClarkeIncorporated]),p(s);var c=new o(i.a.VolhavenOmniTekIncorporated,2.25,2.25,224);c.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenOmniTekIncorporated)&&(c.favor=d[i.a.VolhavenOmniTekIncorporated].favor,delete d[i.a.VolhavenOmniTekIncorporated]),p(c);var u=new o(i.a.Sector12FourSigma,2.5,2.5,224);u.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12FourSigma)&&(u.favor=d[i.a.Sector12FourSigma].favor,delete d[i.a.Sector12FourSigma]),p(u);var h=new o(i.a.ChongqingKuaiGongInternational,2.2,2.2,224);h.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.ChongqingKuaiGongInternational)&&(h.favor=d[i.a.ChongqingKuaiGongInternational].favor,delete d[i.a.ChongqingKuaiGongInternational]),p(h);var g=new o(i.a.AevumFulcrumTechnologies,2,2,224);g.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.AevumFulcrumTechnologies)&&(g.favor=d[i.a.AevumFulcrumTechnologies].favor,delete d[i.a.AevumFulcrumTechnologies]),p(g);var y=new o(i.a.IshimaStormTechnologies,1.8,1.8,199);y.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.IshimaStormTechnologies)&&(y.favor=d[i.a.IshimaStormTechnologies].favor,delete d[i.a.IshimaStormTechnologies]),p(y);var f=new o(i.a.NewTokyoDefComm,1.75,1.75,199);f.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.CEO]),m(i.a.NewTokyoDefComm)&&(f.favor=d[i.a.NewTokyoDefComm].favor,delete d[i.a.NewTokyoDefComm]),p(f);var b=new o(i.a.VolhavenHeliosLabs,1.8,1.8,199);b.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.CEO]),m(i.a.VolhavenHeliosLabs)&&(b.favor=d[i.a.VolhavenHeliosLabs].favor,delete d[i.a.VolhavenHeliosLabs]),p(b);var v=new o(i.a.NewTokyoVitaLife,1.8,1.8,199);v.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.NewTokyoVitaLife)&&(v.favor=d[i.a.NewTokyoVitaLife].favor,delete d[i.a.NewTokyoVitaLife]),p(v);var _=new o(i.a.Sector12IcarusMicrosystems,1.9,1.9,199);_.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.Sector12IcarusMicrosystems)&&(_.favor=d[i.a.Sector12IcarusMicrosystems].favor,delete d[i.a.Sector12IcarusMicrosystems]),p(_);var k=new o(i.a.Sector12UniversalEnergy,2,2,199);k.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.Sector12UniversalEnergy)&&(k.favor=d[i.a.Sector12UniversalEnergy].favor,delete d[i.a.Sector12UniversalEnergy]),p(k);var E=new o(i.a.AevumGalacticCybersystems,1.9,1.9,199);E.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.AevumGalacticCybersystems)&&(E.favor=d[i.a.AevumGalacticCybersystems].favor,delete d[i.a.AevumGalacticCybersystems]),p(E);var O=new o(i.a.AevumAeroCorp,1.7,1.7,199);O.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumAeroCorp)&&(O.favor=d[i.a.AevumAeroCorp].favor,delete d[i.a.AevumAeroCorp]),p(O);var C=new o(i.a.VolhavenOmniaCybersystems,1.7,1.7,199);C.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenOmniaCybersystems)&&(C.favor=d[i.a.VolhavenOmniaCybersystems].favor,delete d[i.a.VolhavenOmniaCybersystems]),p(C);var w=new o(i.a.ChongqingSolarisSpaceSystems,1.7,1.7,199);w.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.ChongqingSolarisSpaceSystems)&&(w.favor=d[i.a.ChongqingSolarisSpaceSystems].favor,delete d[i.a.ChongqingSolarisSpaceSystems]),p(w);var S=new o(i.a.Sector12DeltaOne,1.6,1.6,199);S.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12DeltaOne)&&(S.favor=d[i.a.Sector12DeltaOne].favor,delete d[i.a.Sector12DeltaOne]),p(S);var T=new o(i.a.NewTokyoGlobalPharmaceuticals,1.8,1.8,224);T.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.NewTokyoGlobalPharmaceuticals)&&(T.favor=d[i.a.NewTokyoGlobalPharmaceuticals].favor,delete d[i.a.NewTokyoGlobalPharmaceuticals]),p(T);var R=new o(i.a.IshimaNovaMedical,1.75,1.75,199);R.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.IshimaNovaMedical)&&(R.favor=d[i.a.IshimaNovaMedical].favor,delete d[i.a.IshimaNovaMedical]),p(R);var x=new o(i.a.Sector12CIA,2,2,149);x.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12CIA)&&(x.favor=d[i.a.Sector12CIA].favor,delete d[i.a.Sector12CIA]),p(x);var I=new o(i.a.Sector12NSA,2,2,149);I.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12NSA)&&(I.favor=d[i.a.Sector12NSA].favor,delete d[i.a.Sector12NSA]),p(I);var P=new o(i.a.AevumWatchdogSecurity,1.5,1.5,124);P.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.AevumWatchdogSecurity)&&(P.favor=d[i.a.AevumWatchdogSecurity].favor,delete d[i.a.AevumWatchdogSecurity]),p(P);var N=new o(i.a.VolhavenLexoCorp,1.4,1.4,99);N.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.HeadOfSoftware,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.HeadOfSecurity]),m(i.a.VolhavenLexoCorp)&&(N.favor=d[i.a.VolhavenLexoCorp].favor,delete d[i.a.VolhavenLexoCorp]),p(N);var A=new o(i.a.AevumRhoConstruction,1.3,1.3,49);A.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.a.AevumRhoConstruction)&&(A.favor=d[i.a.AevumRhoConstruction].favor,delete d[i.a.AevumRhoConstruction]),p(A);var M=new o(i.a.Sector12AlphaEnterprises,1.5,1.5,99);M.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.a.Sector12AlphaEnterprises)&&(M.favor=d[i.a.Sector12AlphaEnterprises].favor,delete d[i.a.Sector12AlphaEnterprises]),p(M);var L=new o(i.a.AevumPolice,1.3,1.3,99);L.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SecurityGuard,l.PoliceOfficer]),m(i.a.AevumPolice)&&(L.favor=d[i.a.AevumPolice].favor,delete d[i.a.AevumPolice]),p(L);var B=new o(i.a.VolhavenSysCoreSecurities,1.3,1.3,124);B.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.VolhavenSysCoreSecurities)&&(B.favor=d[i.a.VolhavenSysCoreSecurities].favor,delete d[i.a.VolhavenSysCoreSecurities]),p(B);var j=new o(i.a.VolhavenCompuTek,1.2,1.2,74);j.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.VolhavenCompuTek)&&(j.favor=d[i.a.VolhavenCompuTek].favor,delete d[i.a.VolhavenCompuTek]),p(j);var D=new o(i.a.AevumNetLinkTechnologies,1.2,1.2,99);D.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.AevumNetLinkTechnologies)&&(D.favor=d[i.a.AevumNetLinkTechnologies].favor,delete d[i.a.AevumNetLinkTechnologies]),p(D);var F=new o(i.a.Sector12CarmichaelSecurity,1.2,1.2,74);F.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12CarmichaelSecurity)&&(F.favor=d[i.a.Sector12CarmichaelSecurity].favor,delete d[i.a.Sector12CarmichaelSecurity]),p(F);var H=new o(i.a.Sector12FoodNStuff,1,1,0);H.addPositions([l.Employee,l.PartTimeEmployee]),m(i.a.Sector12FoodNStuff)&&(H.favor=d[i.a.Sector12FoodNStuff].favor,delete d[i.a.Sector12FoodNStuff]),p(H);var W=new o(i.a.Sector12JoesGuns,1,1,0);W.addPositions([l.Employee,l.PartTimeEmployee]),m(i.a.Sector12JoesGuns)&&(W.favor=d[i.a.Sector12JoesGuns].favor,delete d[i.a.Sector12JoesGuns]),p(W);var G=new o(i.a.IshimaOmegaSoftware,1.1,1.1,49);G.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.CTO,l.CEO]),m(i.a.IshimaOmegaSoftware)&&(G.favor=d[i.a.IshimaOmegaSoftware].favor,delete d[i.a.IshimaOmegaSoftware]),p(G);var U=new o(i.a.NewTokyoNoodleBar,1,1,0);U.addPositions([l.Waiter,l.PartTimeWaiter]),m(i.a.NewTokyoNoodleBar)&&(U.favor=d[i.a.NewTokyoNoodleBar].favor,delete d[i.a.NewTokyoNoodleBar]),p(U)}let d={};function h(e){d=JSON.parse(e,r.Reviver)}function p(e){var t=e.companyName;d[t]=e}function m(e){return d.hasOwnProperty(e)}function g(e,t,n=!1){var a="",i=e.jobStatReqOffset,r=t.requiredHacking>0?t.requiredHacking+i:0,o=t.requiredStrength>0?t.requiredStrength+i:0,s=t.requiredDefense>0?t.requiredDefense+i:0,l=t.requiredDexterity>0?t.requiredDexterity+i:0,c=t.requiredDexterity>0?t.requiredDexterity+i:0,u=t.requiredCharisma>0?t.requiredCharisma+i:0,d=t.requiredReputation;return n?(a="Requires:
",a+=r.toString()+" hacking
",a+=o.toString()+" strength
",a+=s.toString()+" defense
",a+=l.toString()+" dexterity
",a+=c.toString()+" agility
",a+=u.toString()+" charisma
",a+=d.toString()+" reputation"):(a="(Requires ",r>0&&(a+=r+" 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, "),d>1&&(a+=d+" reputation, "),a=a.substring(0,a.length-2),a+=")"),a}},function(e,t,n){"use strict";n.d(t,"e",function(){return L}),n.d(t,"b",function(){return k}),n.d(t,"f",function(){return C}),n.d(t,"g",function(){return S}),n.d(t,"h",function(){return T}),n.d(t,"c",function(){return R}),n.d(t,"j",function(){return B}),n.d(t,"i",function(){return E}),n.d(t,"a",function(){return _}),n.d(t,"k",function(){return M}),n.d(t,"d",function(){return O});var a=n(18),i=n(16),r=n(1),o=n(6),s=n(86),l=(n(4),n(39)),c=n(0),u=n(22),d=n(8),h=n(97),p=n(27),m=n(3),g=n(10),y=n(14),f=n.n(y),b=n(2),v=n(15);function _(e=""){this.name=e,this.augmentations=[],this.isMember=!1,this.isBanned=!1,this.playerReputation=0,this.alreadyInvited=!1,this.favor=0,this.rolloverRep=0}_.prototype.getInfo=function(){const e=s.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},_.prototype.gainFavor=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);var e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.log("Error: invalid result from getFavorGain() function")},_.prototype.getFavorGain=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);for(var e=0,t=this.playerReputation+this.rolloverRep,n=r.a.FactionReputationToFavorBase*Math.pow(r.a.FactionReputationToFavorMult,this.favor);t>0&&t>=n;)++e,t-=n,n*=r.a.FactionReputationToFavorMult;return[e,t]},_.prototype.addAllAugmentations=function(){for(var e in this.augmentations.length=0,a.c)a.c.hasOwnProperty(e)&&this.augmentations.push(e)},_.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Faction",this)},_.fromJSON=function(e){return Object(g.Generic_fromJSON)(_,e.data)},g.Reviver.constructors.Faction=_;let k={};function E(e){k=JSON.parse(e,g.Reviver)}function O(e){return k.hasOwnProperty(e)}function C(){for(const e in s.FactionInfos)w(new _(e))}function w(e){if(!(e instanceof _))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");var t,n,a=e.name;O(a)&&(e.favor=k[a].favor,delete k[a]),n=(t=e).name,k[n]=t}function S(e){u.a.SuppressFactionInvites?(e.alreadyInvited=!0,c.a.factionInvitations.push(e.name),o.Engine.currentPage===o.Engine.Page.Factions&&o.Engine.loadFactionsContent()):Object(h.a)(e)}function T(e){e.isMember=!0,c.a.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];k[n].isBanned=!0}}function R(e){var t=k[e];if(null==t)throw new Error("Invalid factionName passed into displayFactionContent: "+e);var n=t.getInfo();Object(p.removeChildrenFromElement)(o.Engine.Display.factionContent);var a=[];a.push(Object(m.createElement)("h1",{innerText:e})),a.push(Object(m.createElement)("pre",{innerHTML:""+n.infoText+""})),a.push(Object(m.createElement)("p",{innerText:"---------------"}));var s=t.getFavorGain();2!=s.length&&(s=0),s=s[0],a.push(Object(m.createElement)("p",{innerText:"Reputation: "+Object(b.formatNumber)(t.playerReputation,4),tooltip:"You will earn "+Object(b.formatNumber)(s,0)+" faction favor upon resetting after installing an Augmentation"})),a.push(Object(m.createElement)("p",{innerText:"---------------"})),a.push(Object(m.createElement)("p",{innerText:"Faction Favor: "+Object(b.formatNumber)(t.favor,0),tooltip:"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the faction"})),a.push(Object(m.createElement)("p",{innerText:"---------------"})),a.push(Object(m.createElement)("pre",{id:"faction-work-description-text",innerText:"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. Note that you cannot use your terminal or create scripts when you are performing a task!"})),a.push(Object(m.createElement)("br"));var u=Object(m.createElement)("div",{id:"faction-hack-mission-div",class:"faction-work-div"}),h=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});u.appendChild(h),h.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Hacking Mission",clickListener:()=>{o.Engine.loadMissionContent();var e=new l.a(t.playerReputation,t);return Object(l.d)(!0,e),e.init(),!1}})),h.appendChild(Object(m.createElement)("p",{innerText:"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+)"})),a.push(u);var g=Object(m.createElement)("div",{id:"faction-hack-div",class:"faction-work-div"}),y=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});g.appendChild(y),y.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Hacking Contracts",clickListener:()=>(c.a.startFactionHackWork(t),!1)})),y.appendChild(Object(m.createElement)("p",{innerText:"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."})),a.push(g);var _=Object(m.createElement)("div",{id:"faction-fieldwork-div",class:"faction-work-div"}),E=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});_.appendChild(E),E.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Field Work",clickListener:()=>(c.a.startFactionFieldWork(t),!1)})),E.appendChild(Object(m.createElement)("p",{innerText:"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."})),a.push(_);var O=Object(m.createElement)("div",{id:"faction-securitywork-div",class:"faction-work-div"}),C=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});O.appendChild(C),C.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Security Work",clickListener:()=>(c.a.startFactionSecurityWork(t),!1)})),C.appendChild(Object(m.createElement)("p",{innerText:"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."})),a.push(O);var w=Object(m.createElement)("div",{id:"faction-donate-div",class:"faction-work-div"}),S=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});w.appendChild(S);var T=Object(m.createElement)("p",{innerText:"This donation will result in 0.000 reputation gain"}),x=Object(m.createElement)("input",{placeholder:"Donation amount",inputListener:()=>{let e=0;if(""!==x.value&&(e=parseFloat(x.value)),isNaN(e))T.innerText="Invalid donate amount entered!";else{var t=e/1e6*c.a.faction_rep_mult;T.innerText="This donation will result in "+Object(b.formatNumber)(t,3)+" reputation gain"}}});if(S.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Donate Money",clickListener:()=>{var n=parseFloat(x.value);if(isNaN(n)||n<0)Object(d.dialogBoxCreate)("Invalid amount entered!");else if(c.a.money.lt(n))Object(d.dialogBoxCreate)("You cannot afford to donate this much money!");else{c.a.loseMoney(n);var a=n/1e6*c.a.faction_rep_mult;t.playerReputation+=a,Object(d.dialogBoxCreate)("You just donated "+f()(n).format("$0.000a")+" to "+t.name+" to gain "+Object(b.formatNumber)(a,3)+" reputation"),R(e)}}})),S.appendChild(x),S.appendChild(T),a.push(w),a.push(Object(m.createElement)("pre",{innerHTML:"
As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.

"})),a.push(Object(m.createElement)("a",{class:"a-link-button",innerText:"Purchase Augmentations",clickListener:()=>(o.Engine.hideAllContent(),o.Engine.Display.factionAugmentationsContent.style.display="block",I(e),!1)})),2!=c.a.bitNodeN||"Slum Snakes"!=e&&"Tetrads"!=e&&"The Syndicate"!=e&&"The Dark Army"!=e&&"Speakers for the Dead"!=e&&"NiteSec"!=e&&"The Black Hand"!=e){if(!t.isMember)throw new Error("Not a member of this faction, cannot display faction information");w.style.display=t.favor>=Math.floor(r.a.BaseFavorToDonate*i.a.RepToDonateToFaction)?"inline":"none",u.style.display=n.offerHackingMission?"inline":"none",g.style.display=n.offerHackingWork?"inline":"none",_.style.display=n.offerFieldWork?"inline":"none",O.style.display=n.offerSecurityWork?"inline":"none";for(A=0;A{if(c.a.inGang())o.Engine.loadGangContent();else{var t=Object(v.d)(),n=Object(v.c)();t.innerHTML="Create Gang",n.innerHTML="Cancel",t.addEventListener("click",()=>{var t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0),c.a.startGang(e,t),document.getElementById("gang-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),o.Engine.loadGangContent(),Object(v.a)()}),n.addEventListener("click",()=>{Object(v.a)()}),Object(v.b)("Would you like to create a new Gang with "+e+"?

Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. There are NO differences between the Factions you can create a Gang with and each of these Factions have all Augmentations available")}}})),N.appendChild(Object(m.createElement)("p",{innerText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation."})),a.splice(7,1,P),c.a.inGang()&&c.a.gang.facName!=e&&(P.style.display="none");for(var A=0;A(o.Engine.loadFactionContent(),R(e),!1)})),n.push(Object(m.createElement)("h1",{innerText:"Faction Augmentations"})),n.push(Object(m.createElement)("p",{id:"faction-augmentations-page-desc",innerHTML:"Lists all Augmentations that are available to purchase from "+e+"

Augmentations are powerful upgrades that will enhance your abilities."})),n.push(Object(m.createElement)("br")),n.push(Object(m.createElement)("br"));var i=Object(m.createElement)("ul"),r=Object(m.createElement)("a",{innerText:"Sort by Cost",class:"a-link-button",clickListener:()=>{x="cost";var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.c[e],i=a.c[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseCost-i.baseCost}),Object(p.removeChildrenFromElement)(i),P(i,e,t)}}),s=Object(m.createElement)("a",{innerText:"Sort by Reputation",class:"a-link-button",clickListener:()=>{x="reputation";var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.c[e],i=a.c[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-i.baseRepRequirement}),Object(p.removeChildrenFromElement)(i),P(i,e,t)}}),l=Object(m.createElement)("a",{innerText:"Sort by Default Order",class:"a-link-button",clickListener:()=>{x="default",Object(p.removeChildrenFromElement)(i),P(i,t.augmentations,t)}});switch(n.push(r),n.push(s),n.push(l),x){case"cost":r.click();break;case"reputation":s.click();break;default:l.click()}n.push(i);for(var c=0;c(u.a.SuppressBuyAugmentationConfirmation?M(o,n):N(o,n),!1)});o.name==a.b.NeuroFluxGovernor&&(g.innerText+=" - Level "+L());var y=Object(m.createElement)("p",{display:"inline"}),v=o.baseRepRequirement*i.augmentationRepRequirementMult;A(o)?o.name!=a.b.NeuroFluxGovernor&&(o.owned||s)?(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="ALREADY OWNED"):n.playerReputation>=v?(g.setAttribute("class","a-link-button"),y.innerHTML="UNLOCKED - "+f()(o.baseCost*i.augmentationPriceMult).format("$0.000a")):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+Object(b.formatNumber)(v,1)+" faction reputation) - "+f()(o.baseCost*i.augmentationPriceMult).format("$0.000a"),y.style.color="red"):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+o.prereqs.join(",")+" as prerequisite(s))",y.style.color="red"),p.appendChild(g),h.appendChild(p),h.appendChild(y),d.appendChild(h),e.appendChild(d)}()}function N(e,t){const n=t.getInfo();var a=Object(v.d)(),i=Object(v.c)();a.innerHTML="Purchase",i.innerHTML="Cancel",a.addEventListener("click",function(){M(e,t)}),i.addEventListener("click",function(){Object(v.a)()}),Object(v.b)("

"+e.name+"


"+e.info+"


Would you like to purchase the "+e.name+" Augmentation for $"+Object(b.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function A(e){var t=!0;if(e.prereqs&&e.prereqs.length>0)for(var n=0;n
This is the first BitNode that you play through. It has no special modifications or mechanics.

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:

Level 1: 16%
Level 2: 24%
Level 3: 28%"),r.BitNode2=new i(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.

Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050's. 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.

In this BitNode:

The maximum amount of money available on a server is significantly decreased
The amount of money gained from crimes and Infiltration is tripled
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
Every Augmentation in the game will be available through the Factions listed above
For every Faction NOT listed above, reputation gains are halved
You will no longer gain passive reputation with Factions

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 increases the player's crime success rate, crime money, and charisma multipliers by:

Level 1: 20%
Level 2: 30%
Level 3: 35%"),r.BitNode3=new i(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.

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.

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:

The price and reputation cost of all Augmentations is tripled
The starting and maximum amount of money on servers is reduced by 75%
Server growth rate is reduced by 80%
You will start out with $150b so that you can start your corporation
You now only need 75 favour with a faction in order to donate to it, rather than 150

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:
Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode4=new i(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.

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.

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.

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."),r.BitNode5=new i(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.

In this BitNode:

The base security level of servers is doubled
The starting money on servers is halved, but the maximum money remains the same
Most methods of earning money now give significantly less
Infiltration gives 50% more reputation and money
Corporations have 50% lower valuations and are therefore less profitable
Augmentations are more expensive
Hacking experience gain rates are reduced

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.

In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will also raise all of your hacking-related multipliers by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode6=new i(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.

In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:

Hacking and Hacknet Nodes will be significantly less profitable
Your hacking level is reduced by 50%
Hacking experience gain from scripts is reduced by 75%
Corporations have 80% lower valuations and are therefore less profitable
Working for companies is 50% less profitable
Crimes and Infiltration are 50% less profitable

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:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode7=new i(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.

In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore:

The rank you gain from Bladeburner contracts/operations is reduced by 40%
Bladeburner skills cost twice as many skill points
Augmentations are 3x more expensive
Hacking and Hacknet Nodes will be significantly less profitable
Your hacking level is reduced by 50%
Hacking experience gain from scripts is reduced by 75%
Corporations have 80% lower valuations and are therefore less profitable
Working for companies is 50% less profitable
Crimes and Infiltration are 50% less profitable

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:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),r.BitNode8=new i(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.

In this BitNode:

You start with $100 million
The only way to earn money is by trading on the stock market
You start with a WSE membership and access to the TIX API
You are able to short stocks and place different types of orders (limit/stop)
You can immediately donate to factions to gain reputation

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:

Level 1: Permanent access to WSE and TIX API
Level 2: Ability to short stocks in other BitNodes
Level 3: Ability to use limit/stop orders in other BitNodes

This Source-File also increases your hacking growth multipliers by:
Level 1: 12%
Level 2: 18%
Level 3: 21%"),r.BitNode9=new i(9,"Do Androids Dream?","COMING SOON"),r.BitNode10=new i(10,"MegaCorp","COMING SOON"),r.BitNode11=new i(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.

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.

In this BitNode:

The starting and maximum amount of money available on servers is significantly decreased
The growth rate of servers is halved
Weakening a server is twice as effective
Company wages are decreased by 50%
Corporation valuations are 99% lower and are therefore significantly less profitable
Hacknet Node production is significantly decreased
Crime and Infiltration are more lucrative
Augmentations are twice as expensive

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:

Level 1: 24%
Level 2: 36%
Level 3: 42%"),r.BitNode12=new i(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.

Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give your Souce-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 will increase all of your multipliers by 1%. This effect is multiplicative with itself. In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)"),r.BitNode13=new i(13,"fOS","COMING SOON"),r.BitNode14=new i(14,"","COMING SOON"),r.BitNode15=new i(15,"","COMING SOON"),r.BitNode16=new i(16,"","COMING SOON"),r.BitNode17=new i(17,"","COMING SOON"),r.BitNode18=new i(18,"","COMING SOON"),r.BitNode19=new i(19,"","COMING SOON"),r.BitNode20=new i(20,"","COMING SOON"),r.BitNode21=new i(21,"","COMING SOON"),r.BitNode22=new i(22,"","COMING SOON"),r.BitNode23=new i(23,"","COMING SOON"),r.BitNode24=new i(24,"","COMING SOON")}let s={HackingLevelMultiplier:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerGrowthRate:1,ServerWeakenRate:1,ServerStartingSecurity:1,ManualHackMoney:1,ScriptHackMoney:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,CompanyWorkExpGain:1,ClassGymExpGain:1,FactionWorkExpGain:1,HackExpGain:1,CrimeExpGain:1,FactionWorkRepGain:1,FactionPassiveRepGain:1,RepToDonateToFaction:1,AugmentationRepCost:1,AugmentationMoneyCost:1,InfiltrationMoney:1,InfiltrationRep:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1};function l(){for(var e in null==a.a.bitNodeN&&(a.a.bitNodeN=1),s)s.hasOwnProperty(e)&&(s[e]=1);switch(a.a.bitNodeN){case 1:break;case 2:s.ServerMaxMoney=.2,s.ServerStartingMoney=.4,s.CrimeMoney=3,s.InfiltrationMoney=3,s.FactionWorkRepGain=.5,s.FactionPassiveRepGain=0;break;case 3:s.RepToDonateToFaction=.5,s.AugmentationRepCost=3,s.AugmentationMoneyCost=3,s.ServerMaxMoney=.2,s.ServerStartingMoney=.2,s.ServerGrowthRate=.2,s.ScriptHackMoney=.2,s.CompanyWorkMoney=.25,s.CrimeMoney=.25,s.HacknetNodeMoney=.25;break;case 4:s.ServerMaxMoney=.15,s.ServerStartingMoney=.75,s.ScriptHackMoney=.2,s.CompanyWorkMoney=.1,s.CrimeMoney=.2,s.HacknetNodeMoney=.05,s.CompanyWorkExpGain=.5,s.ClassGymExpGain=.5,s.FactionWorkExpGain=.5,s.HackExpGain=.4,s.CrimeExpGain=.5,s.FactionWorkRepGain=.75;break;case 5:s.ServerMaxMoney=2,s.ServerStartingSecurity=2,s.ServerStartingMoney=.5,s.ScriptHackMoney=.15,s.HacknetNodeMoney=.2,s.CrimeMoney=.5,s.InfiltrationRep=1.5,s.InfiltrationMoney=1.5,s.AugmentationMoneyCost=2,s.HackExpGain=.5,s.CorporationValuation=.5;break;case 6:s.HackingLevelMultiplier=.5,s.ServerMaxMoney=.5,s.ServerStartingMoney=.5,s.ServerStartingSecurity=1.5,s.ScriptHackMoney=.5,s.CompanyWorkMoney=.5,s.CrimeMoney=.5,s.InfiltrationMoney=.5,s.CorporationValuation=.2,s.HacknetNodeMoney=.2,s.FactionPassiveRepGain=0,s.HackExpGain=.25;break;case 7:s.BladeburnerRank=.6,s.BladeburnerSkillCost=2,s.AugmentationMoneyCost=3,s.HackingLevelMultiplier=.5,s.ServerMaxMoney=.5,s.ServerStartingMoney=.5,s.ServerStartingSecurity=1.5,s.ScriptHackMoney=.5,s.CompanyWorkMoney=.5,s.CrimeMoney=.5,s.InfiltrationMoney=.5,s.CorporationValuation=.2,s.HacknetNodeMoney=.2,s.FactionPassiveRepGain=0,s.HackExpGain=.25;break;case 8:s.ScriptHackMoney=0,s.ManualHackMoney=0,s.CompanyWorkMoney=0,s.CrimeMoney=0,s.HacknetNodeMoney=0,s.InfiltrationMoney=0,s.RepToDonateToFaction=0,s.CorporationValuation=0;break;case 11:s.ServerMaxMoney=.1,s.ServerStartingMoney=.1,s.ServerGrowthRate=.5,s.ServerWeakenRate=2,s.CrimeMoney=3,s.CompanyWorkMoney=.5,s.HacknetNodeMoney=.1,s.AugmentationMoneyCost=2,s.InfiltrationMoney=2.5,s.InfiltrationRep=2.5,s.CorporationValuation=.01;break;case 12:for(var t=0,n=0;n
This augmentation increases all of the player's combat stats by 8%."});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),I(C.HemoRecirculator)&&delete E[C.HemoRecirculator],O(t);var n=new k({name:C.Targeting1,moneyCost:3e6,repCost:2e3,info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies.

This augmentation increases the player's dexterity by 10%."});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.Targeting1)&&delete E[C.Targeting1],O(n);var r=new k({name:C.Targeting2,moneyCost:85e5,repCost:3500,info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 20%.",prereqs:[C.Targeting1]});r.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.Targeting2)&&delete E[C.Targeting2],O(r);var s=new k({name:C.Targeting3,moneyCost:23e6,repCost:11e3,info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 30%.",prereqs:[C.Targeting2]});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),I(C.Targeting3)&&delete E[C.Targeting3],O(s);var l=new k({name:C.SyntheticHeart,moneyCost:575e6,repCost:3e5,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood at much higher efficiencies than a normal human heart.

This augmentation increases the player's agility and strength by 50%."});l.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),I(C.SyntheticHeart)&&delete E[C.SyntheticHeart],O(l);var u=new k({name:C.SynfibrilMuscle,repCost:175e3,moneyCost:225e6,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'.

This augmentation increases the player's strength and defense by 30%."});u.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),I(C.SynfibrilMuscle)&&delete E[C.SynfibrilMuscle],O(u);var d=new k({name:C.CombatRib1,repCost:3e3,moneyCost:475e4,info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.

This augmentation increases the player's strength and defense by 10%."});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.CombatRib1)&&delete E[C.CombatRib1],O(d);var h=new k({name:C.CombatRib2,repCost:7500,moneyCost:13e6,info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.

This augmentation increases the player's strength and defense by 14%.",prereqs:[C.CombatRib1]});h.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.CombatRib2)&&delete E[C.CombatRib2],O(h);var p=new k({name:C.CombatRib3,repCost:14e3,moneyCost:24e6,info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream

.This augmentation increases the player's strength and defense by 18%.",prereqs:[C.CombatRib2]});p.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),I(C.CombatRib3)&&delete E[C.CombatRib3],O(p);var m=new k({name:C.NanofiberWeave,repCost:15e3,moneyCost:25e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.

This augmentation increases the player's strength and defense by 20%."});m.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),I(C.NanofiberWeave)&&delete E[C.NanofiberWeave],O(m);var g=new k({name:C.SubdermalArmor,repCost:35e4,moneyCost:65e7,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-related or electrical traumas.

This augmentation increases the player's defense by 120%."});g.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),I(C.SubdermalArmor)&&delete E[C.SubdermalArmor],O(g);var y=new k({name:C.WiredReflexes,repCost:500,moneyCost:5e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the body's ability to send signals through neurons. This results in increased reflex speed.

This augmentation increases the player's agility and dexterity by 5%."});y.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),I(C.WiredReflexes)&&delete E[C.WiredReflexes],O(y);var b=new k({name:C.GrapheneBoneLacings,repCost:45e4,moneyCost:85e7,info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing their density and tensile strength.

This augmentation increases the player's strength and defense by 70%."});b.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),I(C.GrapheneBoneLacings)&&delete E[C.GrapheneBoneLacings],O(b);var v=new k({name:C.BionicSpine,repCost:18e3,moneyCost:25e6,info:"An artificial spine created from plasteel and carbon fibers that completely replaces the organic spine. Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in greatly improved senses and reaction speeds.

This augmentation increases all of the player's combat stats by 15%."});v.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),I(C.BionicSpine)&&delete E[C.BionicSpine],O(v);var _=new k({name:C.GrapheneBionicSpine,repCost:65e4,moneyCost:12e8,info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases all of the player's combat stats by 60%.",prereqs:[C.BionicSpine]});_.addToFactions(["Fulcrum Secret Technologies","ECorp"]),I(C.GrapheneBionicSpine)&&delete E[C.GrapheneBionicSpine],O(_);var w=new k({name:C.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.

This augmentation increases the player's agility by 60%."});w.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),I(C.BionicLegs)&&delete E[C.BionicLegs],O(w);var T=new k({name:C.GrapheneBionicLegs,repCost:3e5,moneyCost:9e8,info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases the player's agility by 150%.",prereqs:[C.BionicLegs]});T.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),I(C.GrapheneBionicLegs)&&delete E[C.GrapheneBionicLegs],O(T);var R=new k({name:C.SpeechProcessor,repCost:3e3,moneyCost:1e7,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.

This augmentation increases the player's charisma by 20%."});R.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),I(C.SpeechProcessor)&&delete E[C.SpeechProcessor],O(R);let x=new k({name:C.TITN41Injection,repCost:1e4,moneyCost:38e6,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.

This augmentation increases the player's charisma and charisma experience gain rate by 15%."});x.addToFactions(["Silhouette"]),I(C.TITN41Injection)&&delete E[C.TITN41Injection],O(x);var P=new k({name:C.EnhancedSocialInteractionImplant,repCost:15e4,moneyCost:275e6,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 expression, body language, and the voice's tone/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.

This augmentation increases the player's charisma and charisma experience gain rate by 60%."});P.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),I(C.EnhancedSocialInteractionImplant)&&delete E[C.EnhancedSocialInteractionImplant],O(P);var N=new k({name:C.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.

This augmentation increases the player's hacking skill by 5%."});N.addToFactions(["CyberSec","NiteSec"]),I(C.BitWire)&&delete E[C.BitWire],O(N);var A=new k({name:C.ArtificialBioNeuralNetwork,repCost:11e4,moneyCost:6e8,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimick the way a biological brain solves a problem, which 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 its user to solve much more complex problems at a much faster rate.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player's gains from hacking by 15%.
Increases the player's hacking skill by 12%."});A.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),I(C.ArtificialBioNeuralNetwork)&&delete E[C.ArtificialBioNeuralNetwork],O(A);var M=new k({name:C.ArtificialSynapticPotentiation,repCost:2500,moneyCost:16e6,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.

This augmentation:
Increases the player's hacking speed by 2%
Increases the player's hacking chance by 5%.
Increases the player's hacking experience gain rate by 5%."});M.addToFactions(["The Black Hand","NiteSec"]),I(C.ArtificialSynapticPotentiation)&&delete E[C.ArtificialSynapticPotentiation],O(M);var L=new k({name:C.EnhancedMyelinSheathing,repCost:4e4,moneyCost:275e6,info:"Electrical signals are used to induce a new, artificial form of myelinogensis 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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the player's hacking skill by 8%.
Increases the player's hacking experience gain rate by 10%."});L.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),I(C.EnhancedMyelinSheathing)&&delete E[C.EnhancedMyelinSheathing],O(L);var B=new k({name:C.SynapticEnhancement,repCost:800,moneyCost:15e5,info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.

This augmentation increases the player's hacking speed by 3%."});B.addToFactions(["CyberSec"]),I(C.SynapticEnhancement)&&delete E[C.SynapticEnhancement],O(B);var j=new k({name:C.NeuralRetentionEnhancement,repCost:8e3,moneyCost:5e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening its ability to retain information.

This augmentation increases the player's hacking experience gain rate by 25%."});j.addToFactions(["NiteSec"]),I(C.NeuralRetentionEnhancement)&&delete E[C.NeuralRetentionEnhancement],O(j);var D=new k({name:C.DataJack,repCost:45e3,moneyCost:9e7,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.

This augmentation increases the amount of money the player gains from hacking by 25%."});D.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),I(C.DataJack)&&delete E[C.DataJack],O(D);var F=new k({name:C.ENM,repCost:6e3,moneyCost:5e7,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.

This augmentation increases the player's hacking skill by 8%."});F.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),I(C.ENM)&&delete E[C.ENM],O(F);var H=new k({name:C.ENMCore,repCost:1e5,moneyCost:5e8,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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%.
Increases the player's chance of successfully performing a hack by 3%.
Increases the player's hacking experience gain rate by 7%.
Increases the player's hacking skill by 7%.",prereqs:[C.ENM]});H.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),I(C.ENMCore)&&delete E[C.ENMCore],O(H);var W=new k({name:C.ENMCoreV2,repCost:4e5,moneyCost:9e8,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 the information on a network by re-routing traffic, spoofing IP addresses, or altering the data inside network packets.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 30%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking experience gain rate by 15%.
Increases the player's hacking skill by 8%.",prereqs:[C.ENMCore]});W.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),I(C.ENMCoreV2)&&delete E[C.ENMCoreV2],O(W);var G=new k({name:C.ENMCoreV3,repCost:7e5,moneyCost:15e8,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.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 25%.
Increases the player's hacking skill by 10%.",prereqs:[C.ENMCoreV2]});G.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMCoreV3)&&delete E[C.ENMCoreV3],O(G);var U=new k({name:C.ENMAnalyzeEngine,repCost:25e4,moneyCost:12e8,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.

This augmentation increases the player's hacking speed by 10%.",prereqs:[C.ENM]});U.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMAnalyzeEngine)&&delete E[C.ENMAnalyzeEngine],O(U);var q=new k({name:C.ENMDMA,repCost:4e5,moneyCost:14e8,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.

This augmentation:
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 20%.",prereqs:[C.ENM]});q.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMDMA)&&delete E[C.ENMDMA],O(q);var K=new k({name:C.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 12%."});K.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),I(C.Neuralstimulator)&&delete E[C.Neuralstimulator],O(K);var V=new k({name:C.NeuralAccelerator,repCost:8e4,moneyCost:35e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.

This augmentation:
Increases the player's hacking skill by 10%.
Increases the player's hacking experience gain rate by 15%.
Increases the amount of money the player gains from hacking by 20%."});V.addToFactions(["BitRunners"]),I(C.NeuralAccelerator)&&delete E[C.NeuralAccelerator],O(V);var Y=new k({name:C.CranialSignalProcessorsG1,repCost:4e3,moneyCost:14e6,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.

This augmentation:
Increases the player's hacking speed by 1%.
Increases the player's hacking skill by 5%."});Y.addToFactions(["CyberSec"]),I(C.CranialSignalProcessorsG1)&&delete E[C.CranialSignalProcessorsG1],O(Y);var z=new k({name:C.CranialSignalProcessorsG2,repCost:7500,moneyCost:25e6,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking skill by 7%.",prereqs:[C.CranialSignalProcessorsG1]});z.addToFactions(["CyberSec","NiteSec"]),I(C.CranialSignalProcessorsG2)&&delete E[C.CranialSignalProcessorsG2],O(z);var J=new k({name:C.CranialSignalProcessorsG3,repCost:2e4,moneyCost:11e7,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 15%.
Increases the player's hacking skill by 9%.",prereqs:[C.CranialSignalProcessorsG2]});J.addToFactions(["NiteSec","The Black Hand","BitRunners"]),I(C.CranialSignalProcessorsG3)&&delete E[C.CranialSignalProcessorsG3],O(J);var $=new k({name:C.CranialSignalProcessorsG4,repCost:5e4,moneyCost:22e7,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 20%.
Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[C.CranialSignalProcessorsG3]});$.addToFactions(["The Black Hand","BitRunners"]),I(C.CranialSignalProcessorsG4)&&delete E[C.CranialSignalProcessorsG4],O($);var X=new k({name:C.CranialSignalProcessorsG5,repCost:1e5,moneyCost:45e7,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.

This augmentation:
Increases the player's hacking skill by 30%.
Increases the amount of money the player gains from hacking by 25%.
Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[C.CranialSignalProcessorsG4]});X.addToFactions(["BitRunners"]),I(C.CranialSignalProcessorsG5)&&delete E[C.CranialSignalProcessorsG5],O(X);var Q=new k({name:C.NeuronalDensification,repCost:75e3,moneyCost:275e6,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.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 10%.
Increases the player's hacking speed by 3%."});Q.addToFactions(["Clarke Incorporated"]),I(C.NeuronalDensification)&&delete E[C.NeuronalDensification],O(Q);var Z=new k({name:C.NuoptimalInjectorImplant,repCost:2e3,moneyCost:4e6,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.

This augmentation increases the amount of reputation the player gains when working for a company by 20%."});Z.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Ishima","Clarke Incorporated","Four Sigma","Bachman & Associates"]),I(C.NuoptimalInjectorImplant)&&delete E[C.NuoptimalInjectorImplant],O(Z);var ee=new k({name:C.SpeechEnhancement,repCost:1e3,moneyCost:25e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.

This augmentation:
Increases the player's charisma by 10%.
Increases the amount of reputation the player gains when working for a company by 10%."});ee.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Four Sigma","Bachman & Associates"]),I(C.SpeechEnhancement)&&delete E[C.SpeechEnhancement],O(ee);var te=new k({name:C.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.

This augmentation:
Increases all experience gains by 5%.
Increases the amount of money the player gains from working by 20%.
Increases the amount of reputation the player gains when working for a company by 10%."});te.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),I(C.FocusWire)&&delete E[C.FocusWire],O(te);var ne=new k({name:C.PCDNI,repCost:15e4,moneyCost:75e7,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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 30%.
Increases the player's hacking skill by 8%."});ne.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),I(C.PCDNI)&&delete E[C.PCDNI],O(ne);var ae=new k({name:C.PCDNIOptimizer,repCost:2e5,moneyCost:9e8,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 the connected computer.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 75%.
Increases the player's hacking skill by 10%.",prereqs:[C.PCDNI]});ae.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),I(C.PCDNIOptimizer)&&delete E[C.PCDNIOptimizer],O(ae);var ie=new k({name:C.PCDNINeuralNetwork,repCost:6e5,moneyCost:15e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The NeuroNet Injector upgrade allows the user to use his/her own brain's processing power to aid the computer in computational tasks.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 100%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 5%.",prereqs:[C.PCDNI]});ie.addToFactions(["Fulcrum Secret Technologies"]),I(C.PCDNINeuralNetwork)&&delete E[C.PCDNINeuralNetwork],O(ie);var re=new k({name:C.ADRPheromone1,repCost:1500,moneyCost:35e5,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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 10%
Increases the amount of reputation the player gains for a faction by 10%."});re.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),I(C.ADRPheromone1)&&delete E[C.ADRPheromone1],O(re);var oe=new k({name:C.ADRPheromone2,repCost:25e3,moneyCost:11e7,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.

This augmentation:
Increases the amount of reputation the player gains for a faction and company by 20%."});oe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),I(C.ADRPheromone2)&&delete E[C.ADRPheromone2],O(oe);var se=new k({name:C.HacknetNodeCPUUpload,repCost:1500,moneyCost:22e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 15%.
Decreases the cost of purchasing a Hacknet Node by 15%."});se.addToFactions(["Netburners"]),I(C.HacknetNodeCPUUpload)&&delete E[C.HacknetNodeCPUUpload],O(se);var le=new k({name:C.HacknetNodeCacheUpload,repCost:1e3,moneyCost:11e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of leveling up a Hacknet Node by 15%."});le.addToFactions(["Netburners"]),I(C.HacknetNodeCacheUpload)&&delete E[C.HacknetNodeCacheUpload],O(le);var ce=new k({name:C.HacknetNodeNICUpload,repCost:750,moneyCost:9e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of purchasing a Hacknet Node by 10%."});ce.addToFactions(["Netburners"]),I(C.HacknetNodeNICUpload)&&delete E[C.HacknetNodeNICUpload],O(ce);var ue=new k({name:C.HacknetNodeKernelDNI,repCost:3e3,moneyCost:8e6,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 the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 25%."});ue.addToFactions(["Netburners"]),I(C.HacknetNodeKernelDNI)&&delete E[C.HacknetNodeKernelDNI],O(ue);var de=new k({name:C.HacknetNodeCoreDNI,repCost:5e3,moneyCost:12e6,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 the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 45%."});de.addToFactions(["Netburners"]),I(C.HacknetNodeCoreDNI)&&delete E[C.HacknetNodeCoreDNI],O(de);var he=new k({name:C.NeuroFluxGovernor,repCost:500,moneyCost:75e4,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.

This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation increases ALL of the player's multipliers by 1%."}),pe=Object(o.e)();he.level=pe-1,ct=Math.pow(i.a.NeuroFluxGovernorLevelMult,he.level),he.baseRepRequirement=500*ct*i.a.AugmentationRepMultiplier*a.a.AugmentationRepCost,he.baseCost=75e4*ct*i.a.AugmentationCostMultiplier*a.a.AugmentationMoneyCost,I(C.NeuroFluxGovernor)&&delete E[C.NeuroFluxGovernor],he.addToAllFactions(),O(he);var me=new k({name:C.Neurotrainer1,repCost:400,moneyCost:8e5,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.

This augmentation increases the player's experience gain rate for all stats by 10%."});me.addToFactions(["CyberSec"]),I(C.Neurotrainer1)&&delete E[C.Neurotrainer1],O(me);var ge=new k({name:C.Neurotrainer2,repCost:4e3,moneyCost:9e6,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.

This augmentation increases the player's experience gain rate for all stats by 15%."});ge.addToFactions(["BitRunners","NiteSec"]),I(C.Neurotrainer2)&&delete E[C.Neurotrainer2],O(ge);var ye=new k({name:C.Neurotrainer3,repCost:1e4,moneyCost:26e6,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.

This augmentation increases the player's experience gain rate for all stats by 20%."});ye.addToFactions(["NWO","Four Sigma"]),I(C.Neurotrainer3)&&delete E[C.Neurotrainer3],O(ye);var fe=new k({name:C.Hypersight,repCost:6e4,moneyCost:55e7,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 wells, thus providing 'x-ray vision'-like capabilities.

This augmentation:
Increases the player's dexterity by 40%.
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%."});fe.addToFactions(["Blade Industries","KuaiGong International"]),I(C.Hypersight)&&delete E[C.Hypersight],O(fe);var be=new k({name:C.LuminCloaking1,repCost:600,moneyCost:1e6,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 from the naked eye.

This augmentation:
Increases the player's agility by 5%
Increases the amount of money the player gains from crimes by 10%."});be.addToFactions(["Slum Snakes","Tetrads"]),I(C.LuminCloaking1)&&delete E[C.LuminCloaking1],O(be);var ve=new k({name:C.LuminCloaking2,repCost:2e3,moneyCost:6e6,info:"This is a more advanced version of the LuminCloaking-V2 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.

This augmentation:
Increases the player's agility by 10%
Increases the player's defense by 10%
Increases the amount of money the player gains from crimes by 25%.",prereqs:[C.LuminCloaking1]});ve.addToFactions(["Slum Snakes","Tetrads"]),I(C.LuminCloaking2)&&delete E[C.LuminCloaking2],O(ve);var _e=new k({name:C.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.

This augmentation:
Increases the player's dexterity by 10%.
Increases the player's dexterity experience gain rate by 15%.
Increases the amount of money the player gains from crimes by 25%."});_e.addToFactions(["Slum Snakes"]),I(C.SmartSonar)&&delete E[C.SmartSonar],O(_e);var ke=new k({name:C.PowerRecirculator,repCost:1e4,moneyCost:36e6,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.

This augmentation:
Increases all of the player's stats by 5%.
Increases the player's experience gain rate for all stats by 10%."});ke.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),I(C.PowerRecirculator)&&delete E[C.PowerRecirculator],O(ke);var Ee=new k({name:C.QLink,repCost:75e4,moneyCost:13e8,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.

This augmentation:
Increases the player's hacking speed by 10%.
Increases the player's chance of successfully performing a hack by 30%.
Increases the amount of money the player gains from hacking by 100%."});Ee.addToFactions(["Illuminati"]),I(C.QLink)&&delete E[C.QLink],O(Ee);var Oe=new k({name:C.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Oe.addToFactions(["Daedalus"]),I(C.TheRedPill)&&delete E[C.TheRedPill],O(Oe);var Ce=new k({name:C.SPTN97,repCost:5e5,moneyCost:975e6,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.

This augmentation:
Increases all of the player's combat stats by 75%.
Increases the player's hacking skill by 15%."});Ce.addToFactions(["The Covenant"]),I(C.SPTN97)&&delete E[C.SPTN97],O(Ce);var we=new k({name:C.HiveMind,repCost:6e5,moneyCost:11e8,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."});we.addToFactions(["ECorp"]),I(C.HiveMind)&&delete E[C.HiveMind],O(we);var Se=new k({name:C.CordiARCReactor,repCost:45e4,moneyCost:1e9,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 amount of clean energy for the body.

This augmentation:
Increases all of the player's combat stats by 35%.
Increases all of the player's combat stat experience gain rate by 35%."});Se.addToFactions(["MegaCorp"]),I(C.CordiARCReactor)&&delete E[C.CordiARCReactor],O(Se);var Te=new k({name:C.SmartJaw,repCost:15e4,moneyCost:55e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.

This augmentation:
Increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 50%.
Increases the amount of reputation the player gains for a company by 25%.
Increases the amount of reputation the player gains for a faction by 25%."});Te.addToFactions(["Bachman & Associates"]),I(C.SmartJaw)&&delete E[C.SmartJaw],O(Te);var Re=new k({name:C.Neotra,repCost:225e3,moneyCost:575e6,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.

This augmentation increases the player's strength and defense by 55%."});Re.addToFactions(["Blade Industries"]),I(C.Neotra)&&delete E[C.Neotra],O(Re);var xe=new k({name:C.Xanipher,repCost:35e4,moneyCost:85e7,info:"A concoction of advanced nanobots that is orally ingested into the body. These nanobots induce physiological change and significantly improve the body's functionining in all aspects.

This augmentation:
Increases all of the player's stats by 20%.
Increases the player's experience gain rate for all stats by 15%."});xe.addToFactions(["NWO"]),I(C.Xanipher)&&delete E[C.Xanipher],O(xe);var Ie=new k({name:C.nextSENS,repCost:175e3,moneyCost:385e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.

This augmentation increases all of the player's stats by 20%."});Ie.addToFactions(["Clarke Incorporated"]),I(C.nextSENS)&&delete E[C.nextSENS],O(Ie);var Pe=new k({name:C.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.

This augmentation:
Increases the player's hacking skill by 20%.
Increases the player's hacking experience gain rate by 25%."});Pe.addToFactions(["OmniTek Incorporated"]),I(C.OmniTekInfoLoad)&&delete E[C.OmniTekInfoLoad],O(Pe);var Ne=new k({name:C.PhotosyntheticCells,repCost:225e3,moneyCost:55e7,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.

This augmentation increases the player's strength, defense, and agility by 40%."});Ne.addToFactions(["KuaiGong International"]),I(C.PhotosyntheticCells)&&delete E[C.PhotosyntheticCells],O(Ne);var Ae=new k({name:C.Neurolink,repCost:35e4,moneyCost:875e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 20%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking speed by 5%.
Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset."});Ae.addToFactions(["BitRunners"]),I(C.Neurolink)&&delete E[C.Neurolink],O(Ae);var Me=new k({name:C.TheBlackHand,repCost:4e4,moneyCost:11e7,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 just by touching them.

This augmentation:
Increases the player's strength and dexterity by 15%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 10%."});Me.addToFactions(["The Black Hand"]),I(C.TheBlackHand)&&delete E[C.TheBlackHand],O(Me);var Le=new k({name:C.CRTX42AA,repCost:18e3,moneyCost:45e6,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.

This augmentation:
Improves the player's hacking skill by 8%.
Improves the player's hacking experience gain rate by 15%."});Le.addToFactions(["NiteSec"]),I(C.CRTX42AA)&&delete E[C.CRTX42AA],O(Le);var Be=new k({name:C.Neuregen,repCost:15e3,moneyCost:75e6,info:"A drug that genetically modifies the neurons in the brain. The result is that these neurons never die and continuously regenerate and strengthen themselves.

This augmentation increases the player's hacking experience gain rate by 40%."});Be.addToFactions(["Chongqing"]),I(C.Neuregen)&&delete E[C.Neuregen],O(Be);var je=new k({name:C.CashRoot,repCost:5e3,moneyCost:25e6,info:"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.

This augmentation:
Lets the player start with $1,000,000 after a reset.
Lets the player start with the BruteSSH.exe program after a reset."});je.addToFactions(["Sector-12"]),I(C.CashRoot)&&delete E[C.CashRoot],O(je);var De=new k({name:C.NutriGen,repCost:2500,moneyCost:5e5,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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 20%."});De.addToFactions(["New Tokyo"]),I(C.NutriGen)&&delete E[C.NutriGen],O(De);var Fe=new k({name:C.INFRARet,repCost:3e3,moneyCost:6e6,info:"A retina implant consisting of a tiny chip that sits behind the retina. This implant lets people visually detect infrared radiation.

This augmentation:
Increases the player's crime success rate by 25%.
Increases the amount of money the player gains from crimes by 10%.
Increases the player's dexterity by 10%."});Fe.addToFactions(["Ishima"]),I(C.INFRARet)&&delete E[C.INFRARet],O(Fe);var He=new k({name:C.DermaForce,repCost:6e3,moneyCost:1e7,info:"A synthetic skin is grafted onto the body. The skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.

This augmentation increases the player's defense by 40%."});He.addToFactions(["Volhaven"]),I(C.DermaForce)&&delete E[C.DermaForce],O(He);var We=new k({name:C.GrapheneBrachiBlades,repCost:9e4,moneyCost:5e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material to make them much stronger and lighter.

This augmentation:
Increases the player's strength and defense by 40%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 30%.",prereqs:[C.BrachiBlades]});We.addToFactions(["Speakers for the Dead"]),I(C.GrapheneBrachiBlades)&&delete E[C.GrapheneBrachiBlades],O(We);var Ge=new k({name:C.GrapheneBionicArms,repCost:2e5,moneyCost:75e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them much stronger and lighter.

This augmentation increases the player's strength and dexterity by 85%.",prereqs:[C.BionicArms]});Ge.addToFactions(["The Dark Army"]),I(C.GrapheneBionicArms)&&delete E[C.GrapheneBionicArms],O(Ge);var Ue=new k({name:C.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.

This augmentation:
Increases the player's strength and defense by 15%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 15%."});Ue.addToFactions(["The Syndicate"]),I(C.BrachiBlades)&&delete E[C.BrachiBlades],O(Ue);var qe=new k({name:C.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.

This augmentation increases the user's strength and dexterity by 30%."});qe.addToFactions(["Tetrads"]),I(C.BionicArms)&&delete E[C.BionicArms],O(qe);var Ke=new k({name:C.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.

This augmentation:
Increases the amount of money the player earns at a company by 10%.
Increases the amount of reputation the player gains when working for a company or faction by 15%."});Ke.addToFactions(["Tian Di Hui"]),I(C.SNA)&&delete E[C.SNA],O(Ke),2===c.a.bitNodeN&&(console.log("Adding all augmentations to crime factions for Bit node 2"),o.b["Slum Snakes"].addAllAugmentations(),o.b.Tetrads.addAllAugmentations(),o.b["The Syndicate"].addAllAugmentations(),o.b["The Dark Army"].addAllAugmentations(),o.b["Speakers for the Dead"].addAllAugmentations(),o.b.NiteSec.addAllAugmentations(),o.b["The Black Hand"].addAllAugmentations());if(Object(o.d)("Bladeburners")){var Ve=new k({name:C.EsperEyewear,repCost:500,moneyCost:33e6,info:"Ballistic-grade protective and retractable eyewear that was designed specially 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, laser, flash, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD and assist the user in field missions.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 3%.
Increases the player's dexterity by 3%."});Ve.addToFactions(["Bladeburners"]),S(Ve);var Ye=new k({name:C.EMS4Recombination,repCost:1e3,moneyCost:55e6,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, and improve reflexes and memory-recall among other things.

This augmentation:
Increases the player's sucess chance in Bladeburner contracts/operations by 3%.
Increases the player's effectiveness in Bladeburner Field Analysis by 5%.
Increases the player's Bladeburner stamina gain rate by 1%."});Ye.addToFactions(["Bladeburners"]),S(Ye);var ze=new k({name:C.OrionShoulder,repCost:2500,moneyCost:11e7,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.

This augmentation:
Increases the player's defense by 5%.
Increases the player's strength and dexterity by 3%.
Increases the player's success chance in Bladeburner contracts/operations by 4%."});ze.addToFactions(["Bladeburners"]),S(ze);var Je=new k({name:C.HyperionV1,repCost:5e3,moneyCost:55e7,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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 5%."});Je.addToFactions(["Bladeburners"]),S(Je);var $e=new k({name:C.HyperionV2,repCost:1e4,moneyCost:11e8,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-efficiency, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 7%.",prereqs:[C.HyperionV1]});$e.addToFactions(["Bladeburners"]),S($e);var Xe=new k({name:C.GolemSerum,repCost:12500,moneyCost:22e8,info:"A serum that permanently enhances many aspects of a human's capabilities, including strength, speed, immune system performance, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.

This augmentation:
Increases all of the player's combat stats by 5%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});Xe.addToFactions(["Bladeburners"]),S(Xe);var Qe=new k({name:C.VangelisVirus,repCost:7500,moneyCost:55e7,info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 4%.
Increases the player's dexterity experience gain rate by 5%."});Qe.addToFactions(["Bladeburners"]),S(Qe);var Ze=new k({name:C.VangelisVirus3,repCost:15e3,moneyCost:22e8,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into the human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced agility/reflexes.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's defense and dexterity experience gain rate by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[C.VangelisVirus]});Ze.addToFactions(["Bladeburners"]),S(Ze);var et=new k({name:C.INTERLINKED,repCost:1e4,moneyCost:11e8,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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 4%.
Increases the player's Bladeburner max stamina by 10%."});et.addToFactions(["Bladeburners"]),S(et);var tt=new k({name:C.BladeRunner,repCost:8e3,moneyCost:165e7,info:"A cybernetic foot augmentation that was specially 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.

This augmentation:
Increases the player's agility by 5%.
Increases the player's Bladeburner max stamina by 5%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});tt.addToFactions(["Bladeburners"]),S(tt);var nt=new k({name:C.BladeArmor,repCost:5e3,moneyCost:275e6,info:"A powered exoskeleton suit (exosuit) 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 strength and agility.

This augmentation:
Increases all of the player's combat stats by 2%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's success chance in Bladeburner contracts/operations by 3%."});nt.addToFactions(["Bladeburners"]),S(nt);var at=new k({name:C.BladeArmorPowerCells,repCost:7500,moneyCost:55e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 5%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's Bladeburner max stamina by 5%.",prereqs:[C.BladeArmor]});at.addToFactions(["Bladeburners"]),S(at);var it=new k({name:C.BladeArmorEnergyShielding,repCost:8500,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.

This augmentation:
Increases the player's defense by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[C.BladeArmor]});it.addToFactions(["Bladeburners"]),S(it);var rt=new k({name:C.BladeArmorUnibeam,repCost:12500,moneyCost:33e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision an accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[C.BladeArmor]});rt.addToFactions(["Bladeburners"]),S(rt);var ot=new k({name:C.BladeArmorOmnibeam,repCost:25e3,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use multiple-fiber system. The upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[C.BladeArmorUnibeam]});ot.addToFactions(["Bladeburners"]),S(ot);var st=new k({name:C.BladeArmorIPU,repCost:6e3,moneyCost:22e7,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[C.BladeArmor]});st.addToFactions(["Bladeburners"]),S(st);var lt=new k({name:C.BladesSimulacrum,repCost:6e3,moneyCost:75e9,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 specially weaponized by Bladeburner units to be used against Synthoids.

This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."});lt.addToFactions(["Bladeburners"]),S(lt)}var ct=Math.pow(i.a.MultipleAugMultiplier,c.a.queuedAugmentations.length);for(var e in E)E.hasOwnProperty(e)&&(E[e].baseCost*=ct);c.a.reapplyAllAugmentations()}function S(e){if(!(e instanceof k))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;I(t)&&delete E[t],O(e)}function T(e,t=!1){switch(E[e.name].owned=!0,e.name){case C.Targeting1:c.a.dexterity_mult*=1.1;break;case C.Targeting2:c.a.dexterity_mult*=1.2;break;case C.Targeting3:c.a.dexterity_mult*=1.3;break;case C.SyntheticHeart:c.a.agility_mult*=1.5,c.a.strength_mult*=1.5;break;case C.SynfibrilMuscle:c.a.strength_mult*=1.3,c.a.defense_mult*=1.3;break;case C.CombatRib1:c.a.strength_mult*=1.1,c.a.defense_mult*=1.1;break;case C.CombatRib2:c.a.strength_mult*=1.14,c.a.defense_mult*=1.14;break;case C.CombatRib3:c.a.strength_mult*=1.18,c.a.defense_mult*=1.18;break;case C.NanofiberWeave:c.a.strength_mult*=1.2,c.a.defense_mult*=1.2;break;case C.SubdermalArmor:c.a.defense_mult*=2.2;break;case C.WiredReflexes:c.a.agility_mult*=1.05,c.a.dexterity_mult*=1.05;break;case C.GrapheneBoneLacings:c.a.strength_mult*=1.7,c.a.defense_mult*=1.7;break;case C.BionicSpine:c.a.strength_mult*=1.15,c.a.defense_mult*=1.15,c.a.agility_mult*=1.15,c.a.dexterity_mult*=1.15;break;case C.GrapheneBionicSpine:c.a.strength_mult*=1.6,c.a.defense_mult*=1.6,c.a.agility_mult*=1.6,c.a.dexterity_mult*=1.6;break;case C.BionicLegs:c.a.agility_mult*=1.6;break;case C.GrapheneBionicLegs:c.a.agility_mult*=2.5;break;case C.EnhancedSocialInteractionImplant:c.a.charisma_mult*=1.6,c.a.charisma_exp_mult*=1.6;break;case C.TITN41Injection:c.a.charisma_mult*=1.15,c.a.charisma_exp_mult*=1.15;break;case C.SpeechProcessor:c.a.charisma_mult*=1.2;break;case C.BitWire:c.a.hacking_mult*=1.05;break;case C.ArtificialBioNeuralNetwork:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.12;break;case C.ArtificialSynapticPotentiation:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.05;break;case C.EnhancedMyelinSheathing:c.a.hacking_speed_mult*=1.03,c.a.hacking_exp_mult*=1.1,c.a.hacking_mult*=1.08;break;case C.SynapticEnhancement:c.a.hacking_speed_mult*=1.03;break;case C.NeuralRetentionEnhancement:c.a.hacking_exp_mult*=1.25;break;case C.DataJack:c.a.hacking_money_mult*=1.25;break;case C.ENM:c.a.hacking_mult*=1.08;break;case C.ENMCore:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.1,c.a.hacking_chance_mult*=1.03,c.a.hacking_exp_mult*=1.07,c.a.hacking_mult*=1.07;break;case C.ENMCoreV2:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.3,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.15,c.a.hacking_mult*=1.08;break;case C.ENMCoreV3:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.25,c.a.hacking_mult*=1.1;break;case C.ENMAnalyzeEngine:c.a.hacking_speed_mult*=1.1;break;case C.ENMDMA:c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.2;break;case C.Neuralstimulator:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.12;break;case C.NeuralAccelerator:c.a.hacking_mult*=1.1,c.a.hacking_exp_mult*=1.15,c.a.hacking_money_mult*=1.2;break;case C.CranialSignalProcessorsG1:c.a.hacking_speed_mult*=1.01,c.a.hacking_mult*=1.05;break;case C.CranialSignalProcessorsG2:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_mult*=1.07;break;case C.CranialSignalProcessorsG3:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.09;break;case C.CranialSignalProcessorsG4:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.2,c.a.hacking_grow_mult*=1.25;break;case C.CranialSignalProcessorsG5:c.a.hacking_mult*=1.3,c.a.hacking_money_mult*=1.25,c.a.hacking_grow_mult*=1.75;break;case C.NeuronalDensification:c.a.hacking_mult*=1.15,c.a.hacking_exp_mult*=1.1,c.a.hacking_speed_mult*=1.03;break;case C.NuoptimalInjectorImplant:c.a.company_rep_mult*=1.2;break;case C.SpeechEnhancement:c.a.company_rep_mult*=1.1,c.a.charisma_mult*=1.1;break;case C.FocusWire:c.a.hacking_exp_mult*=1.05,c.a.strength_exp_mult*=1.05,c.a.defense_exp_mult*=1.05,c.a.dexterity_exp_mult*=1.05,c.a.agility_exp_mult*=1.05,c.a.charisma_exp_mult*=1.05,c.a.company_rep_mult*=1.1,c.a.work_money_mult*=1.2;break;case C.PCDNI:c.a.company_rep_mult*=1.3,c.a.hacking_mult*=1.08;break;case C.PCDNIOptimizer:c.a.company_rep_mult*=1.75,c.a.hacking_mult*=1.1;break;case C.PCDNINeuralNetwork:c.a.company_rep_mult*=2,c.a.hacking_mult*=1.1,c.a.hacking_speed_mult*=1.05;break;case C.ADRPheromone1:c.a.company_rep_mult*=1.1,c.a.faction_rep_mult*=1.1;break;case C.ADRPheromone2:c.a.company_rep_mult*=1.2,c.a.faction_rep_mult*=1.2;break;case C.HacknetNodeCPUUpload:c.a.hacknet_node_money_mult*=1.15,c.a.hacknet_node_purchase_cost_mult*=.85;break;case C.HacknetNodeCacheUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_level_cost_mult*=.85;break;case C.HacknetNodeNICUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_purchase_cost_mult*=.9;break;case C.HacknetNodeKernelDNI:c.a.hacknet_node_money_mult*=1.25;break;case C.HacknetNodeCoreDNI:c.a.hacknet_node_money_mult*=1.45;break;case C.NeuroFluxGovernor:if(c.a.hacking_chance_mult*=1.01,c.a.hacking_speed_mult*=1.01,c.a.hacking_money_mult*=1.01,c.a.hacking_grow_mult*=1.01,c.a.hacking_mult*=1.01,c.a.strength_mult*=1.01,c.a.defense_mult*=1.01,c.a.dexterity_mult*=1.01,c.a.agility_mult*=1.01,c.a.charisma_mult*=1.01,c.a.hacking_exp_mult*=1.01,c.a.strength_exp_mult*=1.01,c.a.defense_exp_mult*=1.01,c.a.dexterity_exp_mult*=1.01,c.a.agility_exp_mult*=1.01,c.a.charisma_exp_mult*=1.01,c.a.company_rep_mult*=1.01,c.a.faction_rep_mult*=1.01,c.a.crime_money_mult*=1.01,c.a.crime_success_mult*=1.01,c.a.hacknet_node_money_mult*=1.01,c.a.hacknet_node_purchase_cost_mult*=.99,c.a.hacknet_node_ram_cost_mult*=.99,c.a.hacknet_node_core_cost_mult*=.99,c.a.hacknet_node_level_cost_mult*=.99,c.a.work_money_mult*=1.01,!t){E[e.name].level=e.level;for(var n=0;n"):console.log("ERROR. Invalid augmentation")}if(c.a.queuedAugmentations=[],Object(m.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:
"+t+"
You wake up in your home...you feel different..."),Object(u.a)(),e&&Object(v.isString)(e)){var i=c.a.getHomeComputer();for(n=0;ni.maxRam-i.ramUsed)return;var o=new h.b(r,[]);o.threads=1,i.runningScripts.push(o),Object(l.c)(o,i)}}}function I(e){return E.hasOwnProperty(e)}function P(){Object(_.removeChildrenFromElement)(r.Engine.Display.augmentationsContent),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("h1",{innerText:"Purchased Augmentations"}));var e="\n";(6===c.a.bitNodeN||s.c)&&(e="Bladeburner Progress\n\n"),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("pre",{width:"70%",whiteSpace:"pre-wrap",display:"block",innerText:"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\nWARNING: Installing your Augmentations resets most of your progress, including:\n\nStats/Skill levels and Experience\nMoney\nScripts on every computer but your home computer\nPurchased servers\nHacknet Nodes\nFaction/Company reputation\nStocks\n"+e+"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)."})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",innerText:"Install Augmentations",tooltip:"'I never asked for this'",clickListener:()=>(x(),!1)})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button flashing-button",innerText:"Backup Save (Export)",tooltip:"It's always a good idea to backup/export your save!",clickListener:()=>(d.b.exportGame(),!1)}));for(var t=Object(b.createElement)("ul",{class:"augmentations-list"}),n=0;n{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{Object(_.removeChildrenFromElement)(u);var e=c.a.sourceFiles.slice(),t=c.a.augmentations.slice();e.sort((e,t)=>e.n-t.n),t.sort((e,t)=>e.name<=t.name?-1:1),A(u,e),N(u,t)}})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source Files based on when you acquired them (same as default)",clickListener:()=>{Object(_.removeChildrenFromElement)(u),A(u,c.a.sourceFiles),N(u,c.a.augmentations)}})),A(u,c.a.sourceFiles),N(u,c.a.augmentations),r.Engine.Display.augmentationsContent.appendChild(u)}function N(e,t){for(var n=0;nLevel "+t[n].lvl+" / "+o,panelText:i.info});e.appendChild(r[0])}}},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return c});var a=n(10);let i={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"};function r(){}r.prototype.addIp=function(e,t){this[e]=t},r.prototype.toJSON=function(){return Object(a.Generic_toJSON)("SpecialServerIpsMap",this)},r.fromJSON=function(e){return Object(a.Generic_fromJSON)(r,e.data)},a.Reviver.constructors.SpecialServerIpsMap=r;let o=new r;function s(){for(var e in o)delete o[e];o=null,o=new r}function l(e){o=JSON.parse(e,a.Reviver)}function c(){o=new r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(44),i=n(55);t.removeElementById=function(e){try{const t=a.getElementById(e);i.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"c",function(){return d}),n.d(t,"d",function(){return h});var a=n(1),i=n(0),r=n(3);function o(e){return function(){return i.a.hacking_skill>=e}}function s(e,t){this.name=e,this.create=t}s.prototype.htmlID=function(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)};const l={NukeProgram:new s("NUKE.exe",{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:o(1),time:a.a.MillisecondsPerFiveMinutes}),BruteSSHProgram:new s("BruteSSH.exe",{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:o(50),time:2*a.a.MillisecondsPerFiveMinutes}),FTPCrackProgram:new s("FTPCrack.exe",{level:100,tooltip:"This program cracks open FTP ports",req:o(100),time:a.a.MillisecondsPerHalfHour}),RelaySMTPProgram:new s("relaySMTP.exe",{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:o(250),time:a.a.MillisecondsPer2Hours}),HTTPWormProgram:new s("HTTPWorm.exe",{level:500,tooltip:"This virus opens up HTTP ports",req:o(500),time:a.a.MillisecondsPer4Hours}),SQLInjectProgram:new s("SQLInject.exe",{level:750,tooltip:"This virus opens SQL ports",req:o(750),time:a.a.MillisecondsPer8Hours}),DeepscanV1:new s("DeepscanV1.exe",{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:o(75),time:a.a.MillisecondsPerQuarterHour}),DeepscanV2:new s("DeepscanV2.exe",{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:o(400),time:a.a.MillisecondsPer2Hours}),ServerProfiler:new s("ServerProfiler.exe",{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:o(75),time:a.a.MillisecondsPerHalfHour}),AutoLink:new s("AutoLink.exe",{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:o(25),time:a.a.MillisecondsPerQuarterHour}),BitFlume:new s("b1t_flum3.exe",{level:5,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(){return i.a.sourceFiles.length>0&&i.a.hacking_skill>=5},time:a.a.MillisecondsPerFiveMinutes/5}),Flight:new s("fl1ght.exe")},c={};function u(){for(const e in c){const t=l[e];c[e].style.display="none",!i.a.hasProgram(t.name)&&t.create.req()&&(c[e].style.display="inline-block")}}function d(){var e=0;for(const t in l)void 0!==l[t].create&&(i.a.hasProgram(l[t].name)||l[t].create.req()&&e++);return!1===i.a.firstProgramAvailable&&e>0&&(i.a.firstProgramAvailable=!0,document.getElementById("create-program-tab").style.display="list-item",document.getElementById("hacking-menu-header").click(),document.getElementById("hacking-menu-header").click()),e}function h(){var e=document.getElementById("create-program-list");for(const t in l){if(void 0===l[t].create)continue;const n=Object(r.createElement)("a",{class:"a-link-button",id:l[t].htmlID(),innerText:l[t].name,tooltip:l[t].create.tooltip});c[t]=n,e.appendChild(n)}for(const e in c){const t=l[e];c[e].addEventListener("click",function(){return i.a.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return r});var a=n(6);let i={CodeInstructionRunTime:25,MaxLogCapacity:50,MaxPortCapacity:50,SuppressMessages:!1,SuppressFactionInvites:!1,SuppressTravelConfirmation:!1,SuppressBuyAugmentationConfirmation:!1,AutosaveInterval:60,DisableHotkeys:!1,ThemeHighlightColor:"#ffffff",ThemeFontColor:"#66ff33",ThemeBackgroundColor:"#000000",EditorTheme:"Monokai",EditorKeybinding:"ace"};function r(e){i=JSON.parse(e)}function o(){i.CodeInstructionRunTime=50,i.MaxLogCapacity=50,i.MaxPortCapacity=50,i.SuppressMessages=!1,i.SuppressFactionInvites=!1,i.SuppressTravelConfirmation=!1,i.SuppressBuyAugmentationConfirmation=!1,i.AutosaveInterval=60,i.DisableHotkeys=!1}function s(){var e=document.getElementById("settingsNSExecTimeRangeValLabel"),t=document.getElementById("settingsNSLogRangeValLabel"),n=document.getElementById("settingsNSPortRangeValLabel"),r=document.getElementById("settingsSuppressMessages"),o=document.getElementById("settingsSuppressFactionInvites"),s=document.getElementById("settingsSuppressTravelConfirmation"),l=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),c=document.getElementById("settingsAutosaveIntervalValLabel"),u=document.getElementById("settingsDisableHotkeys");e.innerHTML=i.CodeInstructionRunTime+"ms",t.innerHTML=i.MaxLogCapacity,n.innerHTML=i.MaxPortCapacity,r.checked=i.SuppressMessages,o.checked=i.SuppressFactionInvites,s.checked=i.SuppressTravelConfirmation,l.checked=i.SuppressBuyAugmentationConfirmation,c.innerHTML=i.AutosaveInterval,u.checked=i.DisableHotkeys;var d=document.getElementById("settingsNSExecTimeRangeVal"),h=document.getElementById("settingsNSLogRangeVal"),p=document.getElementById("settingsNSPortRangeVal"),m=document.getElementById("settingsAutosaveIntervalVal");d.value=i.CodeInstructionRunTime,h.value=i.MaxLogCapacity,p.value=i.MaxPortCapacity,m.value=i.AutosaveInterval,d.oninput=function(){e.innerHTML=this.value+"ms",i.CodeInstructionRunTime=this.value},h.oninput=function(){t.innerHTML=this.value,i.MaxLogCapacity=this.value},p.oninput=function(){n.innerHTML=this.value,i.MaxPortCapacity=this.value},m.oninput=function(){c.innerHTML=this.value,i.AutosaveInterval=Number(this.value),0===Number(this.value)?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*Number(this.value)},r.onclick=function(){i.SuppressMessages=this.checked},o.onclick=function(){i.SuppressFactionInvites=this.checked},s.onclick=function(){i.SuppressTravelConfirmation=this.checked},l.onclick=function(){i.SuppressBuyAugmentationConfirmation=this.checked,console.log("sup buy: "+i.SuppressBuyAugmentationConfirmation)},u.onclick=function(){i.DisableHotkeys=this.checked},null!=i.ThemeHighlightColor&&null!=i.ThemeFontColor&&null!=i.ThemeBackgroundColor?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeHighlightColor)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeFontColor)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeBackgroundColor)&&(document.body.style.setProperty("--my-highlight-color",i.ThemeHighlightColor),document.body.style.setProperty("--my-font-color",i.ThemeFontColor),document.body.style.setProperty("--my-background-color",i.ThemeBackgroundColor)):console.log("ERROR: Cannot find Theme Settings")}},function(e,t,n){"use strict";n.d(t,"b",function(){return E}),n.d(t,"h",function(){return O}),n.d(t,"a",function(){return C}),n.d(t,"f",function(){return x}),n.d(t,"d",function(){return I}),n.d(t,"c",function(){return P}),n.d(t,"g",function(){return N}),n.d(t,"e",function(){return S});var a=n(51),i=n(1),r=n(6),o=n(96),s=n(83),l=n(7),c=n(34),u=n(84),d=n(56),h=n(9),p=n(22),m=n(78),g=n(37),y=n(8),f=n(69),b=n(40),v=n(62),_=n(2);const k=n(111);function E(e){this.name=e.filename,this.running=!1,this.serverIp=null,this.code=e.scriptRef.code,this.env=new s.a(this),this.env.set("args",e.args.slice()),this.output="",this.ramUsage=0,this.scriptRef=e,this.errorMessage="",this.args=e.args.slice(),this.delay=null,this.fnWorker=null,this.checkingRam=!1,this.loadedFns={},this.disableLogs={},this.dynamicRamUsage=i.a.ScriptBaseRamCost,this.dynamicLoadedFns={}}E.prototype.getServer=function(){return h.b[this.serverIp]},E.prototype.getScript=function(){let e=this.getServer();for(var t=0;t{if(t instanceof Error)throw e.errorMessage=Object(l.d)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(l.b)(t))throw e.errorMessage=t,e;throw t})}function R(e){var t,n,a=e.code;e.running=!0;try{let i=function(e,t){var n=Object(g.parse)(e,{ecmaVersion:6,allowReserved:!0,sourceType:"module"}),a=t.getServer();if(null==a)throw new Error("Failed to find underlying Server object for script");var i="",r=!1;if(k.simple(n,{ImportDeclaration:e=>{r=!0;let t=e.source.value,n=function(e){for(let t=0;t{n.push(e.id.name),a.push(e)}}),i="var "+t+";\n(function (namespace) {\n",a.forEach(e=>{i+=Object(m.generate)(e),i+="\n"}),n.forEach(e=>{i+="namespace."+e+" = "+e,i+="\n"}),i+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];k.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{i+=Object(m.generate)(e),i+="\n"})}}}),!r)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=(i.match(/\n/g)||[]).length-o;return e=Object(m.generate)(n),{code:e=i+e,lineOffset:s}}(a,e);t=i.code,n=i.lineOffset}catch(t){return Object(y.dialogBoxCreate)("Error processing Imports in "+e.name+":
"+t),e.env.stopFlag=!0,void(e.running=!1)}var i;try{i=new o.a(t,function(t,n){var a=Object(c.a)(e);for(let e in a){let i=a[e];if("function"==typeof i)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"run"===e||"exec"===e){let a=function(){let e=[];for(let t=0;t"+t),e.env.stopFlag=!0,void(e.running=!1)}return new Promise(function(t,n){try{!function a(){try{if(e.env.stopFlag)return n(e);i.step()?window.setTimeout(a,p.a.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(l.b)(t)||(t=Object(l.d)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(_.isString)(t)?(e.errorMessage=t,n(e)):n(t instanceof E?t:e)}})}function x(){for(var e=!1,t=O.length-1;t>=0;t--)if(0==O[t].running&&1==O[t].env.stopFlag){e=!0;var n=O[t].serverIp,i=O[t].name;h.b[n].ramUsed=0;for(let e=0;eServer Ip: "+n+"
Script name: "+a+"
Args:"+Object(b.arrayToString)(e.args)+"
"+i),e.scriptRef.log("Script crashed with runtime error")}else e.scriptRef.log("Script killed");e.running=!1,e.env.stopFlag=!0}else{if(Object(l.b)(e))return Object(y.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.log("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(y.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.log(e)}else console.log("Script returning with value: "+e[1])})}setTimeout(x,6e3)}function I(e,t){for(var n=0;nt.maxRam-t.ramUsed)Object(y.dialogBoxCreate)("Not enough RAM to run script "+e.filename+" with args "+Object(b.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.)");else{t.ramUsed=Object(v.roundToTwo)(t.ramUsed+i);var r=new E(e);r.serverIp=t.ip,r.ramUsage=i,Object(a.a)(r),O.push(r)}}function N(e=1){for(var t=e*r.Engine._idleSpeed/1e3,n=0;ne.playerShares&&(t=e.playerShares),0===t)return!1;var n=e.price*t-a.a.StockMarketCommission;return l.a.gainMoney(n),e.playerShares-=t,0==e.playerShares&&(e.playerAvgPx=0),$(e),Object(c.dialogBoxCreate)("Sold "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. After commissions, you gained a total of $"+Object(m.formatNumber)(n,2)),!0}function B(e,t,n=null){var i=n instanceof s.b;if(null==e||isNaN(t)||t<0)return i?n.scriptRef.log("ERROR: shortStock() failed because of invalid arguments."):Object(c.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;if(0===(t=Math.round(t)))return!1;var r=e.price*t;if(l.a.money.lt(r+a.a.StockMarketCommission))return i?n.scriptRef.log("ERROR: shortStock() failed because you do not have money to purchase this short position. You need "+p()(r+a.a.StockMarketCommission).format("($0.000a)")):Object(c.dialogBoxCreate)("You do not have enough money to purchase this short position. You need $"+Object(m.formatNumber)(r+a.a.StockMarketCommission,2)+"."),!1;var o=e.playerShortShares*e.playerAvgShortPx;l.a.loseMoney(r+a.a.StockMarketCommission);var u=o+r;return e.playerShortShares+=t,e.playerAvgShortPx=u/e.playerShortShares,$(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.shortStock&&n.scriptRef.log("Bought a short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at "+p()(e.price).format("($0.000a)")+" per share. Paid "+p()(a.a.StockMarketCommission).format("($0.000a)")+" in commission fees."):Object(c.dialogBoxCreate)("Bought a short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. You also paid $"+Object(m.formatNumber)(a.a.StockMarketCommission,2)+" in commission fees."),!0}function j(e,t,n=null){var i=n instanceof s.b;if(null==e||isNaN(t)||t<0)return i?n.scriptRef.log("ERROR: sellShort() failed because of invalid arguments."):Object(c.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;var r=t*e.playerAvgShortPx,o=(e.playerAvgShortPx-e.price)*t-a.a.StockMarketCommission;return isNaN(o)&&(o=0),l.a.gainMoney(r+o),i&&(n.scriptRef.onlineMoneyMade+=o,l.a.scriptProdSinceLastAug+=o),e.playerShortShares-=t,0===e.playerShortShares&&(e.playerAvgShortPx=0),$(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.sellShort&&n.scriptRef.log("Sold your short position of "+t+" shares of "+e.symbol+" at "+p()(e.price).format("($0.000a)")+" per share. After commissions, you gained a total of "+p()(r+o).format("($0.000a)")):Object(c.dialogBoxCreate)("Sold your short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. After commissions, you gained a total of $"+Object(m.formatNumber)(r+o,2)),!0}function D(){var e=Math.random();for(var t in S)if(S.hasOwnProperty(t)){var n=S[t];if(!(n instanceof v))continue;var a=e*n.mv/100;isNaN(a)&&(a=.02);var r=50;n.b?(r=(r+n.otlkMag)/100,isNaN(r)&&(r=.5)):(r=(r-n.otlkMag)/100,isNaN(r)&&(r=.5)),n.price>=b&&(r=-1,n.b=!1);var o=Math.random();o=o.price&&C(o);break;case _.LimitSell:case _.StopBuy:o.pos===k.Long&&e.price>=o.price?C(o):o.pos===k.Short&&e.price<=o.price&&C(o);break;case _.StopSell:o.pos===k.Long&&e.price<=o.price?C(o):o.pos===k.Short&&e.price>=o.price&&C(o);break;default:return void console.log("Invalid order type: "+o.type)}}}else{var s={};for(var l in S)if(S.hasOwnProperty(l)){if(!((e=S[l])instanceof v))continue;s[e.symbol]=[]}S.Orders=s}}function H(e){W=e}var W=!1,G=!1,U=a.a.StockMarketCommission;function q(){null==l.a.hasWseAccount&&(l.a.hasWseAccount=!1),null==l.a.hasTixApiAccess&&(l.a.hasTixApiAccess=!1);var e=Object(u.clearEventListeners)("stock-market-buy-account");e.innerText="Buy WSE Account - $"+Object(m.formatNumber)(a.a.WSEAccountCost,2).toString(),!l.a.hasWseAccount&&l.a.money.gte(a.a.WSEAccountCost)?e.setAttribute("class","a-link-button"):l.a.hasWseAccount?(e.innerText="WSE Account - Purchased",e.setAttribute("class","a-link-button-bought")):e.setAttribute("class","a-link-button-inactive"),e.addEventListener("click",function(){return l.a.hasWseAccount=!0,P(),N(),l.a.loseMoney(a.a.WSEAccountCost),q(),!1});var t=Object(u.clearEventListeners)("stock-market-buy-tix-api");if(t.innerText="Buy Trade Information eXchange (TIX) API Access - $"+Object(m.formatNumber)(a.a.TIXAPICost,2).toString(),!l.a.hasTixApiAccess&&l.a.money.gte(a.a.TIXAPICost)?t.setAttribute("class","a-link-button"):l.a.hasTixApiAccess?(t.innerText="Trade Information eXchange (TIX) API Access - Purchased",t.setAttribute("class","a-link-button-bought")):t.setAttribute("class","a-link-button-inactive"),t.addEventListener("click",function(){return l.a.hasTixApiAccess=!0,l.a.loseMoney(a.a.TIXAPICost),q(),!1}),null!=(o=document.getElementById("stock-market-list")))if(l.a.hasWseAccount){if(!W&&l.a.hasWseAccount){console.log("Creating Stock Market UI"),document.getElementById("stock-market-commission").innerHTML="Commission Fees: Every transaction you make has a $"+Object(m.formatNumber)(a.a.StockMarketCommission,2)+" commission fee.

WARNING: When you reset after installing Augmentations, the Stock Market is reset. This means all your positions are lost, so make sure to sell your stocks before installing Augmentations!",Object(u.clearEventListeners)("stock-market-investopedia").addEventListener("click",function(){return Object(c.dialogBoxCreate)("When making a transaction on the stock market, there are two types of positions: Long and Short. A Long position is the typical scenario where you buy a stock and earn a profit if the price of that stock increases. Meanwhile, a Short position is the exact opposite. In a Short position you purchase shares of a stock and earn a profit if the price of that stock decreases. This is also called 'shorting' a stock.

NOTE: Shorting stocks is not available immediately, and must be unlocked later on in the game.

There are three different types of orders you can make to buy or sell stocks on the exchange: Market Order, Limit Order, and Stop Order. Note that Limit Orders and Stop Orders are not available immediately, and must be unlocked later on in the game.

When you place a Market Order to buy or sell a stock, the order executes immediately at whatever the current price of the stock is. For example if you choose to short a stock with 5000 shares using a Market Order, you immediately purchase those 5000 shares in a Short position at whatever the current market price is for that stock.

A Limit Order is an order that only executes under certain conditions. A Limit Order is used to buy or sell a stock at a specified price or better. For example, lets say you purchased a Long position of 100 shares of some stock at a price of $10 per share. You can place a Limit Order to sell those 100 shares at $50 or better. The Limit Order will execute when the price of the stock reaches a value of $50 or higher.

A Stop Order is the opposite of a Limit Order. It is used to buy or sell a stock at a specified price (before the price gets 'worse'). For example, lets say you purchased a Short position of 100 shares of some stock at a price of $100 per share. The current price of the stock is $80 (a profit of $20 per share). You can place a Stop Order to sell the Short position if the stock's price reaches $90 or higher. This can be used to lock in your profits and limit any losses.

Here is a summary of how each order works and when they execute:

In a LONG Position:

A Limit Order to buy will execute if the stock's price <= order's price
A Limit Order to sell will execute if the stock's price >= order's price
A Stop Order to buy will execute if the stock's price >= order's price
A Stop Order to sell will execute if the stock's price <= order's price

In a SHORT Position:

A Limit Order to buy will execute if the stock's price >= order's price
A Limit Order to sell will execute if the stock's price <= order's price
A Stop Order to buy will execute if the stock's price <= order's price
A Stop Order to sell will execute if the stock's price >= order's price."),!1});var n=Object(u.clearEventListeners)("stock-market-mode");n&&(n.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",n.addEventListener("click",K));var i=Object(u.clearEventListeners)("stock-market-expand-tickers"),r=Object(u.clearEventListeners)("stock-market-collapse-tickers"),o=document.getElementById("stock-market-list");for(var s in i&&i.addEventListener("click",()=>{for(var e=o.getElementsByClassName("accordion-header"),t=0;t{for(var e=o.getElementsByClassName("accordion-header"),t=0;tDisplays all stocks on the WSE
",t.addEventListener("click",V));e.firstChild;)e.removeChild(e.firstChild);var n=S.Orders;if(null==n){var a={};for(var i in S)if(S.hasOwnProperty(i)){if(!((r=S[i])instanceof v))continue;a[r.symbol]=[]}S.Orders=a}for(var i in S)if(S.hasOwnProperty(i)){var r;if(!((r=S[i])instanceof v))continue;var o=n[r.symbol];if(0===r.playerShares&&0===r.playerShortShares&&0===o.length)continue;Y(r)}z()}}function V(){G=!1;var e=document.getElementById("stock-market-list");if(null!=e){var t=Object(u.clearEventListeners)("stock-market-mode");for(t&&(t.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",t.addEventListener("click",K));e.firstChild;)e.removeChild(e.firstChild);for(var n in S)if(S.hasOwnProperty(n)){var a=S[n];if(!(a instanceof v))continue;Y(a)}z()}}function Y(e){if(e instanceof v){var t="stock-market-ticker-"+e.symbol,n=document.createElement("li"),a=document.createElement("button");a.classList.add("accordion-header"),a.setAttribute("id",t+"-hdr"),a.innerHTML=e.name+" - "+e.symbol+" - $"+e.price;var i=document.createElement("div");i.classList.add("accordion-panel"),i.setAttribute("id",t+"-panel");var r=document.createElement("input"),s=document.createElement("select"),u=document.createElement("select"),d=document.createElement("span"),h=document.createElement("span"),p=document.createElement("span"),m=document.createElement("span"),g=document.createElement("p"),y=document.createElement("ul");r.classList.add("stock-market-input"),r.placeholder="Quantity (Shares)",r.setAttribute("id",t+"-qty-input"),r.setAttribute("onkeydown","return ( event.ctrlKey || event.altKey || (4734 && event.keyCode<40) || (event.keyCode==46) )"),s.classList.add("stock-market-input"),s.setAttribute("id",t+"-pos-selector");var b=document.createElement("option");if(b.text="Long",s.add(b),8===l.a.bitNodeN||o.f&&o.h>=2){var O=document.createElement("option");O.text="Short",s.add(O)}u.classList.add("stock-market-input"),u.setAttribute("id",t+"-order-selector");var C=document.createElement("option");if(C.text="Market Order",u.add(C),8===l.a.bitNodeN||o.f&&o.h>=3){var w=document.createElement("option");w.text="Limit Order",u.add(w);var S=document.createElement("option");S.text="Stop Order",u.add(S)}d.classList.add("stock-market-input"),d.classList.add("a-link-button"),d.innerHTML="Buy",d.addEventListener("click",()=>{var n=s.options[s.selectedIndex].text;n="Long"===n?k.Long:k.Short;var a=u.options[u.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===k.Long?M(e,i):B(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Buy "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(f.h)());t="Limit Order"===a?_.LimitBuy:_.StopBuy,E(e,i,r,t,n),Object(f.f)()}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),h.classList.add("stock-market-input"),h.classList.add("a-link-button"),h.innerHTML="Sell",h.addEventListener("click",()=>{var n=s.options[s.selectedIndex].text;n="Long"===n?k.Long:k.Short;var a=u.options[u.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===k.Long?L(e,i):j(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Sell "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(f.h)());t="Limit Order"===a?_.LimitSell:_.StopSell,Object(f.f)(),E(e,i,r,t,n)}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),p.classList.add("stock-market-input"),p.classList.add("a-link-button"),p.innerHTML="Buy MAX",p.addEventListener("click",()=>{var t=s.options[s.selectedIndex].text;t="Long"===t?k.Long:k.Short;var n=u.options[u.selectedIndex].text,a=l.a.money.toNumber();switch(n){case"Market Order":var i=Math.floor((a-U)/e.price);t===k.Long?M(e,i):B(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Buy "+n,o.innerText="Cancel Order",r.addEventListener("click",()=>{var i,r=Number(Object(f.h)());i="Limit Order"===n?_.LimitBuy:_.StopBuy;var o=Math.floor((a-U)/r);E(e,o,r,i,t),Object(f.f)()}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+n);break;default:console.log("ERROR: Invalid order type")}return!1}),m.classList.add("stock-market-input"),m.classList.add("a-link-button"),m.innerHTML="Sell ALL",m.addEventListener("click",()=>{var t=s.options[s.selectedIndex].text;switch(t="Long"===t?k.Long:k.Short,u.options[u.selectedIndex].text){case"Market Order":if(t===k.Long){var n=e.playerShares;L(e,n)}else{n=e.playerShortShares;j(e,n,null)}break;case"Limit Order":case"Stop Order":Object(c.dialogBoxCreate)("ERROR: 'Sell All' only works for Market Orders");break;default:console.log("ERROR: Invalid order type")}return!1}),g.setAttribute("id",t+"-position-text"),g.classList.add("stock-market-position-text"),e.posTxtEl=g,y.setAttribute("id",t+"-order-list"),y.classList.add("stock-market-order-list"),i.appendChild(r),i.appendChild(s),i.appendChild(u),i.appendChild(d),i.appendChild(h),i.appendChild(p),i.appendChild(m),i.appendChild(g),i.appendChild(y),n.appendChild(a),n.appendChild(i),document.getElementById("stock-market-list").appendChild(n),J(e,!0),$(e),X(e)}else console.log("Invalid stock in createStockSticker()")}function z(){var e=document.getElementById("stock-market-list").getElementsByClassName("accordion-header");if(null!=e)for(var t=0;t0||e.playerShortShares>0)&&$(e);var a=document.getElementById(n+"-hdr");null!=a?(a.innerHTML=e.name+" - "+e.symbol+" - $"+Object(m.formatNumber)(e.price,2),null!=t&&(a.style.color=t?"#66ff33":"red")):G||console.log("ERROR: Couldn't find ticker element for stock: "+e.symbol)}}function $(e){if(i.Engine.currentPage===i.Engine.Page.StockMarket){if(!(e instanceof v))return console.log("Invalid stock in updateStockPlayerPosition():"),void console.log(e);var t="stock-market-ticker-"+e.symbol;if(G){if(0===e.playerShares&&0===e.playerShortShares&&S.Orders&&S.Orders[e.symbol]&&0===S.Orders[e.symbol].length)return Object(y.removeElementById)(t+"-hdr"),void Object(y.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return Y(e),void z()}if(e.posTxtEl instanceof Element||(e.posTxtEl=document.getElementById(t+"-position-text")),null!=e.posTxtEl){var n=e.playerShares*e.playerAvgPx,a=(e.price-e.playerAvgPx)*e.playerShares,r=a/n;isNaN(r)&&(r=0);var s=e.playerShortShares*e.playerAvgShortPx,c=(e.playerAvgShortPx-e.price)*e.playerShortShares,u=c/s;isNaN(u)&&(u=0),e.posTxtEl.innerHTML="

Long Position: Shares in the long position will increase in value if the price of the corresponding stock increases


Shares: "+Object(m.formatNumber)(e.playerShares,0)+"
Average Price: "+p()(e.playerAvgPx).format("$0.000a")+" (Total Cost: "+p()(n).format("$0.000a")+")
Profit: "+p()(a).format("$0.000a")+" ("+Object(m.formatNumber)(100*r,2)+"%)

",(8===l.a.bitNodeN||o.f&&o.h>=2)&&(e.posTxtEl.innerHTML+="

Short Position: Shares in short position will increase in value if the price of the corresponding stock decreases


Shares: "+Object(m.formatNumber)(e.playerShortShares,0)+"
Average Price: "+p()(e.playerAvgShortPx).format("$0.000a")+" (Total Cost: "+p()(s).format("$0.000a")+")
Profit: "+p()(c).format("$0.000a")+" ("+Object(m.formatNumber)(100*u,2)+"%)

Orders:

")}else console.log("ERROR: Could not find stock position element for: "+e.symbol)}}function X(e){if(i.Engine.currentPage===i.Engine.Page.StockMarket){var t="stock-market-ticker-"+e.symbol,n=document.getElementById(t+"-order-list");if(null!=n){var a=S.Orders;if(null!=a){var r=a[e.symbol];if(null!=r){if(G){if(0===e.playerShares&&0===e.playerShortShares&&S.Orders&&S.Orders[e.symbol]&&0===S.Orders[e.symbol].length)return Object(y.removeElementById)(t+"-hdr"),void Object(y.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return Y(e),void z()}for(;n.firstChild;)n.removeChild(n.firstChild);for(var o=0;o'+t+""),B()}function M(t){e("#terminal-input").before(''+t+""),B()}function L(t){e("#terminal-input").before(''+t+""),B()}function B(){var e=document.getElementById("terminal-container");e.scrollTop=e.scrollHeight}function j(){A("Bitburner v"+i.a.Version)}var D={TAB:9,ENTER:13,CTRL:17,UPARROW:38,DOWNARROW:40,A:65,B:66,C:67,D:68,E:69,F:70,H:72,J:74,K:75,L:76,M:77,N:78,O:79,P:80,R:82,S:83,U:85,W:87};e(document).keydown(function(t){if(s.Engine.currentPage==s.Engine.Page.Terminal){var n=document.getElementById("terminal-input-text-box");if(null==n||t.ctrlKey||t.shiftKey||n.focus(),t.keyCode===D.ENTER){t.preventDefault();var i=e("input[class=terminal-input]").val();if(A("["+(l.a.ENABLE_TIMESTAMPS?Object(R.getTimestamp)()+" ":"")+f.a.getCurrentServer().hostname+" ~]> "+i),i.length>0){W.resetTerminalInput();const e=i.split(";");for(let t=0;tu)&&(W.commandHistoryIndex=u),0!=r&&--W.commandHistoryIndex;var c=W.commandHistory[W.commandHistoryIndex];n.value=c,setTimeout(function(){n.selectionStart=n.selectionEnd=1e4},0)}if(t.keyCode===D.DOWNARROW||l.a.ENABLE_BASH_HOTKEYS&&t.keyCode===D.M&&t.ctrlKey){if(l.a.ENABLE_BASH_HOTKEYS&&t.preventDefault(),null==n)return;var u;r=W.commandHistoryIndex;if(0==(u=W.commandHistory.length))return;if((r<0||r>u)&&(W.commandHistoryIndex=u),r==u||r==u-1)W.commandHistoryIndex=u,n.value="";else{++W.commandHistoryIndex;c=W.commandHistory[W.commandHistoryIndex];n.value=c}}if(t.keyCode===D.TAB){if(t.preventDefault(),null==n)return;var d=n.value;if(""==d)return;const e=d.lastIndexOf(";");-1!==e&&(d=d.slice(e+1));var p=(d=(d=d.trim()).replace(/\s\s+/g," ")).split(" "),m=p.length-2;m<-1&&(m=0);var g=function(e,t=0){var n=[];n=n.concat(Object.keys(a.b));var i=f.a.getCurrentServer();if((e=e.toLowerCase()).startsWith("./")&&-1==t){for(var r=0;r=0;--i)n[i].toLowerCase().startsWith(e.toLowerCase())||n.splice(i,1);else for(var i=n.length-1;i>=0;--i)n[i].toLowerCase().startsWith(t.toLowerCase())||n.splice(i,1);var r="";if(0==n.length)return;if(1==n.length){r=""==t?n[0]+" ":e+" "+n[0];const a=document.getElementById("terminal-input-text-box"),i=a.value,o=i.lastIndexOf(";");a.value=-1===o?r:a.value.slice(0,o+1)+" "+r,document.getElementById("terminal-input-text-box").focus()}else{for(var o=Object(C.longestCommonStart)(n),s="",i=0;i "+e),A(s)):(document.getElementById("terminal-input-text-box").value=o,document.getElementById("terminal-input-text-box").focus()):o==t?(A("> "+e+" "+t),A(s)):(document.getElementById("terminal-input-text-box").value=e+" "+o,document.getElementById("terminal-input-text-box").focus())}}(i,y,g),n.focus()}l.a.ENABLE_BASH_HOTKEYS&&(t.keyCode===D.A&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("home")),t.keyCode===D.E&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("end")),t.keyCode===D.B&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("prevchar")),t.keyCode===D.B&&t.altKey&&(t.preventDefault(),W.moveTextCursor("prevword")),t.keyCode===D.F&&t.ctrlKey&&(t.preventDefault(),W.moveTextCursor("nextchar")),t.keyCode===D.F&&t.altKey&&(t.preventDefault(),W.moveTextCursor("nextword")),t.keyCode!==D.H&&t.keyCode!==D.D||!t.ctrlKey||(W.modifyInput("backspace"),t.preventDefault()))}});let F=!1,H=!1;e(document).ready(function(){s.Engine.currentPage===s.Engine.Page.Terminal&&e(".terminal-input").focus()}),e(document).keydown(function(e){if(s.Engine.currentPage==s.Engine.Page.Terminal)if(17==e.which)F=!0;else if(e.shiftKey)H=!0;else if(F||H);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),F=!1,H=!1}}),e(document).keyup(function(e){s.Engine.currentPage==s.Engine.Page.Terminal&&(17==e.which&&(F=!1),e.shiftKey&&(H=!1))});let W={hackFlag:!1,analyzeFlag:!1,commandHistory:[],commandHistoryIndex:0,resetTerminalInput:function(){document.getElementById("terminal-input-td").innerHTML="
["+f.a.getCurrentServer().hostname+' ~]$
',document.getElementById("terminal-input-header").style.display="inline"},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,i=(t.selectionEnd,t.value);switch(e.toLowerCase()){case"backspace":a>0&&a<=n+1&&(t.value=i.substr(0,a-1)+i.substr(a));break;case"deletewordbefore":for(var r=a-1;r>0;--r)if(" "===i.charAt(r))return void(t.value=i.substr(0,r)+i.substr(a));break;case"deletewordafter":for(r=a+1;r<=text.length+1;++r)if(" "===i.charAt(r))return void(t.value=i.substr(0,a)+i.substr(r))}}catch(e){console.log("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;t.selectionEnd;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 i=a-2;i>=0;--i)if(" "===t.value.charAt(i))return void t.setSelectionRange(i+1,i+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(a+1,a+1);break;case"nextword":for(i=a+1;i<=n;++i)if(" "===t.value.charAt(i))return void t.setSelectionRange(i,i);t.setSelectionRange(n,n);break;default:console.log("WARNING: Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.log("Exception in Terminal.moveTextCursor: "+e)}},finishAction:function(e=!1){W.hackFlag?W.finishHack(e):W.analyzeFlag&&W.finishAnalyze(e)},finishHack:function(t=!1){if(0==t){var n=f.a.getCurrentServer(),a=f.a.calculateHackingChance(),r=Math.random();console.log("Hack success chance: "+a+", rand: "+r);var o=f.a.calculateExpGain(),s=o/4;if(r50&&W.commandHistory.splice(0,1)),W.commandHistoryIndex=W.commandHistory.length,(t=Object(a.h)(t)).startsWith("./")&&(t="run "+t.slice(2));var n=t.split(" ");if(n.length>1&&(n=[n.shift(),n.join(" ")]),0!=n.length)if(u.b){var i=Object(_.c)("foodnstuff");if(null==i)throw new Error("Could not get foodnstuff server");switch(u.a){case u.e.TerminalHelp:"help"==n[0]?(A(c.TerminalHelpText),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalLs:"ls"==n[0]?(W.executeListCommand(n),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalScan:"scan"==n[0]?(W.executeScanCommand(n),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalScanAnalyze1:1==n.length&&"scan-analyze"==n[0]?(W.executeScanAnalyzeCommand(1),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalScanAnalyze2:2==n.length&&"scan-analyze"==n[0]&&"2"==n[1]?(W.executeScanAnalyzeCommand(2),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalConnect:if(2==n.length){if("connect"!=n[0]||"foodnstuff"!=n[1]&&n[1]!=i.ip)return void A("Wrong command! Try again!");f.a.getCurrentServer().isConnectedTo=!1,f.a.currentServer=i.ip,f.a.getCurrentServer().isConnectedTo=!0,A("Connected to foodnstuff"),Object(u.c)()}else A("Bad command. Please follow the tutorial");break;case u.e.TerminalAnalyze:if("analyze"==n[0]){if(1!=n.length)return void A("Incorrect usage of analyze command. Usage: analyze");W.analyzeFlag=!0,A("Analyzing system..."),L("Time left:"),M("["),f.a.analyze(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0),Object(u.c)()}else A("Bad command. Please follow the tutorial");break;case u.e.TerminalNuke:2==n.length&&"run"==n[0]&&"NUKE.exe"==n[1]?(i.hasAdminRights=!0,A("NUKE successful! Gained root access to foodnstuff"),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalManualHack:1==n.length&&"hack"==n[0]?(W.hackFlag=!0,L("Time left:"),M("["),f.a.hack(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.TerminalCreateScript:2==n.length&&"nano"==n[0]&&"foodnstuff.script"==n[1]?(s.Engine.loadScriptEditorContent("foodnstuff.script",""),Object(u.c)()):A("Bad command. Please follow the tutorial");case u.e.TerminalFree:1==n.length&&"free"==n[0]&&(W.executeFreeCommand(n),Object(u.c)());break;case u.e.TerminalRunScript:2==n.length&&"run"==n[0]&&"foodnstuff.script"==n[1]?(W.runScript("foodnstuff.script"),Object(u.c)()):A("Bad command. Please follow the tutorial");break;case u.e.ActiveScriptsToTerminal:if(2==n.length&&"tail"==n[0]&&"foodnstuff.script"==n[1]){if(null==(ce=Object(v.d)("foodnstuff.script",[],f.a.getCurrentServer())))return void A("Error: No such script exists");Object(x.a)(ce),Object(u.c)()}else A("Bad command. Please follow the tutorial");break;default:return void A("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var p=f.a.getCurrentServer();switch(n[0].toLowerCase()){case"alias":if(1==n.length)return void Object(a.f)();if(2==n.length)if(n[1].startsWith("-g ")){var g=n[1].substring(3);if(Object(a.e)(g,!0))return}else if(Object(a.e)(n[1]))return;A('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!=n.length)return void A("Incorrect usage of analyze command. Usage: analyze");W.analyzeFlag=!0,A("Analyzing system..."),L("Time left:"),M("["),f.a.analyze(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0);break;case"buy":E.a.hasOwnProperty("Darkweb Server")?Object(o.c)(n):A("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":if(2!=n.length)return void A("Incorrect usage of cat command. Usage: cat [file]");if(!(q=n[1]).endsWith(".msg")&&!q.endsWith(".lit")&&!q.endsWith(".txt"))return void A("Error: Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");for(var y=0;yf.a.hacking_skill?A("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):(W.hackFlag=!0,L("Time left:"),M("["),f.a.hack(),document.getElementById("terminal-input-td").innerHTML='',e("input[class=terminal-input]").prop("disabled",!0));break;case"help":if(1!=n.length&&2!=n.length)return void A("Incorrect usage of help command. Usage: help");if(1==n.length)A(c.TerminalHelpText);else{var D=n[1],F=c.HelpTexts[D];if(null==F)return void A("Error: No help topics match '"+D+"'");A(F)}break;case"home":if(1!=n.length)return void A("Incorrect usage of home command. Usage: home");f.a.getCurrentServer().isConnectedTo=!1,f.a.currentServer=f.a.getHomeComputer().ip,f.a.getCurrentServer().isConnectedTo=!0,A("Connected to home"),W.resetTerminalInput();break;case"hostname":if(1!=n.length)return void A("Incorrect usage of hostname command. Usage: hostname");A(f.a.getCurrentServer().hostname);break;case"ifconfig":if(1!=n.length)return void A("Incorrect usage of ifconfig command. Usage: ifconfig");A(f.a.getCurrentServer().ip);break;case"kill":if(n.length<2)return void A("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");for(b=(le=n[1].split(" "))[0],w=[],y=1;y=0;--y)Object(m.d)(p.runningScripts[y],p.ip);A("Killing all running scripts. May take up to a few minutes for the scripts to die...");break;case"ls":W.executeListCommand(n);break;case"lscpu":A(f.a.getCurrentServer().cpuCores+" Core(s)");break;case"mem":if(2!=n.length)return void A("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");var H=1;if(-1!=(b=n[1]).indexOf(" -t ")){if(3!=(le=b.split(" ")).length)return void A("Invalid use of run command. Usage: mem [script] [-t] [number threads]");if(H=Math.round(Number(le[2])),isNaN(H)||H<1)return void A("Invalid number of threads specified. Number of threads must be greater than 1");b=le[0]}var G=f.a.getCurrentServer();for(y=0;y');X.includes(".script")||X.includes(".js")||X.includes(".ns")?W.runScript(X):W.runProgram(X)}break;case"scan":W.executeScanCommand(n);break;case"scan-analyze":if(1==n.length)W.executeScanAnalyzeCommand(1);else if(2==n.length){var Q,Z=!1;if(n[1].endsWith("-a")&&(Z=!0,n[1]=n[1].replace("-a","")),Q=0===n[1].length?1:Number(n[1]),isNaN(Q)||Q<0)return void A("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(Q>3&&!f.a.hasProgram(r.a.DeepscanV1.name)&&!f.a.hasProgram(r.a.DeepscanV2.name))return void A("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(Q>5&&!f.a.hasProgram(r.a.DeepscanV2.name))return void A("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(Q>10)return void A("You cannot scan-analyze with that high of a depth. Maximum depth is 10");W.executeScanAnalyzeCommand(Q,Z)}else A("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");break;case"scp":if(2!=n.length)return void A("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");if(2!=(w=n[1].split(" ")).length)return void A("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");var ee=w[0];if(!ee.endsWith(".lit")&&!Object(v.e)(ee)&&!ee.endsWith(".txt"))return void A("Error: scp only works for .script, .txt, and .lit files");var te=Object(_.e)(w[1]);if(null==te)return void A("Invalid destination. "+w[1]+" not found");T=te.ip,G=f.a.getCurrentServer();if(ee.endsWith(".lit")){var ne=!1;for(y=0;ye)){n[s.ip]=1;for(var c=s.serversOnNetwork.length-1;c>=0;--c)a.push(s.getServerOnNetwork(c)),i.push(l+1);if(0!=l){var u=Array(4*(l-1)+1).join("-");f.a.hasProgram(r.a.AutoLink.name)?A(""+u+"> "+s.hostname+""):A(""+u+">"+s.hostname+"");var d=u+"--",h="NO";s.hasAdminRights&&(h="YES"),A(d+"Root Access: "+h+", Required hacking skill: "+s.requiredHackingSkill),A(d+"Number of open ports required to NUKE: "+s.numOpenPortsRequired),A(d+"RAM: "+s.maxRam),A(" ")}}}var p=document.getElementsByClassName("scan-analyze-link");for(c=0;c1?t[0]:e,f.a.hasProgram(n)?W.executeProgram(e):A("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){var t=f.a.getCurrentServer(),n=e.split(" ");n.length>1&&(e=n[0]);const a={};a[r.a.NukeProgram.name]=(e=>{if(!e.hasAdminRights)return e.openPortCount>=f.a.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void A("NUKE successful! Gained root access to "+f.a.getCurrentServer().hostname)):void A("NUKE unsuccessful. Not enough ports have been opened");A("You already have root access to this computer. There is no reason to run NUKE.exe")}),a[r.a.BruteSSHProgram.name]=(e=>{e.sshPortOpen?A("SSH Port (22) is already open!"):(e.sshPortOpen=!0,A("Opened SSH Port(22)!"),e.openPortCount++)}),a[r.a.FTPCrackProgram.name]=(e=>{e.ftpPortOpen?A("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,A("Opened FTP Port (21)!"),e.openPortCount++)}),a[r.a.RelaySMTPProgram.name]=(e=>{e.smtpPortOpen?A("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,A("Opened SMTP Port (25)!"),e.openPortCount++)}),a[r.a.HTTPWormProgram.name]=(e=>{e.httpPortOpen?A("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,A("Opened HTTP Port (80)!"),e.openPortCount++)}),a[r.a.SQLInjectProgram.name]=(e=>{e.sqlPortOpen?A("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,A("Opened SQL Port (1433)!"),e.openPortCount++)}),a[r.a.ServerProfiler.name]=((e,t)=>{if(2!==t.length)return void A("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const n=Object(_.e)(t[1]);null!=n?(A(n.hostname+":"),A("Server base security level: "+n.baseDifficulty),A("Server current security level: "+n.hackDifficulty),A("Server growth rate: "+n.serverGrowth),A("Netscript hack() execution time: "+Object(C.formatNumber)(Object(p.j)(n),1)+"s"),A("Netscript grow() execution time: "+Object(C.formatNumber)(Object(p.h)(n)/1e3,1)+"s"),A("Netscript weaken() execution time: "+Object(C.formatNumber)(Object(p.l)(n)/1e3,1)+"s")):A("Invalid server IP/hostname")}),a[r.a.AutoLink.name]=(()=>{A("This executable cannot be run."),A("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),A("When using scan-analyze, click on a server's hostname to connect to it.")}),a[r.a.DeepscanV1.name]=(()=>{A("This executable cannot be run."),A("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}),a[r.a.DeepscanV2.name]=(()=>{A("This executable cannot be run."),A("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}),a[r.a.Flight.name]=(()=>{if(!(f.a.augmentations.length>=30&&f.a.money.gt(1e11)&&(f.a.hacking_skill>=2500||f.a.strength>=1500&&f.a.defense>=1500&&f.a.dexterity>=1500&&f.a.agility>=1500)))return A("Augmentations: "+f.a.augmentations.length+" / 30"),A("Money: "+y()(f.a.money.toNumber()).format("($0.000a)")+" / "+y()(1e11).format("($0.000a)")),A("One path below must be fulfilled..."),A("----------HACKING PATH----------"),A("Hacking skill: "+f.a.hacking_skill+" / 2500"),A("----------COMBAT PATH----------"),A("Strength: "+f.a.strength+" / 1500"),A("Defense: "+f.a.defense+" / 1500"),A("Dexterity: "+f.a.dexterity+" / 1500"),void A("Agility: "+f.a.agility+" / 1500");A("We will contact you."),A("-- Daedalus --")}),a[r.a.BitFlume.name]=(()=>{const e=Object(I.d)(),t=Object(I.c)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",function(){return Object(b.a)(f.a.bitNodeN,!0),Object(I.a)()}),t.addEventListener("click",function(){return Object(I.a)()}),Object(I.b)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.

Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.")}),a.hasOwnProperty(e)?a[e](t,n):A("Invalid executable. Cannot be run")},runScript:function(e){var t=f.a.getCurrentServer(),n=1,a=[],i=e.split(" ");if(i.length<=0&&A("This is a bug. Please contact developer"),e=i[0],i.length>1)if(i.length>=3&&"-t"==i[1]){if(n=Math.round(Number(i[2])),isNaN(n)||n<1)return void A("Invalid number of threads specified. Number of threads must be greater than 0");for(var r=3;ru)return void A("This machine does not have enough RAM to run this script with "+n+" threads. Script requires "+c+"GB of RAM");A("Running script with "+n+" thread(s) and args: "+Object(T.arrayToString)(a)+"."),A("May take a few seconds to start up the process...");var d=new v.b(l,a);return d.threads=n,t.runningScripts.push(d),void Object(m.c)(d,t)}A("ERROR: No such script")}else A("ERROR: This script is already running. Cannot run multiple instances")}}}).call(this,n(53))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(32),i=n(44);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=a.isString(e)?i.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";(function(e){n.d(t,"a",function(){return V});var a=n(18),i=n(16),r=n(1),o=n(6),s=n(12),l=n(4),c=n(0),u=n(47),d=n(25),h=n(64),p=n(8),m=n(27),g=n(10),y=n(14),f=n.n(y),b=n(43),v=n(46),_=n(59),k=n(3),E=n(36),O=n(42),C=n(2),w=n(5),S=n(55),T=n(20),R=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],x=1e9,I="bladeburner-active-action",P=[],N=0,A={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
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 M(e={}){this.name=e.name?e.name:l.a.Sector12,this.pop=e.pop?e.pop:Object(w.getRandomInt)(8e8,1.2*x),this.popEst=this.pop*(Math.random()+.5),this.comms=e.comms?e.comms:Object(w.getRandomInt)(1,40),this.commsEst=this.comms+Object(w.getRandomInt)(-2,2),this.commsEst<0&&(this.commsEst=0),this.chaos=0}function L(e={name:"foo",desc:"foo"}){if(!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(this.name=e.name,!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");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.weaponAbility&&(this.weaponAbility=e.weaponAbility),e.gunAbility&&(this.gunAbility=e.gunAbility)}e(document).keydown(function(e){if(o.Engine.currentPage===o.Engine.Page.Bladeburner){if(!(c.a.bladeburner instanceof V))return;if(e.keyCode===d.a.ENTER){e.preventDefault();var t=Y.consoleInput.value;t.length>0&&(c.a.bladeburner.postToConsole("> "+t),c.a.bladeburner.resetConsoleInput(),c.a.bladeburner.executeConsoleCommands(t))}if(e.keyCode===d.a.UPARROW){if(null==Y.consoleInput)return;var n=N;if(0===(i=P.length))return;(n<0||n>i)&&(N=i),0!==n&&--N;var a=P[N];Y.consoleInput.value=a,setTimeout(function(){Y.consoleInput.selectionStart=Y.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===d.a.DOWNARROW){if(null==Y.consoleInput)return;var i;n=N;if(0==(i=P.length))return;if((n<0||n>i)&&(N=i),n==i||n==i-1)N=i,Y.consoleInput.value="";else{a=P[++N];Y.consoleInput.value=a}}}}),M.prototype.improvePopulationEstimateByCount=function(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEstthis.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}},M.prototype.changeChaosByCount=function(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))},M.prototype.changeChaosByPercentage=function(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");if(0!==e){var t=this.chaos*(e/100);this.chaos+=t,this.chaos<0&&(this.chaos=0)}},M.prototype.toJSON=function(){return Object(g.Generic_toJSON)("City",this)},M.fromJSON=function(e){return Object(g.Generic_fromJSON)(M,e.data)},g.Reviver.constructors.City=M,L.prototype.calculateCost=function(e){return Math.floor((this.baseCost+e*this.costInc)*i.a.BladeburnerSkillCost)};var B={},j={BladesIntuition:"Blade's Intuition",Reaper:"Reaper",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",Overclock:"Overclock",EvasiveSystem:"Evasive System",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Datamancer:"Datamancer",Tracer:"Tracer",CybersEdge:"Cyber's Edge"};function D(e={}){this.name=e.name?e.name:"",this.desc=e.desc?e.desc:"",this.level=1,this.maxLevel=1,this.autoLevel=!0,this.baseDifficulty=e.baseDifficulty?Object(b.addOffset)(e.baseDifficulty,10):100,this.difficultyFac=e.difficultyFac?e.difficultyFac:1.01,this.rewardFac=e.rewardFac?e.rewardFac:1.02,this.successes=0,this.failures=0,this.rankGain=e.rankGain?e.rankGain:0,e.rankLoss&&(this.rankLoss=e.rankLoss),e.hpLoss&&(this.hpLoss=e.hpLoss,this.hpLost=0),this.isStealth=!!e.isStealth,this.isKill=!!e.isKill,this.count=e.count?e.count:Object(w.getRandomInt)(1e3,25e3),this.countGrowth=e.countGrowth?e.countGrowth:Object(w.getRandomInt)(1,5);this.weights=e.weights?e.weights:{hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7};var t=0;for(var n in this.weights)this.weights.hasOwnProperty(n)&&(t+=this.weights[n]);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(var a in this.decays=e.decays?e.decays:{hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9},this.decays)if(this.decays.hasOwnProperty(a)&&this.decays[a]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}D.prototype.getDifficulty=function(){var e=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(e))throw new Error("Calculated NaN in Action.getDifficulty()");return e},D.prototype.getSuccessChance=function(e,t={}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");var n=this.getDifficulty(),a=0;for(var i in this.weights)if(this.weights.hasOwnProperty(i)){var r=c.a.queryStatFromString(i),o="eff"+i.charAt(0).toUpperCase()+i.slice(1),s=e.skillMultipliers[o];null==s&&(console.log("ERROR: Failed to find Bladeburner Skill multiplier for: "+i),s=1),a+=this.weights[i]*Math.pow(s*r,this.decays[i])}(a*=e.calculateStaminaPenalty(),this instanceof U||this instanceof q)&&(this.teamCount&&this.teamCount>0&&(this.teamCount=Math.min(this.teamCount,e.teamSize),a*=Math.pow(this.teamCount,.05)));if(!(this instanceof q)){var l=e.getCurrentCity();if(t.est?a*=l.popEst/x:a*=l.pop/x,l.chaos>50){var u=l.chaos-50+1;n*=Math.pow(u,.1)}if(this instanceof U&&"Raid"===this.name&&l.comms<=0)return 0}if(a*=e.skillMultipliers.successChanceAll,(this instanceof U||this instanceof q)&&(a*=e.skillMultipliers.successChanceOperation),this instanceof G&&(a*=e.skillMultipliers.successChanceContract),this.isStealth&&(a*=e.skillMultipliers.successChanceStealth),this.isKill&&(a*=e.skillMultipliers.successChanceKill),a*=c.a.bladeburner_success_chance_mult,isNaN(a))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,a/n)},D.prototype.attempt=function(e){return Math.random()=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel},D.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Action",this)},D.fromJSON=function(e){return Object(g.Generic_fromJSON)(D,e.data)},g.Reviver.constructors.Action=D;var F={},H=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7});function W(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function G(e={}){D.call(this,e)}function U(e={}){D.call(this,e),this.reqdRank=e.reqdRank?e.reqdRank:100,this.teamCount=e.teamCount?e.teamCount:0}function q(e={}){U.call(this,e),this.count=1,this.countGrowth=0}W.prototype.toJSON=function(){return Object(g.Generic_toJSON)("ActionIdentifier",this)},W.fromJSON=function(e){return Object(g.Generic_fromJSON)(W,e.data)},g.Reviver.constructors.ActionIdentifier=W,G.prototype=Object.create(D.prototype),G.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Contract",this)},G.fromJSON=function(e){return Object(g.Generic_fromJSON)(G,e.data)},g.Reviver.constructors.Contract=G,U.prototype=Object.create(D.prototype),U.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Operation",this)},U.fromJSON=function(e){return Object(g.Generic_fromJSON)(U,e.data)},g.Reviver.constructors.Operation=U,q.prototype=Object.create(D.prototype),q.prototype.toJSON=function(){return Object(g.Generic_toJSON)("BlackOperation",this)},q.fromJSON=function(e){return Object(g.Generic_fromJSON)(q,e.data)},g.Reviver.constructors.BlackOperation=q;var K={};function V(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.storedCycles=0,this.randomEventCounter=Object(w.getRandomInt)(300,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t,n=H.Idle;this.action=new W({type:n}),this.cities={};for(var a=0;a
Does NOT require stamina."}),F[t="Recruitment"]=new D({name:t,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.

Does NOT require stamina."}),K["Operation Typhoon"]=new q({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.

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}),K["Operation Zero"]=new q({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. It's leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.

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}),K["Operation X"]=new q({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.

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}),K["Operation Titan"]=new q({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.

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}),K["Operation Ares"]=new q({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.

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}),K["Operation Archangel"]=new q({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.

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}),K["Operation Juggernaut"]=new q({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.

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}),K["Operation Red Dragon"]=new q({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.

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}),K["Operation K"]=new q({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.

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 eliminateanyone 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}),K["Operation Deckard"]=new q({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.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}),K["Operation Tyrell"]=new q({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.

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}),K["Operation Wallace"]=new q({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.

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}),K["Operation Shoulder of Orion"]=new q({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.

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}),K["Operation Hyron"]=new q({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.

I do not need to remind you why sentient-level AIs pose a serious thread to all of mankind.

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}),K["Operation Morpheus"]=new q({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.

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}),K["Operation Ion Storm"]=new q({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.

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}),K["Operation Annihilus"]=new q({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}),K["Operation Ultron"]=new q({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.

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.

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).

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}),K["Operation Centurion"]=new q({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

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.

It seems that the universe is not without a sense of irony.

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}}),K["Operation Vindictus"]=new q({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.

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}}),K["Operation Daedalus"]=new q({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}}),this.initializeDomElementRefs(),e.new&&this.create()}V.prototype.prestige=function(){this.resetAction();var e=s.b.Bladeburners;this.rank>=25&&Object(s.h)(e)},V.prototype.create=function(){this.contracts.Tracking=new G({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

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:Object(w.getRandomInt)(300,800),countGrowth:Object(w.getRandomInt)(1,5),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 G({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

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:Object(w.getRandomInt)(200,750),countGrowth:Object(w.getRandomInt)(1,3),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 G({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.

Successfully copmleting 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:Object(w.getRandomInt)(300,900),countGrowth:Object(w.getRandomInt)(1,4),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 U({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.

Successful Investigation ops will increase the accuracy of your synthoid data.

You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2,rankLoss:.2,count:Object(w.getRandomInt)(50,400),countGrowth:1,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 U({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.

Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4,rankLoss:.4,hpLoss:2,count:Object(w.getRandomInt)(50,300),countGrowth:1,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 U({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,rankLoss:.5,hpLoss:2.5,count:Object(w.getRandomInt)(25,400),countGrowth:.75,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 U({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:50,rankLoss:2.5,hpLoss:50,count:Object(w.getRandomInt)(25,150),countGrowth:.2,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 U({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:20,rankLoss:2,hpLoss:10,count:Object(w.getRandomInt)(25,250),countGrowth:.1,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 U({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:40,rankLoss:4,hpLoss:5,count:Object(w.getRandomInt)(25,200),countGrowth:.1,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})},V.prototype.storeCycles=function(e=1){this.storedCycles+=e},V.prototype.process=function(){if(!1===u.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(u.a)(c.a.bitNodeN);if(!1===a.c[a.b.BladesSimulacrum].owned&&c.a.isWorking&&(this.action.type!==H.Idle&&Object(p.dialogBoxCreate)("Your Bladeburner action was cancelled because you started doing something else"),this.resetAction()),this.storedCycles>=5){var e=Math.floor(this.storedCycles/5);for(var t in e=Math.min(e,5),this.storedCycles-=5*e,this.calculateMaxStamina(),this.stamina+=this.calculateStaminaGainPerSecond()*e,this.stamina=Math.min(this.maxStamina,this.stamina),this.contracts)if(this.contracts.hasOwnProperty(t)){var n=this.contracts[t];n.count+=e*n.countGrowth/300}for(var i in this.operations)if(this.operations.hasOwnProperty(i)){var r=this.operations[i];r.count+=e*r.countGrowth/300}for(var s=0;s=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=this.automateActionHigh,this.startAction(this.action)))),o.Engine.currentPage===o.Engine.Page.Bladeburner&&this.updateContent()}},V.prototype.calculateMaxStamina=function(){var e=c.a.agility*this.skillMultipliers.effAgi,t=Math.pow(e,.8)+this.staminaBonus;if(t*=this.skillMultipliers.stamina,t*=c.a.bladeburner_max_stamina_mult,isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");this.maxStamina=t},V.prototype.calculateStaminaGainPerSecond=function(){var e=c.a.agility*this.skillMultipliers.effAgi;return(.0085+this.maxStamina/7e4)*Math.pow(e,.17)*(this.skillMultipliers.stamina*c.a.bladeburner_stamina_gain_mult)},V.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},V.prototype.changeRank=function(e){if(isNaN(e))throw new Error("NaN passed into Bladeburner.changeRank()");this.rank+=e,this.rank<0&&(this.rank=0),this.maxRank=Math.max(this.rank,this.maxRank);if(Object(s.d)("Bladeburners")){var t=s.b.Bladeburners;if(!(t instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");if(t.isMember){var n=1+t.favor/100;t.playerReputation+=2*e*c.a.faction_rep_mult*n}}var a=4*(this.totalSkillPoints+1);if(this.maxRank>=a){var i=Math.floor((this.maxRank-a)/4+1);this.skillPoints+=i,this.totalSkillPoints+=i}},V.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof M))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},V.prototype.resetSkillMultipliers=function(){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,weaponAbility:1,gunAbility:1}},V.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=B[e];if(null==t)throw new Error("Could not find Skill Object for: "+e);var n=this.skills[e];if(null==n||n<=0)continue;for(var a=Object.keys(this.skillMultipliers),i=0;i=this.actionTimeToComplete?this.completeAction():void 0}},V.prototype.completeAction=function(){switch(this.action.type){case H.Contract:case H.Operation:try{var e=this.action.type===H.Operation;if(null==(m=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=m.getDifficulty(),n=Math.pow(t,.28)+t/650,a=Math.pow(m.rewardFac,m.level-1);if(this.stamina-=.285*n,this.stamina<0&&(this.stamina=0),m.attempt(this)){this.gainActionStats(m,!0),++m.successes,--m.count;var s=0;if(e||(s=4e4*a,c.a.gainMoney(s)),e?m.setMaxLevel(2.5):m.setMaxLevel(3),m.rankGain){var l=Object(b.addOffset)(m.rankGain*a*i.a.BladeburnerRank,10);this.changeRank(l),e&&this.logging.ops?this.log(m.name+" successfully completed! Gained "+Object(C.formatNumber)(l,3)+" rank"):!e&&this.logging.contracts&&this.log(m.name+" contract successfully completed! Gained "+Object(C.formatNumber)(l,3)+" rank and "+f()(s).format("$0.000a"))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(m,!1),++m.failures;var d=0,h=0;m.rankLoss&&(d=Object(b.addOffset)(m.rankLoss*a,10),this.changeRank(-1*d)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(b.addOffset)(h,10)),this.hpLost+=h,c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp));var p="";d>0&&(p+="Lost "+Object(C.formatNumber)(d,3)+" rank."),h>0&&(p+="Took "+Object(C.formatNumber)(h,0)+" damage."),e&&this.logging.ops?this.log(m.name+" failed! "+p):!e&&this.logging.contracts&&this.log(m.name+" contract failed! "+p),e?this.completeOperation(!1):this.completeContract(!1)}m.autoLevel&&(m.level=m.maxLevel),this.startAction(this.action)}catch(e){Object(O.a)(e)}break;case H.BlackOp:case H.BlackOperation:try{var m;if(null==(m=this.getActionObject(this.action))||!(m instanceof q))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=m.getDifficulty(),n=Math.pow(t,.28)+t/650;this.stamina-=.285*n,this.stamina<0&&(this.stamina=0);var g,y=m.teamCount;if(m.attempt(this)){this.gainActionStats(m,!0),m.count=0,this.blackops[m.name]=!0;var v=0;if(m.rankGain&&(v=Object(b.addOffset)(m.rankGain*i.a.BladeburnerRank,10),this.changeRank(v)),g=Math.ceil(y/2),"Operation Daedalus"===m.name)return this.resetAction(),Object(u.a)(c.a.bitNodeN);o.Engine.currentPage===o.Engine.Page.Bladeburner&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(m.name+" successful! Gained "+Object(C.formatNumber)(v,1)+" rank")}else{this.gainActionStats(m,!1);var _=0;h=0;m.rankLoss&&(_=Object(b.addOffset)(m.rankLoss,10),this.changeRank(-1*_)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(b.addOffset)(h,10)),c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp)),g=Math.floor(y),this.logging.blackops&&this.log(m.name+" failed! Lost "+Object(C.formatNumber)(_,1)+" rank and took "+Object(C.formatNumber)(h,0)+" damage")}if(this.resetAction(),y>=1){var k=Object(w.getRandomInt)(1,g);this.teamSize-=k,this.teamLost+=k,this.logging.blackops&&this.log("You lost "+Object(C.formatNumber)(k,0)+" team members during "+m.name)}}catch(e){Object(O.a)(e)}break;case H.Training:this.stamina-=.1425;var E=30*c.a.strength_exp_mult,S=30*c.a.defense_exp_mult,T=30*c.a.dexterity_exp_mult,R=30*c.a.agility_exp_mult,x=.04*this.skillMultipliers.stamina;c.a.gainStrengthExp(E),c.a.gainDefenseExp(S),c.a.gainDexterityExp(T),c.a.gainAgilityExp(R),this.staminaBonus+=x,this.logging.general&&this.log("Training completed. Gained: "+Object(C.formatNumber)(E,1)+" str exp, "+Object(C.formatNumber)(S,1)+" def exp, "+Object(C.formatNumber)(T,1)+" dex exp, "+Object(C.formatNumber)(R,1)+" agi exp, "+Object(C.formatNumber)(x,3)+" max stamina"),this.startAction(this.action);break;case H.FieldAnalysis:case H["Field Analysis"]:var I=.04*Math.pow(c.a.hacking_skill,.3)+.04*Math.pow(c.a.intelligence,.9)+.02*Math.pow(c.a.charisma,.3);if(I*=c.a.bladeburner_analysis_mult,isNaN(I)||I<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var P=20*c.a.hacking_exp_mult,N=20*c.a.charisma_exp_mult;c.a.gainHackingExp(P),c.a.gainIntelligenceExp(.001),c.a.gainCharismaExp(N),this.changeRank(.1),console.log("DEBUG: Field Analysis effectiveness is "+I*this.skillMultipliers.successChanceEstimate),this.getCurrentCity().improvePopulationEstimateByPercentage(I*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(C.formatNumber)(P,1)+" hacking exp, and "+Object(C.formatNumber)(N,1)+" charisma exp"),this.startAction(this.action);break;case H.Recruitment:var A=this.getRecruitmentSuccessChance();if(console.log("Bladeburner recruitment success chance: "+A),Math.random()=1){n=e?Math.ceil(a/2):Math.floor(a);var i=Object(w.getRandomInt)(0,n);this.teamSize-=i,this.teamLost+=i,this.logging.ops&&i>0&&this.log("Lost "+Object(C.formatNumber)(i,0)+" team members during this "+t.name)}var r=this.getCurrentCity();switch(t.name){case"Investigation":e?(r.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(r.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&r.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByCount(.1);break;case"Raid":if(e)r.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--r.comms,--r.commsEst;else{var o=Object(w.getRandomInt)(-3,-1);r.changePopulationByPercentage(o,{nonZero:!0})}r.changeChaosByPercentage(Object(w.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&r.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByPercentage(Object(w.getRandomInt)(-3,-1));break;case"Assassination":e&&r.changePopulationByCount(-1,{estChange:-1}),r.changeChaosByPercentage(Object(w.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},V.prototype.getRecruitmentTime=function(){var e=c.a.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(300-t))},V.prototype.getRecruitmentSuccessChance=function(){return Math.pow(c.a.charisma,.45)/(this.teamSize+1)},V.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),a=Math.pow(n,.28)+n/650,i=this.actionTimeToComplete,r=t?1:.5,o=1*i*r*a,s=.001*i*r*a;c.a.gainHackingExp(o*e.weights.hack*c.a.hacking_exp_mult),c.a.gainStrengthExp(o*e.weights.str*c.a.strength_exp_mult),c.a.gainDefenseExp(o*e.weights.def*c.a.defense_exp_mult),c.a.gainDexterityExp(o*e.weights.dex*c.a.dexterity_exp_mult),c.a.gainAgilityExp(o*e.weights.agi*c.a.agility_exp_mult),c.a.gainCharismaExp(o*e.weights.cha*c.a.charisma_exp_mult),c.a.gainIntelligenceExp(s*e.weights.int)},V.prototype.randomEvent=function(){var e=Math.random(),t=R[Object(w.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof M))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var a=R[Object(w.getRandomInt)(0,5)];a===t;)a=R[Object(w.getRandomInt)(0,5)];var i=this.cities[a];if(!(n instanceof M&&i instanceof M))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,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;r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++i.comms;r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop-=o,i.pop+=o,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){r=Object(w.getRandomInt)(8,24)/100,o=Math.round(n.pop*r);n.pop+=o,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+Object(w.getRandomInt)(5,10)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){r=Object(w.getRandomInt)(5,20)/100,o=Math.round(n.pop*r);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},V.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.log("ERROR: Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()0&&(r*=Object(w.getRandomInt)(2,4),--a.comms,++n.comms);var o=Math.round(a.pop*r);a.pop-=o,n.pop+=o};var Y={};V.prototype.initializeDomElementRefs=function(){Y={bladeburnerDiv:null,overviewConsoleParentDiv:null,overviewDiv:null,actionAndSkillsDiv:null,currentTab:null,consoleDiv:null,consoleTable:null,consoleInputRow:null,consoleInputCell:null,consoleInputHeader:null,consoleInput:null,overviewRank:null,overviewStamina:null,overviewStaminaHelpTip:null,overviewGen1:null,overviewEstPop:null,overviewEstPopHelpTip:null,overviewEstComms:null,overviewChaos:null,overviewSkillPoints:null,overviewBonusTime:null,overviewAugSuccessMult:null,overviewAugMaxStaminaMult:null,overviewAugStaminaGainMult:null,overviewAugAnalysisMult:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},V.prototype.createContent=function(){Y.bladeburnerDiv=Object(k.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),Y.overviewConsoleParentDiv=Object(k.createElement)("div",{height:"60%",display:"block",position:"relative"}),Y.overviewDiv=Object(k.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),Y.actionAndSkillsDiv=Object(k.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),Y.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),Y.consoleDiv=Object(k.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(Y.consoleInput instanceof Element&&Y.consoleInput.focus(),!1)}),Y.consoleTable=Object(k.createElement)("table",{class:"bladeburner-console-table"}),Y.consoleInputRow=Object(k.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),Y.consoleInputCell=Object(k.createElement)("td",{class:"bladeburner-console-input-cell"}),Y.consoleInputHeader=Object(k.createElement)("pre",{innerText:"> "}),Y.consoleInput=Object(k.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{Y.consoleInput.value=Y.consoleInput.value}}),Y.consoleInputCell.appendChild(Y.consoleInputHeader),Y.consoleInputCell.appendChild(Y.consoleInput),Y.consoleInputRow.appendChild(Y.consoleInputCell),Y.consoleTable.appendChild(Y.consoleInputRow),Y.consoleDiv.appendChild(Y.consoleTable),Y.overviewConsoleParentDiv.appendChild(Y.overviewDiv),Y.overviewConsoleParentDiv.appendChild(Y.consoleDiv),Y.bladeburnerDiv.appendChild(Y.overviewConsoleParentDiv),Y.bladeburnerDiv.appendChild(Y.actionAndSkillsDiv),document.getElementById("entire-game-container").appendChild(Y.bladeburnerDiv),this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands"),Y.consoleInput.focus()},V.prototype.clearContent=function(){Y.bladeburnerDiv instanceof Element&&(Object(m.removeChildrenFromElement)(Y.bladeburnerDiv),Object(S.removeElement)(Y.bladeburnerDiv)),Object(_.clearObject)(Y),this.initializeDomElementRefs()},V.prototype.createOverviewContent=function(){if(null==Y.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");Y.overviewRank=Object(k.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),Y.overviewStamina=Object(k.createElement)("p",{display:"inline-block"}),Y.overviewStaminaHelpTip=Object(k.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(p.dialogBoxCreate)("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.

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).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),Y.overviewGen1=Object(k.createElement)("p",{display:"block"}),Y.overviewEstPop=Object(k.createElement)("p",{innerText:"Est. Synthoid Population: ",display:"inline-block",tooltip:"This is your Bladeburner division's estimate of how many Synthoids exist in your current city."}),Y.overviewEstPopHelpTip=Object(k.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(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.

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.

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.")}}),Y.overviewEstComms=Object(k.createElement)("p",{innerText:"Est. Synthoid Communities: ",display:"inline-block",tooltip:"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city."}),Y.overviewChaos=Object(k.createElement)("p",{innerText:"City Chaos: ",display:"inline-block",tooltip:"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."}),Y.overviewBonusTime=Object(k.createElement)("p",{innerText:"Bonus time: ",display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed."}),Y.overviewSkillPoints=Object(k.createElement)("p",{display:"block"}),Y.overviewAugSuccessMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugMaxStaminaMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugStaminaGainMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugAnalysisMult=Object(k.createElement)("p",{display:"block"}),Y.overviewDiv.appendChild(Y.overviewRank),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewStamina),Y.overviewDiv.appendChild(Y.overviewStaminaHelpTip),Y.overviewDiv.appendChild(Y.overviewGen1),Y.overviewDiv.appendChild(Y.overviewEstPop),Y.overviewDiv.appendChild(Y.overviewEstPopHelpTip),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewEstComms),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewChaos),Object(v.appendLineBreaks)(Y.overviewDiv,2),Y.overviewDiv.appendChild(Y.overviewBonusTime),Y.overviewDiv.appendChild(Y.overviewSkillPoints),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewAugSuccessMult),Y.overviewDiv.appendChild(Y.overviewAugMaxStaminaMult),Y.overviewDiv.appendChild(Y.overviewAugStaminaGainMult),Y.overviewDiv.appendChild(Y.overviewAugAnalysisMult),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Object(k.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(e),!1)})),t.push(Object(k.createElement)("p",{innerText:"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"}));for(var n=0;n(n.city=R[a],Object(T.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(E.createPopup)(e,t)}}));if(Object(s.d)("Bladeburners")){var e=s.b.Bladeburners;if(!(e instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");Y.overviewDiv.appendChild(Object(k.createElement)("a",{innerText:"Faction",class:"a-link-button",display:"inline-block",tooltip:"Apply to the Bladeburner Faction, or go to the faction page if you are already a member",clickListener:()=>(e.isMember?(o.Engine.loadFactionContent(),Object(s.c)("Bladeburners")):this.rank>=25?(Object(s.h)(e),Object(p.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(m.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()):Object(p.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}Y.overviewDiv.appendChild(Object(k.createElement)("br")),Y.overviewDiv.appendChild(Object(k.createElement)("br")),this.updateOverviewContent()},V.prototype.createActionAndSkillsContent=function(){null==Y.currentTab&&(Y.currentTab="general"),Object(m.removeChildrenFromElement)(Y.actionAndSkillsDiv),Object(_.clearObject)(Y.generalActions),Object(_.clearObject)(Y.contracts),Object(_.clearObject)(Y.operations),Object(_.clearObject)(Y.blackops),Object(_.clearObject)(Y.skills);for(var e=Y.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n(Y.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(Y.actionsAndSkillsDesc=Object(k.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(m.removeChildrenFromElement)(Y.actionsAndSkillsList),Y.actionsAndSkillsList=Object(k.createElement)("ul"),e){case"general":this.createGeneralActionsContent();break;case"contracts":this.createContractsContent();break;case"operations":this.createOperationsContent();break;case"blackops":this.createBlackOpsContent();break;case"skills":this.createSkillsContent();break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}this.updateContent(),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsDesc),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsList)},V.prototype.createGeneralActionsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",F)F.hasOwnProperty(e)&&(Y.generalActions[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.generalActions[e]))},V.prototype.createContractsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="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.

You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.",this.contracts)this.contracts.hasOwnProperty(e)&&(Y.contracts[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.contracts[e]))},V.prototype.createOperationsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="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.

Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.

For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.

You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.",this.operations)this.operations.hasOwnProperty(e)&&(Y.operations[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.operations[e]))},V.prototype.createBlackOpsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");Y.actionsAndSkillsDesc.innerHTML="Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.

Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.";var e=[];for(var t in K)K.hasOwnProperty(t)&&e.push(K[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=0;n
Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.

";for(var e=Object.keys(this.skillMultipliers),t=0;t";break;case"successChanceStealth":Y.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"
";break;case"successChanceKill":Y.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"
";break;case"successChanceContract":Y.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"
";break;case"successChanceOperation":Y.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"
";break;case"successChanceEstimate":Y.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"
";break;case"actionTime":Y.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"
";break;case"effHack":Y.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"
";break;case"effStr":Y.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"
";break;case"effDef":Y.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"
";break;case"effDex":Y.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"
";break;case"effAgi":Y.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"
";break;case"effCha":Y.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"
";break;case"effInt":Y.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"
";break;case"stamina":Y.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"
";break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+e[t])}}for(var a in Y.skillPointsDisplay=Object(k.createElement)("p",{innerHTML:"
Skill Points: "+Object(C.formatNumber)(this.skillPoints,0)+""}),Y.actionAndSkillsDiv.appendChild(Y.skillPointsDisplay),B)B.hasOwnProperty(a)&&(Y.skills[a]=Object(k.createElement)("div",{class:"bladeburner-action",name:a}),Y.actionsAndSkillsList.appendChild(Y.skills[a]))},V.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},V.prototype.updateOverviewContent=function(){o.Engine.currentPage===o.Engine.Page.Bladeburner&&(Y.overviewRank.childNodes[0].nodeValue="Rank: "+Object(C.formatNumber)(this.rank,2),Y.overviewStamina.innerText="Stamina: "+Object(C.formatNumber)(this.stamina,3)+" / "+Object(C.formatNumber)(this.maxStamina,3),Y.overviewGen1.innerHTML="Stamina Penalty: "+Object(C.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%

Team Size: "+Object(C.formatNumber)(this.teamSize,0)+"
Team Members Lost: "+Object(C.formatNumber)(this.teamLost,0)+"

Num Times Hospitalized: "+this.numHosp+"
Money Lost From Hospitalizations: "+f()(this.moneyLost).format("$0.000a")+"

Current City: "+this.city+"
",Y.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+f()(this.getCurrentCity().popEst).format("0.000a"),Y.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(C.formatNumber)(this.getCurrentCity().comms,0),Y.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(C.formatNumber)(this.getCurrentCity().chaos),Y.overviewSkillPoints.innerText="Skill Points: "+Object(C.formatNumber)(this.skillPoints,0),Y.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+this.storedCycles/5,Y.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_success_chance_mult,1)+"%",Y.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_max_stamina_mult,1)+"%",Y.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_stamina_gain_mult,1)+"%",Y.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_analysis_mult,1)+"%")},V.prototype.updateActionAndSkillsContent=function(){switch(null==Y.currentTab&&(Y.currentTab="general"),Y.currentTab.toLowerCase()){case"general":for(var e=Object.keys(Y.generalActions),t=0;t";var m=Object.keys(Y.skills);for(t=0;t(this.action.type=H[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},V.prototype.updateContractsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:i})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=H.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3)+" successes needed for next level"})),e.appendChild(Object(k.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)})),e.appendChild(Object(k.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)}));var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*a,1)+"%\nTime Required (s): "+Object(C.formatNumber)(o,0)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(k.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(k.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase contract level when possible"}));var l=Object(k.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateOperationsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:i})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=H.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(k.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(k.createElement)("p",{innerText:"Enter the amount of team members you would like to take on these operations. 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."}),i=Object(k.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(k.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(p.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateOperationsUIElement(e,t)),Object(T.removeElementById)(n),!1}}),o=Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(n),!1)});Object(E.createPopup)(n,[a,i,r,o])}}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(2.5)+" successes needed for next level"})),e.appendChild(Object(k.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)})),e.appendChild(Object(k.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)}));t.getDifficulty();var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*a,1)+"%\nTime Required(s): "+Object(C.formatNumber)(o,1)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(k.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(k.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase operation level when possible"}));var l=Object(k.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateBlackOpsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=null!=this.blackops[t.name],i=t.getSuccessChance(this,{est:!0}),r=(t.getDifficulty(),t.getActionTime(this)),o=this.rank>=t.reqdRank;if(a)e.appendChild(Object(k.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var s=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:s})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=H.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(k.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(k.createElement)("p",{innerText:"Enter the amount of team members you would like to take on this BlackOp. 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."}),i=Object(k.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(k.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(p.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateBlackOpsUIElement(e,t)),Object(T.removeElementById)(n),!1}}),o=Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(n),!1)});Object(E.createPopup)(n,[a,i,r,o])}}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("p",{display:"inline-block",innerHTML:"
"+t.desc+"

"})),e.appendChild(Object(k.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(C.formatNumber)(t.reqdRank,0)+"
"})),e.appendChild(Object(k.createElement)("p",{display:"inline-block",innerHTML:"Estimated Success Chance: "+Object(C.formatNumber)(100*i,1)+"%\nTime Required(s): "+Object(C.formatNumber)(r,1)}))}},V.prototype.updateSkillsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=t.name,a=0;this.skills[n]&&!isNaN(this.skills[n])&&(a=this.skills[n]);var i=t.calculateCost(a);e.appendChild(Object(k.createElement)("h2",{innerText:t.name+" (Lvl "+a+")",display:"inline-block"}));var r=this.skillPoints>=i,o=!!t.maxLvl&&a>=t.maxLvl;e.appendChild(Object(k.createElement)("a",{innerText:"Level",display:"inline-block",class:r&&!o?"a-link-button":"a-link-button-inactive",margin:"3px",padding:"3px",clickListener:()=>{if(!(this.skillPoints'+t+""),Y.consoleTable.childNodes.length>200&&Y.consoleTable.removeChild(Y.consoleTable.firstChild),this.updateConsoleScroll())},V.prototype.updateConsoleScroll=function(){Y.consoleDiv.scrollTop=Y.consoleDiv.scrollHeight},V.prototype.resetConsoleInput=function(){Y.consoleInput.value=""},V.prototype.clearConsole=function(){for(;Y.consoleTable.childNodes.length>1;)Y.consoleTable.removeChild(Y.consoleTable.firstChild)},V.prototype.log=function(e){var t=new Date,n=t.getMonth()+"/"+t.getDay()+" "+t.getHours()+":"+t.getMinutes();this.postToConsole("["+n+"] "+e)},V.prototype.executeConsoleCommands=function(e){try{P[P.length-1]!=e&&(P.push(e),P.length>50&&P.splice(0,1)),N=P.length;for(var t=e.split(";"),n=0;n"))}},V.prototype.executeLogConsoleCommand=function(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");var 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]")}},V.prototype.executeSkillConsoleCommand=function(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: ");for(var t=Object.keys(B),n=0;n=c?(this.skillPoints-=c,this.upgradeSkill(a),this.log(a.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(C.formatNumber)(c,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")}},V.prototype.executeStartConsoleCommand=function(e){if(3!==e.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");var t=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=F[t]?(this.action.type=H[t],this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid action name specified: "+e[2]);break;case"contract":case"contracts":null!=this.contracts[t]?(this.action.type=H.Contract,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid contract name specified: "+e[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[t]?(this.action.type=H.Operation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid Operation name specified: "+e[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=K[t]?(this.action.type=H.BlackOperation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid BlackOp name specified: "+e[2]);break;default:this.postToConsole("Invalid action/event type specified: "+e[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}},V.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new W,a=e.toLowerCase().trim(),i=t.toLowerCase().trim();switch(a){case"contract":case"contracts":case"contr":return n.type=H.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=H.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=H.BlackOp,K.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(a.startsWith("gen")){switch(i){case"training":n.type=H.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=H.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=H["Field Analysis"],n.name="Field Analysis";break;default:return null}return n}},V.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(H);for(let a=0;a=a.maxLvl?(t.shouldLog("upgradeSkill")&&t.log(`bladeburner.upgradeSkill() failed because ${e} is already maxed`),!1):this.skillPoints=25?(Object(s.h)(t),e.shouldLog("joinBladeburnerFaction")&&e.log("Joined Bladeburners Faction"),o.Engine.currentPage===o.Engine.Page.Bladeburner&&(Object(m.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()),!0):(e.shouldLog("joinBladeburnerFaction")&&e.log("Failed to join Bladeburners Faction because you do not have the required 25 rank"),!1))},V.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Bladeburner",this)},V.fromJSON=function(e){return Object(g.Generic_fromJSON)(V,e.data)},g.Reviver.constructors.Bladeburner=V}).call(this,n(53))},function(e,t,n){"use strict";n.d(t,"e",function(){return s}),n.d(t,"d",function(){return u}),n.d(t,"c",function(){return h}),n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var a=n(6),i=n(0),r=n(8),o=n(13);let s={Start:"Start",GoToCharacterPage:"Click on the Character page menu link",CharacterPage:"Introduction to Character page",CharacterGoToTerminalPage:"Click on the Terminal link",TerminalIntro:"Introduction to terminal interface",TerminalHelp:"Using the help command to display all options in terminal",TerminalLs:"Use the ls command to show all programs/scripts. Right now we have NUKE.exe",TerminalScan:"Using the scan command to display all available connections",TerminalScanAnalyze1:"Use the scan-analyze command to show hacking related information",TerminalScanAnalyze2:"Use the scan-analyze command with a depth of 3",TerminalConnect:"Using the telnet/connect command to connect to another server",TerminalAnalyze:"Use the analyze command to display details about this server",TerminalNuke:"Use the NUKE Program to gain root access to a server",TerminalManualHack:"Use the hack command to manually hack a server",TerminalHackingMechanics:"Briefly explain hacking mechanics",TerminalCreateScript:"Create a script using nano",TerminalTypeScript:"This occurs in the Script Editor page...type the script then save and close",TerminalFree:"Use the free command to check RAM",TerminalRunScript:"Use the run command to run a script",TerminalGoToActiveScriptsPage:"Go to the ActiveScriptsPage",ActiveScriptsPage:"Introduction to the Active Scripts Page",ActiveScriptsToTerminal:"Go from Active Scripts Page Back to Terminal",TerminalTailScript:"Use the tail command to show a script's logs",GoToHacknetNodesPage:"Go to the Hacknet Nodes page",HacknetNodesIntroduction:"Introduction to Hacknet Nodesm and have user purchase one",HacknetNodesGoToWorldPage:"Go to the world page",WorldDescription:"Tell the user to explore..theres a lot of different stuff to do out there",TutorialPageInfo:"The tutorial page contains a lot of info on different subjects",End:"End"};var l=s.Start,c=!1;function u(){a.Engine.Counters.autoSaveCounter=999e9,console.log("Interactive Tutorial started"),l=s.Start,c=!0,document.getElementById("interactive-tutorial-container").style.display="block",d(),Object(o.clearEventListeners)("interactive-tutorial-exit").addEventListener("click",function(){return p(),!1});var e=Object(o.clearEventListeners)("interactive-tutorial-back");e.style.display="none",e.addEventListener("click",function(){return function(){switch(l){case s.Start:case s.GoToCharacterPage:l=s.Start,d();break;case s.CharacterPage:l=s.GoToCharacterPage,d();break;case s.CharacterGoToTerminalPage:l=s.CharacterPage,d();break;case s.TerminalIntro:l=s.CharacterGoToTerminalPage,d();break;case s.TerminalHelp:l=s.TerminalIntro,d();break;case s.TerminalLs:l=s.TerminalHelp,d();break;case s.TerminalScan:l=s.TerminalLs,d();break;case s.TerminalConnect:l=s.TerminalScan,d();break;case s.TerminalAnalyze:l=s.TerminalConnect,d();break;case s.TerminalNuke:l=s.TerminalAnalyze,d();break;case s.TerminalManualHack:l=s.TerminalNuke,d();break;case s.TerminalHackingMechanics:case s.TerminalCreateScript:l=s.TerminalManualHack,d();break;case s.TerminalTypeScript:l=s.TerminalCreateScript,d();break;case s.TerminalFree:l=s.TerminalTypeScript,d();break;case s.TerminalRunScript:l=s.TerminalFree,d();break;case s.TerminalGoToActiveScriptsPage:l=s.TerminalRunScript,d();break;case s.ActiveScriptsPage:l=s.TerminalGoToActiveScriptsPage,d();break;case s.ActiveScriptsToTerminal:l=s.ActiveScriptsPage,d();break;case s.TerminalTailScript:l=s.ActiveScriptsToTerminal,d();break;case s.GoToHacknetNodesPage:l=s.TerminalTailScript,d();break;case s.HacknetNodesIntroduction:l=s.GoToHacknetNodesPage,d();break;case s.HacknetNodesGoToWorldPage:l=s.HacknetNodesIntroduction,d();break;case s.WorldDescription:l=s.HacknetNodesGoToWorldPage,d();break;case s.TutorialPageInfo:l=s.WorldDescription,d();break;case s.End:break;default:throw new Error("Invalid tutorial step")}}(),!1})}function d(){if(c)switch(l){case s.Start:a.Engine.loadTerminalContent(),m("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...

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

Let's try another command. Enter the 'ls' command");break;case s.TerminalScan:m("'ls' is a basic command that shows all of the contents (programs/scripts) on the computer. Right now, it shows that you have a program called 'NUKE.exe' on your computer. We'll get to what this does later.

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

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

It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'.");break;case s.TerminalConnect:m("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the 'connect [ip/hostname]' command. You can type in the ip or the hostname, but dont use both.

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

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

Before you try to hack a server, you should run diagnostics using the 'analyze' command");break;case s.TerminalNuke:m("When the 'analyze' command finishes running it will show useful information about hacking the server.

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

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

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

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

To create a new script or edit an existing one, you can use the 'nano' command. Scripts must end with the '.script' extension. Let's make a script now by entering 'nano foodnstuff.script' after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none";break;case s.TerminalTypeScript:m("This is the script editor. You can use it to program your scripts. Scripts are written in the Netscript language, a programming language created for this game. There are details about the Netscript language in the documentation, which can be accessed in the 'Tutorial' tab on the main navigation menu. I highly suggest you check it out after this tutorial. For now, just copy and paste the following code into the script editor:

while(true) {
  hack('foodnstuff');
}

For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.

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

To check how much RAM is available on this machine, enter the 'free' command.");break;case s.TerminalRunScript:m("We have 16GB of free RAM on this machine, which is enough to run our script. Let's run our script using 'run foodnstuff.script'.");break;case s.TerminalGoToActiveScriptsPage:m("Your script is now running! The script might take a few seconds to 'fully start up'. Your scripts will continuously run in the background and will automatically stop if the code ever completes (the 'foodnstuff.script' will never complete because it runs an infinite loop).

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

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

This pretty much covers the basics of hacking. To learn more about writing scripts using the Netscript language, select the 'Tutorial' link in the main navigation menu to look at the documentation. For now, let's move on to something else!"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.addEventListener("click",function(){return h(),!1});break;case s.GoToHacknetNodesPage:m("Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and upgrading Hacknet Nodes. Let's go to the 'Hacknet Nodes' page through the main navigation menu now."),document.getElementById("hacknet-nodes-menu-link").setAttribute("class","flashing-button");var e=Object(o.clearEventListeners)("hacknet-nodes-menu-link");(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none",e.addEventListener("click",function(){return a.Engine.loadHacknetNodesContent(),h(),Object(o.clearEventListeners)("hacknet-nodes-menu-link"),!1});break;case s.HacknetNodesIntroduction:m("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.");break;case s.HacknetNodesGoToWorldPage:m("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.

Let's go to the 'City' page through the main navigation menu."),document.getElementById("city-menu-link").setAttribute("class","flashing-button"),Object(o.clearEventListeners)("city-menu-link").addEventListener("click",function(){return a.Engine.loadWorldContent(),h(),Object(o.clearEventListeners)("city-menu-link"),!1});break;case s.WorldDescription:m("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!

Lastly, click on the 'Tutorial' link in the main navigation menu."),document.getElementById("tutorial-menu-link").setAttribute("class","flashing-button"),Object(o.clearEventListeners)("tutorial-menu-link").addEventListener("click",function(){return a.Engine.loadTutorialContent(),h(),Object(o.clearEventListeners)("tutorial-menu-link"),!1});break;case s.TutorialPageInfo:var t;m("This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing. That's the end of the tutorial. Hope you enjoy the game!"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.innerHTML="Finish Tutorial",Object(o.clearEventListeners)("interactive-tutorial-back").style.display="none",t.addEventListener("click",function(){return h(),!1});break;case s.End:p();break;default:throw new Error("Invalid tutorial step")}else console.log("Interactive Tutorial not running")}function h(){switch(l){case s.Start:l=s.GoToCharacterPage,d();break;case s.GoToCharacterPage:document.getElementById("stats-menu-link").removeAttribute("class"),l=s.CharacterPage,d();break;case s.CharacterPage:l=s.CharacterGoToTerminalPage,d();break;case s.CharacterGoToTerminalPage:document.getElementById("terminal-menu-link").removeAttribute("class"),l=s.TerminalIntro,d();break;case s.TerminalIntro:l=s.TerminalHelp,d();break;case s.TerminalHelp:l=s.TerminalLs,d();break;case s.TerminalLs:l=s.TerminalScan,d();break;case s.TerminalScan:l=s.TerminalScanAnalyze1,d();break;case s.TerminalScanAnalyze1:l=s.TerminalScanAnalyze2,d();break;case s.TerminalScanAnalyze2:l=s.TerminalConnect,d();break;case s.TerminalConnect:l=s.TerminalAnalyze,d();break;case s.TerminalAnalyze:l=s.TerminalNuke,d();break;case s.TerminalNuke:l=s.TerminalManualHack,d();break;case s.TerminalManualHack:l=s.TerminalHackingMechanics,d();break;case s.TerminalHackingMechanics:l=s.TerminalCreateScript,d();break;case s.TerminalCreateScript:l=s.TerminalTypeScript,d();break;case s.TerminalTypeScript:l=s.TerminalFree,d();break;case s.TerminalFree:l=s.TerminalRunScript,d();break;case s.TerminalRunScript:l=s.TerminalGoToActiveScriptsPage,d();break;case s.TerminalGoToActiveScriptsPage:document.getElementById("active-scripts-menu-link").removeAttribute("class"),l=s.ActiveScriptsPage,d();break;case s.ActiveScriptsPage:document.getElementById("terminal-menu-link").removeAttribute("class"),l=s.ActiveScriptsToTerminal,d();break;case s.ActiveScriptsToTerminal:l=s.TerminalTailScript,d();break;case s.TerminalTailScript:l=s.GoToHacknetNodesPage,d();break;case s.GoToHacknetNodesPage:document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),l=s.HacknetNodesIntroduction,d();break;case s.HacknetNodesIntroduction:l=s.HacknetNodesGoToWorldPage,d();break;case s.HacknetNodesGoToWorldPage:document.getElementById("city-menu-link").removeAttribute("class"),l=s.WorldDescription,d();break;case s.WorldDescription:document.getElementById("tutorial-menu-link").removeAttribute("class"),l=s.TutorialPageInfo,d();break;case s.TutorialPageInfo:l=s.End,d();break;case s.End:break;default:throw new Error("Invalid tutorial step")}}function p(){a.Engine.Counters.autoSaveCounter=300,console.log("Ending interactive tutorial"),a.Engine.init(),l=s.End,c=!1,document.getElementById("interactive-tutorial-container").style.display="none",Object(r.dialogBoxCreate)("If you are new to the game, the following links may be useful for you!

Getting Started GuideWiki

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

cat hackers-starting-handbook.lit"),i.a.getHomeComputer().messages.push("hackers-starting-handbook.lit")}function m(e){var t=document.getElementById("interactive-tutorial-text");if(null==t)throw new Error("Could not find text box");t.innerHTML=e,t.parentElement.scrollTop=0}},function(e,t,n){"use strict";(function(e){n.d(t,"h",function(){return P}),n.d(t,"f",function(){return H}),n.d(t,"d",function(){return G}),n.d(t,"b",function(){return U}),n.d(t,"c",function(){return A}),n.d(t,"a",function(){return q}),n.d(t,"g",function(){return I}),n.d(t,"e",function(){return T});var a=n(1),i=n(6),r=n(38),o=n(29),s=n(7),l=n(34),c=n(23),u=n(0),d=n(9),h=n(22),p=n(25),m=n(52),g=n(37),y=n(8),f=n(10),b=n(69),v=n(3),_=n(2),k=n(73),E=n(62),O=n(204),C=n(203).js_beautify;n(202),n(143),n(201),n(200),n(199),n(198),n(197),n(196),n(195),n(194),n(193),n(192),n(191);const w=n(111);var S={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};function T(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}var R=null,x=null;function I(){var e=document.getElementById("script-editor-buttons-wrapper");if(null!=e){var t=Object(v.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Beautify",clickListener:()=>((function(){var e=O.edit("javascript-editor"),t=e.getValue();t=C(t,{indent_size:4}),e.setValue(t)})(),!1)}),n=Object(v.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(N(),!1)});x=Object(v.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});var a=Object(v.createElement)("label",{for:"script-editor-ram-check",margin:"4px",marginTop:"8px",innerText:"Dynamic RAM Usage Checker",color:"white",tooltip:"Enable/Disable the dynamic RAM Usage display. You may want to disable it for very long scripts because there may be performance issues"});(R=Object(v.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;var r=Object(v.createElement)("a",{display:"inline-block",class:"a-link-button",innerText:"Netscript Documentation",href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"});e.appendChild(t),e.appendChild(n),e.appendChild(x),e.appendChild(R),e.appendChild(a),e.appendChild(r);var o=O.edit("javascript-editor");o.getSession().setMode("ace/mode/netscript"),o.setTheme("ace/theme/monokai"),document.getElementById("javascript-editor").style.fontSize="16px",o.setOption("showPrintMargin",!1);var s=document.getElementById("script-editor-option-theme");if(h.a.EditorTheme){for(var c=2,u=0;u{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,B),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,B),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,L),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,M),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 w.recursive(n,{key:a},Object.assign({ImportDeclaration:(e,t,n)=>{const a=e.source.value;o.push(a),i[t.key].add(a+j);for(let n=0;n{const i=t+"."+e.id.name;w.recursive(e,{key:i},c())}},c())),{dependencyMap:i,additionalModules:o}}(e,t);s.add(t);for(let e=0;e0;){const t=l.shift(),n=e.getScript(t);if(!n)return-1;i(n.code.repeat(1),t)}let u=a.a.ScriptBaseRamCost;const d=Object.keys(o).filter(e=>e.startsWith(c)),h=new Set;for(;d.length>0;){const e=d.shift();if(h.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(o).filter(e=>e.startsWith(t)))for(let t of o[e]||[])h.has(t)||d.push(t)}else for(let t of o[e]||[])h.has(t)||d.push(t);e==M&&(u+=a.a.ScriptIfRamCost),e==L&&(u+=a.a.ScriptForRamCost),e==B&&(u+=a.a.ScriptWhileRamCost),"hacknet"==e&&(u+=a.a.ScriptHacknetNodesRamCost),"document"!=e&&"window"!=e||(u+=a.a.ScriptDomRamCost);try{function r(e){if("function"!=typeof e)return 0;try{let t=e.apply(null,[]);return"number"==typeof t?t:0}catch(e){return console.log("ERROR applying function: "+e),0}}u+=r(e in n.env.vars.bladeburner?n.env.vars.bladeburner[e]:n.env.get(e))}catch(e){continue}}return u}catch(e){return-1}}function F(e){var t=u.a.getCurrentServer(),n=new c.b({filename:"foo",scriptRef:{code:""},args:[]});n.checkingRam=!0,n.serverIp=t.ip;try{return D(t,e,n)}catch(e){console.log("Failed to parse ram using new method. Falling back.",e)}try{var i=Object(g.parse)(e,{sourceType:"module"})}catch(e){return-1}var r=[],o=a.a.ScriptBaseRamCost,l=!1,d=!1,h=!1;for(r.push(i);0!=r.length;){var p=r.shift();switch(p.type){case"ImportDeclaration":for(var m=Object(s.a)(p,n,!0),y=0;y=1&&(n=1),e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][2]||null==e.dataMap[i][2])continue;if(null==(p=d.b[i]))continue;var r=Math.round(.5*e.dataMap[i][2]/e.onlineRunningTime*t);console.log(e.filename+" called grow() on "+p.hostname+" "+r+" times while offline"),e.log("Called grow() on "+p.hostname+" "+r+" times while offline");var o=Object(d.j)(p,450*r);e.log(p.hostname+" grown by "+Object(_.formatNumber)(100*o-100,6)+"% from grow() calls made while offline")}var s=0;for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][0]||null==e.dataMap[i][0])continue;if(null==(p=d.b[i]))continue;var l=.5*e.dataMap[i][0]/e.onlineRunningTime*t;(l*=n)>p.moneyAvailable&&(l=p.moneyAvailable),s+=l,u.a.gainMoney(l),console.log(e.filename+" generated $"+l+" while offline by hacking "+p.hostname),e.log(e.filename+" generated $"+l+" while offline by hacking "+p.hostname),p.moneyAvailable-=l,p.moneyAvailable<0&&(p.moneyAvailable=0),isNaN(p.moneyAvailable)&&(p.moneyAvailable=0)}var c=e.onlineExpGained/e.onlineRunningTime*.5*t;for(var i in c*=n,u.a.gainHackingExp(c),e.offlineMoneyMade+=s,e.offlineRunningTime+=t,e.offlineExpGained+=c,e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][1]||null==e.dataMap[i][1])continue;if(null==(p=d.b[i]))continue;var h=Math.round(.5*e.dataMap[i][1]/e.onlineRunningTime*t);console.log(e.filename+" hacked "+p.hostname+" "+h+" times while offline"),e.log("Hacked "+p.hostname+" "+h+" times while offline"),p.fortify(a.a.ServerFortifyAmount*h)}for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][3]||null==e.dataMap[i][3])continue;var p;if(null==(p=d.b[i]))continue;var m=Math.round(.5*e.dataMap[i][3]/e.onlineRunningTime*t);console.log(e.filename+" called weaken() on "+p.hostname+" "+m+" times while offline"),e.log("Called weaken() on "+p.hostname+" "+m+" times while offline"),p.weaken(a.a.ServerWeakenAmount*m)}return s}function G(e,t,n){for(var a=0;ah.a.MaxLogCapacity&&this.logs.shift();let t=e;r.a.ENABLE_TIMESTAMPS&&(t="["+Object(k.getTimestamp)()+"] "+t),this.logs.push(t),this.logUpd=!0},U.prototype.displayLog=function(){for(var e=0;e

This message was saved as "+e.filename+" onto your home computer.";Object(u.dialogBoxCreate)(t)}function g(){var e=f[v.Jumper0],t=f[v.Jumper1],n=f[v.Jumper2],l=f[v.Jumper3],c=f[v.Jumper4],d=f[v.CyberSecTest],h=f[v.NiteSecTest],m=f[v.BitRunnersTest],g=f[v.RedPill],y=!1;a.c[a.b.TheRedPill].owned&&(y=!0),g&&y&&0===o.a.sourceFiles.length&&!s.b&&!r.c?u.dialogBoxOpened||p(g,!0):g&&y?s.b||r.c||u.dialogBoxOpened||p(g):e&&!e.recvd&&o.a.hacking_skill>=25?(p(e),o.a.getHomeComputer().programs.push(i.a.Flight.name)):t&&!t.recvd&&o.a.hacking_skill>=40?p(t):d&&!d.recvd&&o.a.hacking_skill>=50?p(d):n&&!n.recvd&&o.a.hacking_skill>=175?p(n):h&&!h.recvd&&o.a.hacking_skill>=200?p(h):l&&!l.recvd&&o.a.hacking_skill>=350?p(l):c&&!c.recvd&&o.a.hacking_skill>=490?p(c):m&&!m.recvd&&o.a.hacking_skill>=500&&p(m)}function y(e){f[e.filename]=e}h.prototype.toJSON=function(){return Object(d.Generic_toJSON)("Message",this)},h.fromJSON=function(e){return Object(d.Generic_fromJSON)(h,e.data)},d.Reviver.constructors.Message=h;let f={};function b(e){f=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 _(){f={},y(new h(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.

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

Use this program to track your progress

The fl1ght.exe program was added to your home computer

-jump3R")),y(new h(v.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search.

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.

-jump3R")),y(new h(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.

Watch out for a hacking group known as NiteSec.

-jump3R")),y(new h(v.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand.

I.I.I.I

-jump3R")),y(new h(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.

-jump3R")),y(new h(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.

But first, you must pass our test. Find and hack our server using the Terminal.

-CyberSec")),y(new h(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.

Join us, and people will fear you, too.

Find and hack our hidden server using the Terminal. Then, we will contact you again.

-NiteSec")),y(new h(v.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for.

We can help you find the answers.

run4theh111z")),y(new h(v.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},function(e,t,n){"use strict";n.d(t,"a",function(){return $}),n.d(t,"g",function(){return J}),n.d(t,"d",function(){return K}),n.d(t,"f",function(){return q}),n.d(t,"h",function(){return Y}),n.d(t,"e",function(){return F}),n.d(t,"b",function(){return W}),n.d(t,"c",function(){return G});var a=n(51),i=n(18),r=n(16),o=n(31),s=n(28),l=n(11),c=n(1),u=n(21),d=n(61),h=n(6),p=n(41),m=n(12),g=n(50),y=n(4),f=n(33),b=n(39),v=n(0),_=n(30),k=n(9),E=(n(22),n(19)),O=n(24),C=n(25),w=n(52),S=n(45),T=n(23),R=n(7),x=n(56),I=(n(26),n(8)),P=n(101),N=n(40),A=n(17),M=n(2),L=n(32),B=n(15),j=n(110).sprintf,D=n(110).vsprintf,F=!1,H=!1,W=!1,G=!1,U=!1,q=!1,K=!1,V=1,Y=1,z={ALL:!0,scan:!0,hack:!0,sleep:!0,disableLog:!0,enableLog:!0,grow:!0,weaken:!0,nuke:!0,brutessh:!0,ftpcrack:!0,relaysmtp:!0,httpworm:!0,sqlinject:!0,run:!0,exec:!0,spawn:!0,kill:!0,killall:!0,scp:!0,getHackingLevel:!0,getServerMoneyAvailable:!0,getServerSecurityLevel:!0,getServerBaseSecurityLevel:!0,getServerMinSecurityLevel:!0,getServerRequiredHackingLevel:!0,getServerMaxMoney:!0,getServerGrowth:!0,getServerNumPortsRequired:!0,getServerRam:!0,buyStock:!0,sellStock:!0,purchaseServer:!0,deleteServer:!0,universityCourse:!0,gymWorkout:!0,travelToCity:!0,purchaseTor:!0,purchaseProgram:!0,stopAction:!0,upgradeHomeRam:!0,workForCompany:!0,applyToCompany:!0,joinFaction:!0,workForFaction:!0,createProgram:!0,commitCrime:!0,shortStock:!0,sellShort:!0,startAction:!0,upgradeSkill:!0,setTeamSize:!0,joinBladeburnerFaction:!0};function J(){for(var e=0;e1.01*e.ramUsage))throw Object(R.d)(e,"Dynamic RAM usage calculated to be greater than initial RAM usage on fn: "+t+". This is probably because you somehow circumvented the static RAM calculation.

Please don't do that :(

Dynamic RAM Usage: "+e.dynamicRamUsage+"
Static RAM Usage: "+e.ramUsage)},n=function(t,n){return e.loadedFns[t]?0:(e.loadedFns[t]=!0,n)},F=function(t){if(isNaN(t))throw Object(R.d)(e,"Invalid index specified for Hacknet Node: "+t);if(t<0||t>=v.a.hacknetNodes.length)throw Object(R.d)(e,"Index specified for Hacknet Node is out-of-bounds: "+t);return v.a.hacknetNodes[t]};const G=e=>{const t=Math.round(e);if(isNaN(t)||!Object(P.isPowerOfTwo)(t))throw Error("failed due to invalid ram argument. Must be numeric and a power of 2");if(t>c.a.PurchasedServerMaxRam)throw Error("failed because specified RAM was too high. Maximum RAM on a purchased server is "+c.a.PurchasedServerMaxRam+"GB");return t*c.a.BaseCostFor1GBOfRamServer};return{hacknet:{numNodes:function(){return v.a.hacknetNodes.length},purchaseNode:function(){return Object(g.e)()},getPurchaseNodeCost:function(){return Object(g.c)()},getNodeStats:function(e){var t=F(e);return{name:t.name,level:t.level,ram:t.ram,cores:t.cores,production:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:t.totalMoneyGenerated}},upgradeLevel:function(e,t){return F(e).purchaseLevelUpgrade(t)},upgradeRam:function(e,t){return F(e).purchaseRamUpgrade(t)},upgradeCore:function(e,t){return F(e).purchaseCoreUpgrade(t)},getLevelUpgradeCost:function(e,t){return F(e).calculateLevelUpgradeCost(t)},getRamUpgradeCost:function(e,t){return F(e).calculateRamUpgradeCost(t)},getCoreUpgradeCost:function(e,t){return F(e).calculateCoreUpgradeCost(t)}},sprintf:j,vsprintf:D,scan:function(a=e.serverIp,i=!0){if(e.checkingRam)return n("scan",c.a.ScriptScanRamCost);t("scan",c.a.ScriptScanRamCost);var r=Object(k.e)(a);if(null==r)throw Object(R.d)(e,"Invalid IP or hostname passed into scan() command");for(var o=[],s=0;sv.a.hacking_skill)throw e.scriptRef.log("Cannot hack this server ("+r.hostname+") because user's hacking skill is not high enough"),Object(R.d)(e,"Cannot hack this server ("+r.hostname+") because user's hacking skill is not high enough");return null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Attempting to hack "+a+" in "+o.toFixed(3)+" seconds (t="+i+")"),Object(R.e)(1e3*o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);var t=Object(R.i)(r),n=Math.random(),a=Object(R.g)(r)*i,o=a/4;if(nr.moneyAvailable&&(s=r.moneyAvailable),r.moneyAvailable-=s,r.moneyAvailable<0&&(r.moneyAvailable=0),v.a.gainMoney(s),e.scriptRef.onlineMoneyMade+=s,v.a.scriptProdSinceLastAug+=s,e.scriptRef.recordHack(r.ip,s,i),v.a.gainHackingExp(a),e.scriptRef.onlineExpGained+=a,null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Script SUCCESSFULLY hacked "+r.hostname+" for $"+Object(M.formatNumber)(s,2)+" and "+Object(M.formatNumber)(a,4)+" exp (t="+i+")"),r.fortify(c.a.ServerFortifyAmount*Math.min(i,n)),Promise.resolve(s)}return v.a.gainHackingExp(o),e.scriptRef.onlineExpGained+=o,null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Script FAILED to hack "+r.hostname+". Gained "+Object(M.formatNumber)(o,4)+" exp (t="+i+")"),Promise.resolve(0)})},sleep:function(t){if(e.checkingRam)return 0;if(void 0===t)throw Object(R.d)(e,"sleep() call has incorrect number of arguments. Takes 1 argument");return null==e.disableLogs.ALL&&null==e.disableLogs.sleep&&e.scriptRef.log("Sleeping for "+t+" milliseconds"),Object(R.e)(t,e).then(function(){return Promise.resolve(!0)})},grow:function(a){if(e.checkingRam)return n("grow",c.a.ScriptGrowRamCost);t("grow",c.a.ScriptGrowRamCost);var i=e.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===a)throw Object(R.d)(e,"grow() call has incorrect number of arguments. Takes 1 argument");var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: "+a),Object(R.d)(e,"Cannot grow(). Invalid IP or hostname passed in: "+a);if(0==r.hasAdminRights)throw e.scriptRef.log("Cannot grow this server ("+r.hostname+") because user does not have root access"),Object(R.d)(e,"Cannot grow this server ("+r.hostname+") because user does not have root access");var o=Object(R.h)(r);return null==e.disableLogs.ALL&&null==e.disableLogs.grow&&e.scriptRef.log("Executing grow() on server "+r.hostname+" in "+Object(M.formatNumber)(o/1e3,3)+" seconds (t="+i+")"),Object(R.e)(o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);const t=r.moneyAvailable;r.moneyAvailable+=1*i;var n=Object(k.j)(r,450*i);const a=r.moneyAvailable;e.scriptRef.recordGrow(r.ip,i);var o=Object(R.g)(r)*i;return 1==n&&(o=0),null==e.disableLogs.ALL&&null==e.disableLogs.grow&&e.scriptRef.log("Available money on "+r.hostname+" grown by "+Object(M.formatNumber)(a/t*100-100,6)+"%. Gained "+Object(M.formatNumber)(o,4)+" hacking exp (t="+i+")"),e.scriptRef.onlineExpGained+=o,v.a.gainHackingExp(o),Promise.resolve(a/t)})},weaken:function(a){if(e.checkingRam)return n("weaken",c.a.ScriptWeakenRamCost);t("weaken",c.a.ScriptWeakenRamCost);var i=e.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===a)throw Object(R.d)(e,"weaken() call has incorrect number of arguments. Takes 1 argument");var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: "+a),Object(R.d)(e,"Cannot weaken(). Invalid IP or hostname passed in: "+a);if(0==r.hasAdminRights)throw e.scriptRef.log("Cannot weaken this server ("+r.hostname+") because user does not have root access"),Object(R.d)(e,"Cannot weaken this server ("+r.hostname+") because user does not have root access");var o=Object(R.l)(r);return null==e.disableLogs.ALL&&null==e.disableLogs.weaken&&e.scriptRef.log("Executing weaken() on server "+r.hostname+" in "+Object(M.formatNumber)(o/1e3,3)+" seconds (t="+i+")"),Object(R.e)(o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);r.weaken(c.a.ServerWeakenAmount*i),e.scriptRef.recordWeaken(r.ip,i);var t=Object(R.g)(r)*i;return null==e.disableLogs.ALL&&null==e.disableLogs.weaken&&e.scriptRef.log("Server security level on "+r.hostname+" weakened to "+r.hackDifficulty+". Gained "+Object(M.formatNumber)(t,4)+" hacking exp (t="+i+")"),e.scriptRef.onlineExpGained+=t,v.a.gainHackingExp(t),Promise.resolve(c.a.ServerWeakenAmount*i)})},print:function(t){if(e.checkingRam)return 0;if(void 0===t)throw Object(R.d)(e,"print() call has incorrect number of arguments. Takes 1 argument");e.scriptRef.log(t.toString())},tprint:function(t){if(e.checkingRam)return 0;if(void 0===t||null==t)throw Object(R.d)(e,"tprint() call has incorrect number of arguments. Takes 1 argument");var n=t.toString();if(Object(M.isHTML)(n))return v.a.takeDamage(1),void Object(I.dialogBoxCreate)("You suddenly feel a sharp shooting pain through your body as an angry voice in your head exclaims:

DON'T USE TPRINT() TO OUTPUT HTML ELEMENTS TO YOUR TERMINAL!!!!

(You lost 1 HP)");Object(C.c)(e.scriptRef.filename+": "+t.toString())},clearLog:function(){if(e.checkingRam)return 0;e.scriptRef.clearLog()},disableLog:function(t){if(e.checkingRam)return 0;if(void 0===z[t])throw Object(R.d)(e,"Invalid argument to disableLog: "+t);e.disableLogs[t]=!0,null==e.disableLogs.ALL&&null==e.disableLogs.disableLog&&e.scriptRef.log("Disabled logging for "+t)},enableLog:function(t){if(e.checkingRam)return 0;if(void 0===z[t])throw Object(R.d)(e,"Invalid argument to enableLog: "+t);delete e.disableLogs[t],null==e.disableLogs.ALL&&null==e.disableLogs.enableLog&&e.scriptRef.log("Enabled logging for "+t)},nuke:function(a){if(e.checkingRam)return n("nuke",c.a.ScriptPortProgramRamCost);if(t("nuke",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(R.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: "+a),Object(R.d)(e,"Cannot call nuke(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.NukeProgram.name))throw Object(R.d)(e,"You do not have the NUKE.exe virus!");if(i.openPortCount{if(void 0===a)throw Object(R.d)(e,"spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");if(isNaN(i)||i<1)throw Object(R.d)(e,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var t=[],n=2;n0,o=i.runningScripts.length-1;o>=0;--o)Object(T.d)(i.runningScripts[o],i.ip);return null==e.disableLogs.ALL&&null==e.disableLogs.killall&&e.scriptRef.log("killall(): Killing all scripts on "+i.hostname+". May take a few minutes for the scripts to die"),r},exit:function(){if(e.checkingRam)return 0;var t=Object(k.e)(e.serverIp);if(null==t)throw Object(R.d)(e,"Error getting Server for this script in exit(). This is a bug please contact game dev");Object(T.d)(e.scriptRef,t.ip)?e.scriptRef.log("Exiting..."):e.scriptRef.log("Exit failed(). This is a bug please contact game developer")},scp:function(a,i,r){if(e.checkingRam)return n("scp",c.a.ScriptScpRamCost);if(t("scp",c.a.ScriptScpRamCost),2!==arguments.length&&3!==arguments.length)throw Object(R.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(a&&a.constructor===Array){var o=!1;return a.forEach(function(t){$(e).scp(t,i,r)&&(o=!0)}),o}if(!a.endsWith(".lit")&&!Object(_.e)(a)&&!a.endsWith("txt"))throw Object(R.d)(e,"ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");var s,l;if(3===arguments.length){if(void 0===a||void 0===i||void 0===r)throw Object(R.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(s=Object(k.e)(r)))throw Object(R.d)(e,"ERROR: Invalid hostname/ip passed into scp() command: "+ip);if(null==(l=Object(k.e)(i)))throw Object(R.d)(e,"Could not find server ip for this script. This is a bug please contact game developer")}else if(2===arguments.length){if(void 0===a||void 0===i)throw Object(R.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(s=Object(k.e)(i)))throw Object(R.d)(e,"ERROR: Invalid hostname/ip passed into scp() command: "+ip);if(null==(l=Object(k.e)(e.serverIp)))throw Object(R.d)(e,"Could not find server ip for this script. This is a bug please contact game developer")}if(a.endsWith(".lit")){for(var u=!1,d=0;d=2&&(o=i.toString());for(var s=[],l=0;lr.playerShares&&(i=r.playerShares),0===i)return 0;var o=r.price*i-c.a.StockMarketCommission;v.a.gainMoney(o);var s=(r.price-r.playerAvgPx)*i-c.a.StockMarketCommission;return isNaN(s)&&(s=0),e.scriptRef.onlineMoneyMade+=s,v.a.scriptProdSinceLastAug+=s,r.playerShares-=i,0==r.playerShares&&(r.playerAvgPx=0),h.Engine.currentPage==h.Engine.Page.StockMarket&&Object(O.p)(r),null==e.disableLogs.ALL&&null==e.disableLogs.sellStock&&e.scriptRef.log("Sold "+Object(M.formatNumber)(i,0)+" shares of "+r.symbol+" at $"+Object(M.formatNumber)(r.price,2)+" per share. Gained $"+Object(M.formatNumber)(o,2)),r.price},shortStock(a,i){if(e.checkingRam)return n("shortStock",c.a.ScriptBuySellStockRamCost);if(t("shortStock",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use shortStock()");if(8!==v.a.bitNodeN&&!(q&&Y>=2))throw Object(R.d)(e,"ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var r=O.d[a];if(null==r)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into shortStock()");return Object(O.n)(r,i,e)?r.price:0},sellShort(a,i){if(e.checkingRam)return n("sellShort",c.a.ScriptBuySellStockRamCost);if(t("sellShort",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use sellShort()");if(8!==v.a.bitNodeN&&!(q&&Y>=2))throw Object(R.d)(e,"ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var r=O.d[a];if(null==r)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into sellShort()");return Object(O.l)(r,i,e)?r.price:0},placeOrder(a,i,r,o,s){if(e.checkingRam)return n("placeOrder",c.a.ScriptBuySellStockRamCost);if(t("placeOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use placeOrder()");if(8!==v.a.bitNodeN&&!(q&&Y>=3))throw Object(R.d)(e,"ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var l,u,d=O.d[a];if(null==d)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into placeOrder()");if((o=o.toLowerCase()).includes("limit")&&o.includes("buy"))l=O.a.LimitBuy;else if(o.includes("limit")&&o.includes("sell"))l=O.a.LimitSell;else if(o.includes("stop")&&o.includes("buy"))l=O.a.StopBuy;else{if(!o.includes("stop")||!o.includes("sell"))throw Object(R.d)(e,"ERROR: Invalid Order Type passed into placeOrder()");l=O.a.StopSell}if((s=s.toLowerCase()).includes("l"))u=O.b.Long;else{if(!s.includes("s"))throw Object(R.d)(e,"ERROR: Invalid Position Type passed into placeOrder()");u=O.b.Short}return Object(O.k)(d,i,r,l,u,e)},cancelOrder(a,i,r,o,s){if(e.checkingRam)return n("cancelOrder",c.a.ScriptBuySellStockRamCost);if(t("cancelOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(e,"You don't have TIX API Access! Cannot use cancelOrder()");if(8!==v.a.bitNodeN&&!(q&&Y>=3))throw Object(R.d)(e,"ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var l,u,d=O.d[a];if(null==d)throw Object(R.d)(e,"ERROR: Invalid stock symbol passed into cancelOrder()");if(isNaN(i)||isNaN(r))throw Object(R.d)(e,"ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");if((o=o.toLowerCase()).includes("limit")&&o.includes("buy"))l=O.a.LimitBuy;else if(o.includes("limit")&&o.includes("sell"))l=O.a.LimitSell;else if(o.includes("stop")&&o.includes("buy"))l=O.a.StopBuy;else{if(!o.includes("stop")||!o.includes("sell"))throw Object(R.d)(e,"ERROR: Invalid Order Type passed into placeOrder()");l=O.a.StopSell}if((s=s.toLowerCase()).includes("l"))u=O.b.Long;else{if(!s.includes("s"))throw Object(R.d)(e,"ERROR: Invalid Position Type passed into placeOrder()");u=O.b.Short}var h={stock:d,shares:i,price:r,type:l,pos:u};return Object(O.e)(h,e)},getPurchasedServerLimit:function(){return e.checkingRam?n("getPurchasedServerLimit",c.a.ScriptGetPurchasedServerLimit):(t("getPurchasedServerLimit",c.a.ScriptGetPurchasedServerLimit),c.a.PurchasedServerLimit)},getPurchasedServerMaxRam:function(){return e.checkingRam?n("getPurchasedServerMaxRam",c.a.ScriptGetPurchasedServerMaxRam):(t("getPurchasedServerMaxRam",c.a.ScriptGetPurchasedServerMaxRam),c.a.PurchasedServerMaxRam)},getPurchasedServerCost:function(a){if(e.checkingRam)return n("getPurchasedServerCost",c.a.ScriptGetPurchaseServerRamCost);t("getPurchasedServerCost",c.a.ScriptGetPurchaseServerRamCost);let i=0;try{i=G(a)}catch(t){return e.scriptRef.log("ERROR: 'getPurchasedServerCost()' "+t.message),""}return i},purchaseServer:function(a,i){if(e.checkingRam)return n("purchaseServer",c.a.ScriptPurchaseServerRamCost);t("purchaseServer",c.a.ScriptPurchaseServerRamCost);var r=String(a);if(""==(r=r.replace(/\s+/g,"")))return e.scriptRef.log("ERROR: Passed empty string for hostname argument of purchaseServer()"),"";if(v.a.purchasedServers.length>=c.a.PurchasedServerLimit)return e.scriptRef.log("ERROR: You have reached the maximum limit of "+c.a.PurchasedServerLimit+" servers. You cannot purchase any more."),"";let o=0;try{o=G(i)}catch(t){return e.scriptRef.log("ERROR: 'purchaseServer()' "+t.message),""}if(v.a.money.lt(o))return e.scriptRef.log("ERROR: Not enough money to purchase server. Need $"+Object(M.formatNumber)(o,2)),"";var s=new k.d({ip:Object(A.a)(),hostname:r,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:i});Object(k.a)(s),v.a.purchasedServers.push(s.ip);var l=v.a.getHomeComputer();return l.serversOnNetwork.push(s.ip),s.serversOnNetwork.push(l.ip),v.a.loseMoney(o),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseServer&&e.scriptRef.log("Purchased new server with hostname "+s.hostname+" for $"+Object(M.formatNumber)(o,2)),s.hostname},deleteServer:function(a){if(e.checkingRam)return n("deleteServer",c.a.ScriptPurchaseServerRamCost);t("deleteServer",c.a.ScriptPurchaseServerRamCost);var i=String(a);i=i.replace(/\s\s+/g,"");var r=Object(k.c)(i);if(null==r)return e.scriptRef.log("ERROR: Could not find server with hostname "+i+". deleteServer() failed"),!1;if(!r.purchasedByPlayer||"home"===r.hostname)return e.scriptRef.log("ERROR: Server "+r.hostname+" is not a purchased server. Cannot be deleted. deleteServer() failed"),!1;var o=r.ip;if(r.isConnectedTo)return e.scriptRef.log("ERROR: deleteServer() failed because you are currently connected to the server you are trying to delete"),!1;if(o===e.serverIp)return e.scriptRef.log("ERROR: Cannot call deleteServer() on self. deleteServer() failed"),!1;if(r.runningScripts.length>0)return e.scriptRef.log("ERROR: Cannot delete server "+r.hostname+" because it still has scripts running."),!1;for(var s=!1,l=0;lc.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: Trying to write to invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"Could not find port: "+a+". This is a bug contact the game developer");return a.write(i)},read:function(a){if(e.checkingRam)return n("read",c.a.ScriptReadWriteRamCost);if(t("read",c.a.ScriptReadWriteRamCost),isNaN(a)){if(Object(L.isString)(a)){var i=a,r=Object(k.e)(e.serverIp);if(null==r)throw Object(R.d)(e,"Error getting Server for this script in read(). This is a bug please contact game dev");var o=Object(w.getTextFile)(i,r);return null!==o?o.text:""}throw Object(R.d)(e,"Invalid argument passed in for read(): "+a)}if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: Trying to read from invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.read()},peek:function(a){if(e.checkingRam)return n("peek",c.a.ScriptReadWriteRamCost);if(t("peek",c.a.ScriptReadWriteRamCost),isNaN(a))throw Object(R.d)(e,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.peek()},clear:function(a){if(e.checkingRam)return n("clear",c.a.ScriptReadWriteRamCost);if(t("clear",c.a.ScriptReadWriteRamCost),!isNaN(a)){if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: Trying to clear invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.clear()}if(!Object(L.isString)(a))throw Object(R.d)(e,"Invalid argument passed in for clear(): "+a);var i=a,r=Object(k.e)(e.serverIp);if(null==r)throw Object(R.d)(e,"Error getting Server for this script in clear(). This is a bug please contact game dev");var o=Object(w.getTextFile)(i,r);return null!=o&&o.write(""),0},getPortHandle:function(a){if(e.checkingRam)return n("getPortHandle",10*c.a.ScriptReadWriteRamCost);if(t("getPortHandle",10*c.a.ScriptReadWriteRamCost),isNaN(a))throw Object(R.d)(e,"ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and "+c.a.NumNetscriptPorts);if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(R.d)(e,"ERROR: getPortHandle() called with invalid port number: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(a=T.a[a-1])||!(a instanceof x.a))throw Object(R.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a},rm:function(a){if(e.checkingRam)return n("rm",c.a.ScriptReadWriteRamCost);t("rm",c.a.ScriptReadWriteRamCost);var i=Object(k.e)(e.serverIp);if(null==i)throw Object(R.d)(e,"Error getting Server for this script in clear(). This is a bug please contact game dev");if(a.includes(".exe")){for(var r=0;r{Object(B.a)(),e(!0)}),a.addEventListener("click",()=>{Object(B.a)(),e(!1)}),Object(B.b)(t)})},getFavorToDonate:function(){return e.checkingRam?n("getFavorToDonate",c.a.ScriptGetFavorToDonate):(t("getFavorToDonate",c.a.ScriptGetFavorToDonate),Math.floor(c.a.BaseFavorToDonate*r.a.RepToDonateToFaction))},universityCourse:function(a,i){var r=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("universityCourse",r);if(t("universityCourse",r),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.universityCourse&&e.scriptRef.log(o)}var s,l,u;switch(a.toLowerCase()){case y.a.AevumSummitUniversity.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"),!1;v.a.location=y.a.AevumSummitUniversity,s=4,l=3;break;case y.a.Sector12RothmanUniversity.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"),!1;v.a.location=y.a.Sector12RothmanUniversity,s=3,l=2;break;case y.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(v.a.city!=y.a.Volhaven)return e.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"),!1;v.a.location=y.a.VolhavenZBInstituteOfTechnology,s=5,l=4;break;default:return e.scriptRef.log("Invalid university name: "+a+". universityCourse() failed"),!1}switch(i.toLowerCase()){case"Study Computer Science".toLowerCase():u=c.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():u=c.a.ClassDataStructures;break;case"Networks".toLowerCase():u=c.a.ClassNetworks;break;case"Algorithms".toLowerCase():u=c.a.ClassAlgorithms;break;case"Management".toLowerCase():u=c.a.ClassManagement;break;case"Leadership".toLowerCase():u=c.a.ClassLeadership;break;default:return e.scriptRef.log("Invalid class name: "+i+". universityCourse() failed"),!1}return v.a.startClass(s,l,u),null==e.disableLogs.ALL&&null==e.disableLogs.universityCourse&&e.scriptRef.log("Started "+u+" at "+a),!0}e.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.")},gymWorkout:function(a,i){var r=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("gymWorkout",r);if(t("gymWorkout",r),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.gymWorkout&&e.scriptRef.log(o)}var s,l;switch(a.toLowerCase()){case y.a.AevumCrushFitnessGym.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=y.a.AevumCrushFitnessGym,s=3,l=2;break;case y.a.AevumSnapFitnessGym.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=y.a.AevumSnapFitnessGym,s=10,l=5;break;case y.a.Sector12IronGym.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=y.a.Sector12IronGym,s=1,l=1;break;case y.a.Sector12PowerhouseGym.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=y.a.Sector12PowerhouseGym,s=20,l=10;break;case y.a.VolhavenMilleniumFitnessGym:if(v.a.city!=y.a.Volhaven)return e.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"),!1;v.a.location=y.a.VolhavenMilleniumFitnessGym,s=7,l=4;break;default:return e.scriptRef.log("Invalid gym name: "+a+". gymWorkout() failed"),!1}switch(i.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():v.a.startClass(s,l,c.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():v.a.startClass(s,l,c.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():v.a.startClass(s,l,c.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():v.a.startClass(s,l,c.a.ClassGymAgility);break;default:return e.scriptRef.log("Invalid stat: "+i+". gymWorkout() failed"),!1}return null==e.disableLogs.ALL&&null==e.disableLogs.gymWorkout&&e.scriptRef.log("Started training "+i+" at "+a),!0}e.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.")},travelToCity(a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("travelToCity",i);if(t("travelToCity",i),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");switch(a){case y.a.Aevum:case y.a.Chongqing:case y.a.Sector12:case y.a.NewTokyo:case y.a.Ishima:case y.a.Volhaven:if(v.a.money.lt(c.a.TravelCost))throw e.scriptRef.log("ERROR: not enough money to travel with travelToCity()."),Object(R.d)(e,"ERROR: not enough money to travel with travelToCity().");return v.a.loseMoney(c.a.TravelCost),v.a.city=a,null==e.disableLogs.ALL&&null==e.disableLogs.travelToCity&&e.scriptRef.log("Traveled to "+a),!0;default:return e.scriptRef.log("ERROR: Invalid city name passed into travelToCity()."),!1}},purchaseTor(){var a=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("purchaseTor",a);if(t("purchaseTor",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null!=E.a["Darkweb Server"])return e.scriptRef.log("You already have a TOR router! purchaseTor() failed"),!1;if(v.a.money.lt(c.a.TorRouterCost))return e.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"),!1;v.a.loseMoney(c.a.TorRouterCost);var i=new k.d({ip:Object(A.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(k.a)(i),E.a.addIp("Darkweb Server",i.ip);const r=document.getElementById("location-purchase-tor");return r.setAttribute("class","a-link-button-bought"),r.innerHTML="TOR Router - Purchased",v.a.getHomeComputer().serversOnNetwork.push(i.ip),i.serversOnNetwork.push(v.a.getHomeComputer().ip),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseTor&&e.scriptRef.log("You have purchased a Tor router!"),!0},purchaseProgram(a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("purchaseProgram",i);if(t("purchaseProgram",i),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null==E.a["Darkweb Server"])return e.scriptRef.log("ERROR: You do not have the TOR router. purchaseProgram() failed."),!1;a=a.toLowerCase();let r=null;for(const e in d.a){const t=d.a[e];t.program.toLowerCase()==a&&(r=t)}return null==r?(e.scriptRef.log("ERROR: Invalid program name passed into purchaseProgram()."),!1):v.a.money.lt(r.price)?(e.scriptRef.log("Not enough money to purchase "+r.program),!1):v.a.hasProgram(r.program)?(e.scriptRef.log("You already have the "+r.program+" program"),!0):(v.a.loseMoney(r.price),v.a.getHomeComputer().programs.push(r.program),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseProgram&&e.scriptRef.log("You have purchased the "+r.program+" program. The new program can be found on your home computer."),!0)},getStats:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getStats",a);if(t("getStats",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{hacking:v.a.hacking_skill,strength:v.a.strength,defense:v.a.defense,dexterity:v.a.dexterity,agility:v.a.agility,charisma:v.a.charisma,intelligence:v.a.intelligence}},getCharacterInformation:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getCharacterInformation",a);if(t("getCharacterInformation",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");var i="";return v.a.companyPosition instanceof l.c&&(i=v.a.companyPosition.positionName),{bitnode:v.a.bitNodeN,company:v.a.companyName,jobTitle:i,city:v.a.city,factions:v.a.factions.slice(),tor:E.a.hasOwnProperty("Darkweb Server"),timeWorked:v.a.timeWorked,workHackExpGain:v.a.workHackExpGained,workStrExpGain:v.a.workStrExpGained,workDefExpGain:v.a.workDefExpGained,workDexExpGain:v.a.workDexExpGained,workAgiExpGain:v.a.workAgiExpGained,workChaExpGain:v.a.workChaExpGained,workRepGain:v.a.workRepGained,workMoneyGain:v.a.workMoneyGained}},isBusy:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("isBusy",a);if(t("isBusy",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return v.a.isWorking},stopAction:function(){var a=c.a.ScriptSingularityFn1RamCost/2;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("stopAction",a);if(t("stopAction",a),4!=v.a.bitNodeN&&!(H&&V>=1))throw Object(R.d)(e,"Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(v.a.isWorking){var i=v.a.singularityStopWork();return null==e.disableLogs.ALL&&null==e.disableLogs.stopAction&&e.scriptRef.log(i),!0}return!1},upgradeHomeRam:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("upgradeHomeRam",a);if(t("upgradeHomeRam",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");const i=v.a.getUpgradeHomeRamCost();if(v.a.money.lt(i))return e.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"),!1;var r=v.a.getHomeComputer();return r.maxRam*=2,v.a.loseMoney(i),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.upgradeHomeRam&&e.scriptRef.log("Purchased additional RAM for home computer! It now has "+r.maxRam+"GB of RAM."),!0},getUpgradeHomeRamCost:function(){var a=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getUpgradeHomeRamCost",a);if(t("getUpgradeHomeRamCost",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.getUpgradeHomeRamCost()},workForCompany:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("workForCompany",a);if(t("workForCompany",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!b.c){if(""==v.a.companyPosition||!(v.a.companyPosition instanceof l.c))return e.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"),!1;if(v.a.isWorking){var i=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.workForCompany&&e.scriptRef.log(i)}return v.a.companyPosition.isPartTimeJob()?v.a.startWorkPartTime():v.a.startWork(),null==e.disableLogs.ALL&&null==e.disableLogs.workForCompany&&e.scriptRef.log("Began working at "+v.a.companyName+" as a "+v.a.companyPosition.positionName),!0}e.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission.")},applyToCompany:function(a,i){var r,o=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(o*=8),e.checkingRam)return n("applyToCompany",o);if(t("applyToCompany",o),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(l.e)(a))return e.scriptRef.log("ERROR: applyToCompany() failed because specified company "+a+" does not exist."),!1;switch(v.a.location=a,i.toLowerCase()){case"software":r=v.a.applyForSoftwareJob(!0);break;case"software consultant":r=v.a.applyForSoftwareConsultantJob(!0);break;case"it":r=v.a.applyForItJob(!0);break;case"security engineer":r=v.a.applyForSecurityEngineerJob(!0);break;case"network engineer":r=v.a.applyForNetworkEngineerJob(!0);break;case"business":r=v.a.applyForBusinessJob(!0);break;case"business consultant":r=v.a.applyForBusinessConsultantJob(!0);break;case"security":r=v.a.applyForSecurityJob(!0);break;case"agent":r=v.a.applyForAgentJob(!0);break;case"employee":r=v.a.applyForEmployeeJob(!0);break;case"part-time employee":r=v.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":r=v.a.applyForWaiterJob(!0);break;case"part-time waiter":r=v.a.applyForPartTimeWaiterJob(!0);break;default:return e.scriptRef.log("ERROR: Invalid job passed into applyToCompany: "+i+". applyToCompany() failed"),!1}return Object(L.isString)(r)?(e.scriptRef.log(r),!1):(r?null==e.disableLogs.ALL&&null==e.disableLogs.applyToCompany&&e.scriptRef.log("You were offered a new job at "+a+" as a "+v.a.companyPosition.positionName):null==e.disableLogs.ALL&&null==e.disableLogs.applyToCompany&&e.scriptRef.log("You failed to get a new job/promotion at "+a+" in the "+i+" field."),r)},getCompanyRep:function(a){var i=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyRep",i);if(t("getCompanyRep",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.playerReputation:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyRep(): "+a),-1)},getCompanyFavor:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyFavor",i);if(t("getCompanyFavor",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.favor:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavor(): "+a),-1)},getCompanyFavorGain:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyFavorGain",i);if(t("getCompanyFavorGain",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getCompanyFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.getFavorGain()[0]:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavorGain(): "+a),-1)},checkFactionInvitations:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("checkFactionInvitations",a);if(t("checkFactionInvitations",a),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.factionInvitations.slice()},joinFaction:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("joinFaction",i);if(t("joinFaction",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(m.d)(a))return e.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."),!1;if(!v.a.factionInvitations.includes(a))return e.scriptRef.log("ERROR: Cannot join "+a+" Faction because you have not been invited. joinFaction() failed"),!1;var r=v.a.factionInvitations.indexOf(a);if(-1===r)return e.scriptRef.log("ERROR: Cannot join "+a+" Faction because you have not been invited. joinFaction() failed"),!1;v.a.factionInvitations.splice(r,1);var o=m.b[a];return Object(m.h)(o),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.joinFaction&&e.scriptRef.log("Joined the "+a+" faction."),!0},workForFaction:function(a,i){var r=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("workForFaction",r);if(t("workForFaction",r),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(v.a.inGang()&&void 0!==p.a[a])e.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");else{if(!b.c){if(!Object(m.d)(a))return e.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."),!1;if(!v.a.factions.includes(a))return e.scriptRef.log("ERROR: workForFaction() failed because you are not a member of "+a),!1;if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.workForFaction&&e.scriptRef.log(o)}var s=m.b[a];switch(i.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(s.name)?(v.a.startFactionHackWork(s),e.scriptRef.log("Started carrying out hacking contracts for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot carry out hacking contracts for "+s.name+". workForFaction() failed"),!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(s.name)?(v.a.startFactionFieldWork(s),e.scriptRef.log("Started carrying out field missions for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot carry out field missions for "+s.name+". workForFaction() failed"),!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(s.name)?(v.a.startFactionSecurityWork(s),e.scriptRef.log("Started serving as security details for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot serve as security detail for "+s.name+". workForFaction() failed"),!1);default:e.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): "+i)}return!0}e.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.")}},getFactionRep:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionRep",i);if(t("getFactionRep",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].playerReputation:(e.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."),-1)},getFactionFavor:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionFavor",i);if(t("getFactionFavor",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].favor:(e.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist."),-1)},getFactionFavorGain:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionFavorGain",i);if(t("getFactionFavorGain",i),4!=v.a.bitNodeN&&!(H&&V>=2))throw Object(R.d)(e,"Cannot run getFactionFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].getFavorGain()[0]:(e.scriptRef.log("ERROR: Faction specified in getFactionFavorGain() does not exist."),-1)},createProgram:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("createProgram",i);if(t("createProgram",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void e.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");if(v.a.isWorking){var r=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.createProgram&&e.scriptRef.log(r)}a=a.toLowerCase();let o=null;for(const e in u.a)u.a[e].name.toLowerCase()==a&&(o=u.a[e]);return null==o?(e.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: "+a),!1):v.a.hasProgram(o.name)?(e.scriptRef.log("ERROR: createProgram() failed because you already have the "+o.name+" program"),!1):o.create.req()?(v.a.startCreateProgramWork(o.name,o.create.time,o.create.level),null==e.disableLogs.ALL&&null==e.disableLogs.createProgram&&e.scriptRef.log("Began creating program: "+a),!0):(e.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create "+o.name+" (level "+o.create.level+" req)"),!1)},commitCrime:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("commitCrime",i);if(t("commitCrime",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void e.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");if(v.a.isWorking){var r=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log(r)}switch(v.a.city){case y.a.Aevum:v.a.location=y.a.AevumSlums;break;case y.a.Chongqing:v.a.location=y.a.ChongqingSlums;break;case y.a.Sector12:v.a.location=y.a.Sector12Slums;break;case y.a.NewTokyo:v.a.location=y.a.NewTokyoSlums;break;case y.a.Ishima:v.a.location=y.a.IshimaSlums;break;case y.a.Volhaven:v.a.location=y.a.VolhavenSlums;break;default:console.log("Invalid Player.city value")}const s=Object(o.c)(a.toLowerCase());if(null==s)throw Object(R.d)(e,"Invalid crime passed into commitCrime(): "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log("Attempting to commit crime: "+s.name+"..."),s.commit(c.a.CrimeSingFnDivider,{workerscript:e})},getCrimeChance:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCrimeChance",i);if(t("getCrimeChance",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");const r=Object(o.c)(a.toLowerCase());if(null==r)throw Object(R.d)(e,"Invalid crime passed into getCrimeChance(): "+r);return r.successRate()},getOwnedAugmentations:function(a=!1){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getOwnedAugmentations",i);if(t("getOwnedAugmentations",i),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");for(var r=[],o=0;o=3))throw Object(R.d)(e,"Cannot run getOwnedSourceFiles(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");let i=[];for(let e=0;e=3))throw Object(R.d)(e,"Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(m.d)(a))return e.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): "+a),[];for(var r=m.b[a],o=[],s=0;s=3))throw Object(R.d)(e,"Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(i.f)(a))return e.scriptRef.log("ERROR: getAugmentationCost() failed. Invalid Augmentation name passed in (note: this is case-sensitive): "+a),[-1,-1];var o=i.c[a];return[o.baseRepRequirement,o.baseCost]},purchaseAugmentation:function(a,r){var o=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(o*=8),e.checkingRam)return n("purchaseAugmentation",o);if(t("purchaseAugmentation",o),4!=v.a.bitNodeN&&!(H&&V>=3))throw Object(R.d)(e,"Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");var s=m.b[a];if(null==s||!(s instanceof m.a))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: "+a),!1;if(!s.augmentations.includes(r))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because the faction "+a+" does not contain the "+r+" augmentation"),!1;var l=i.c[r];if(null==l||!(l instanceof i.a))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid augmentation name: "+r),!1;var u=!1;if(l.name===i.b.NeuroFluxGovernor&&(u=!0),!u){for(var d=0;d=3))throw Object(R.d)(e,"Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return 0===v.a.queuedAugmentations.length?(e.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"),!1):(v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),e.scriptRef.log("Installing Augmentations. This will cause this script to be killed"),Object(i.i)(a),!0)},bladeburner:{getContractNames:function(){if(e.checkingRam)return n("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getContractNamesNetscriptFn();throw Object(R.d)(e,"getContractNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getOperationNames:function(){if(e.checkingRam)return n("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getOperationNamesNetscriptFn();throw Object(R.d)(e,"getOperationNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getBlackOpNames:function(){if(e.checkingRam)return n("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getBlackOpNamesNetscriptFn();throw Object(R.d)(e,"getBlackOpNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getGeneralActionNames:function(){if(e.checkingRam)return n("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getGeneralActionNamesNetscriptFn();throw Object(R.d)(e,"getGeneralActionNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillNames:function(){if(e.checkingRam)return n("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.getSkillNamesNetscriptFn();throw Object(R.d)(e,"getSkillNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},startAction:function(a="",i=""){if(e.checkingRam)return n("startAction",c.a.ScriptBladeburnerApiBaseRamCost);if(t("startAction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.startActionNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.startAction() failed with exception: "+t)}throw Object(R.d)(e,"startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},stopBladeburnerAction:function(){if(e.checkingRam)return n("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2);if(t("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.resetAction();throw Object(R.d)(e,"stopBladeburnerAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCurrentAction:function(){if(e.checkingRam)return n("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4);if(t("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U)){let e=v.a.bladeburner.getTypeAndNameFromActionId(v.a.bladeburner.action);return"Idle"===e.type&&"Idle"===e.name?null:e}throw Object(R.d)(e,"getCurrentAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionTime:function(a="",i=""){if(e.checkingRam)return n("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getActionTimeNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getActionTime() failed with exception: "+t)}throw Object(R.d)(e,"getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionEstimatedSuccessChance:function(a="",i=""){if(e.checkingRam)return n("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getActionEstimatedSuccessChance() failed with exception: "+t)}throw Object(R.d)(e,"getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionCountRemaining:function(a="",i=""){if(e.checkingRam)return n("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getActionCountRemainingNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getActionCountRemaining() failed with exception: "+t)}throw Object(R.d)(e,"getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionMaxLevel:function(a="",i=""){if(e.checkingRam)return n("getActionMaxLevel",c.a.ScriptBladeburnerApiBaseRamCost);t("getActionMaxLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"getActionMaxLevel");try{var r=Object(S.b)("getActionMaxLevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return e.log(r),-1;const n=v.a.bladeburner.getActionObject(t);return null==n?(e.log(r),-1):n.maxLevel}catch(t){throw Object(R.d)(e,Object(S.c)("getActionMaxLevel",t))}},getActionCurrentLevel:function(a="",i=""){if(e.checkingRam)return n("getActionCurrentLevel",c.a.ScriptBladeburnerApiBaseRamCost);t("getActionCurrentLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"getActionCurrentLevel");try{var r=Object(S.b)("getActionCurrentLevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return e.log(r),-1;const n=v.a.bladeburner.getActionObject(t);return null==n?(e.log(r),-1):n.level}catch(t){throw Object(R.d)(e,Object(S.c)("getActionCurrentLevel",t))}},getActionAutolevel:function(a="",i=""){if(e.checkingRam)return n("getActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost);t("getActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"getActionAutolevel");try{var r=Object(S.b)("getActionAutolevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return e.log(r),!1;const n=v.a.bladeburner.getActionObject(t);return null==n?(e.log(r),!1):n.autoLevel}catch(t){throw Object(R.d)(e,Object(S.c)("getActionAutolevel",t))}},setActionAutolevel:function(a="",i="",r=!0){if(e.checkingRam)return n("setActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost);t("setActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"setActionAutolevel");try{var o=Object(S.b)("setActionAutolevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return void e.log(o);const n=v.a.bladeburner.getActionObject(t);if(null==n)return void e.log(o);n.autoLevel=r}catch(t){throw Object(R.d)(e,Object(S.c)("setActionAutolevel",t))}},setActionLevel:function(a="",i="",r=1){if(e.checkingRam)return n("setActionLevel",c.a.ScriptBladeburnerApiBaseRamCost);t("setActionLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(e,"setActionLevel");try{var o=Object(S.b)("setActionLevel",a,i);const t=v.a.bladeburner.getActionIdFromTypeAndName(a,i);if(null==t)return void e.log(o);const n=v.a.bladeburner.getActionObject(t);if(null==n)return void e.log(o);if(r>n.maxLevel)return void e.log(`ERROR: bladeburner.${setActionLevel}() failed because level exceeds max level for given action.`);if(r<1)return void e.log(`ERROR: bladeburner.${setActionLevel}() failed because level is below 1.`);n.level=r}catch(t){throw Object(R.d)(e,Object(S.c)("setActionLevel",t))}},getRank:function(){if(e.checkingRam)return n("getRank",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getRank",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.rank;throw Object(R.d)(e,"getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillPoints:function(){if(e.checkingRam)return n("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.skillPoints;throw Object(R.d)(e,"getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillLevel:function(a=""){if(e.checkingRam)return n("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getSkillLevelNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getSkillLevel() failed with exception: "+t)}throw Object(R.d)(e,"getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},upgradeSkill:function(a){if(e.checkingRam)return n("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost);if(t("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.upgradeSkillNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.upgradeSkill() failed with exception: "+t)}throw Object(R.d)(e,"upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getTeamSize:function(a="",i=""){if(e.checkingRam)return n("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getTeamSizeNetscriptFn(a,i,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getTeamSize() failed with exception: "+t)}throw Object(R.d)(e,"getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},setTeamSize:function(a="",i="",r){if(e.checkingRam)return n("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(t("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.setTeamSizeNetscriptFn(a,i,r,e)}catch(t){throw Object(R.d)(e,"Bladeburner.setTeamSize() failed with exception: "+t)}throw Object(R.d)(e,"setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedPopulation:function(a){if(e.checkingRam)return n("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getCityEstimatedPopulationNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getCityEstimatedPopulation() failed with exception: "+t)}throw Object(R.d)(e,"getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedCommunities:function(a){if(e.checkingRam)return n("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getCityEstimatedCommunitiesNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getCityEstimatedCommunities() failed with exception: "+t)}throw Object(R.d)(e,"getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityChaos:function(a){if(e.checkingRam)return n("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.getCityChaosNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.getCityChaos() failed with exception: "+t)}throw Object(R.d)(e,"getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},switchCity:function(a){if(e.checkingRam)return n("switchCity",c.a.ScriptBladeburnerApiBaseRamCost);if(t("switchCity",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))try{return v.a.bladeburner.switchCityNetscriptFn(a,e)}catch(t){throw Object(R.d)(e,"Bladeburner.switchCity() failed with exception: "+t)}throw Object(R.d)(e,"switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getStamina:function(){if(e.checkingRam)return n("getStamina",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getStamina",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return[v.a.bladeburner.stamina,v.a.bladeburner.maxStamina];throw Object(R.d)(e,"getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerFaction:function(){if(e.checkingRam)return n("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost);if(t("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||U))return v.a.bladeburner.joinBladeburnerFactionNetscriptFn(e);throw Object(R.d)(e,"joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerDivision:function(){if(e.checkingRam)return n("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost);if(t("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost),7===v.a.bitNodeN||U)return v.a.bladeburner instanceof s.a||(v.a.strength>=100&&v.a.defense>=100&&v.a.dexterity>=100&&v.a.agility>=100?(v.a.bladeburner=new s.a({new:!0}),e.log("You have been accepted into the Bladeburner division"),!0):(e.log("You do not meet the requirements for joining the Bladeburner division"),!1));throw Object(R.d)(e,"joinBladeburnerDivision() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")}}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"f",function(){return l}),n.d(t,"e",function(){return c}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return h}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s});var a=n(25);let i={},r={};function o(e){i=""===e?{}:JSON.parse(e)}function s(e){r=""===e?{}:JSON.parse(e)}function l(){for(var e in i)i.hasOwnProperty(e)&&Object(a.c)("alias "+e+"="+i[e]);for(var e in r)r.hasOwnProperty(e)&&Object(a.c)("global alias "+e+"="+r[e])}function c(e,t=!1){var n=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=n&&3==n.length&&(t?function(e,t){e in i&&delete i[e];r[e]=t}(n[1],n[2]):function(e,t){e in r&&delete r[e];i[e]=t}(n[1],n[2]),!0)}function u(e){return r.hasOwnProperty(e)?r[e]:null}function d(e){return i.hasOwnProperty(e)?(delete i[e],!0):!!r.hasOwnProperty(e)&&(delete r[e],!0)}function h(e){var t,n=e.split(" ");if(n.length>0){if(null!=(r=(t=n[0],i.hasOwnProperty(t)?i[t]:null)))n[0]=r;else null!=(r=u(n[0]))&&(n[0]=r);for(var a=0;ae)return!1;if((n+=t[a+1])>=e)return!0}}function d(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):!1!==t&&u(e,l)))}function h(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):!1!==t&&(u(e,l)||u(e,c)))))}var p=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function m(e,t){return new p(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},y={startsExpr:!0},f={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,f[e]=new p(e,t)}var v={num:new p("num",y),regexp:new p("regexp",y),string:new p("string",y),name:new p("name",y),eof:new p("eof"),bracketL:new p("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new p("]"),braceL:new p("{",{beforeExpr:!0,startsExpr:!0}),braceR:new p("}"),parenL:new p("(",{beforeExpr:!0,startsExpr:!0}),parenR:new p(")"),comma:new p(",",g),semi:new p(";",g),colon:new p(":",g),dot:new p("."),question:new p("?",g),arrow:new p("=>",g),template:new p("template"),ellipsis:new p("...",g),backQuote:new p("`",y),dollarBraceL:new p("${",{beforeExpr:!0,startsExpr:!0}),eq:new p("=",{beforeExpr:!0,isAssign:!0}),assign:new p("_=",{beforeExpr:!0,isAssign:!0}),incDec:new p("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new p("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=",6),relational:m("",7),bitShift:m("<>",8),plusMin:new p("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new p("**",{beforeExpr:!0}),_break:b("break"),_case:b("case",g),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",g),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",g),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",y),_if:b("if"),_return:b("return",g),_switch:b("switch"),_throw:b("throw",g),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",y),_super:b("super",y),_class:b("class"),_extends:b("extends",g),_export:b("export"),_import:b("import"),_null:b("null",y),_true:b("true",y),_false:b("false",y),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},_=/\r\n?|\n|\u2028|\u2029/,k=new RegExp(_.source,"g");function E(e){return 10===e||13===e||8232===e||8233===e}var O=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,w=Object.prototype,S=w.hasOwnProperty,T=w.toString;function R(e,t){return S.call(e,t)}var x=Array.isArray||function(e){return"[object Array]"===T.call(e)},I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var P=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function N(e,t){for(var n=1,a=0;;){k.lastIndex=a;var i=k.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),x(t.onToken)){var a=t.onToken;t.onToken=function(e){return a.push(e)}}return x(t.onComment)&&(t.onComment=function(e,t){return function(n,a,i,r,o,s){var l={type:n?"Block":"Line",value:a,start:i,end:r};e.locations&&(l.loc=new P(this,o,s)),e.ranges&&(l.range=[i,r]),t.push(l)}}(t,t.onComment)),t}var L={};function B(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}var j=function(e,n,i){this.options=e=M(e),this.sourceFile=e.sourceFile,this.keywords=B(a[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var o=e.ecmaVersion;!(r=t[o]);o--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=B(r);var s=(r?r+" ":"")+t.strict;this.reservedWordsStrict=B(s),this.reservedWordsStrictBind=B(s+" "+t.strictBind),this.input=String(n),this.containsEsc=!1,this.loadPlugins(e.plugins),i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(_).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=v.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};j.prototype.isKeyword=function(e){return this.keywords.test(e)},j.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},j.prototype.extend=function(e,t){this[e]=t(this[e])},j.prototype.loadPlugins=function(e){for(var t in e){var n=L[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},j.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var D=j.prototype,F=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;D.strictDirective=function(e){for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=F.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},D.eat=function(e){return this.type===e&&(this.next(),!0)},D.isContextual=function(e){return this.type===v.name&&this.value===e},D.eatContextual=function(e){return this.value===e&&this.eat(v.name)},D.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},D.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||_.test(this.input.slice(this.lastTokEnd,this.start))},D.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},D.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},D.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},D.expect=function(e){this.eat(e)||this.unexpected()},D.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var H=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};D.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},D.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},D.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var G={kind:"loop"},U={kind:"switch"};W.isLet=function(){if(this.type!==v.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(d(n,!0)){for(var a=t+1;h(this.input.charCodeAt(a),!0);)++a;var i=this.input.slice(t,a);if(!this.isKeyword(i))return!0}return!1},W.isAsyncFunction=function(){if(this.type!==v.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length;return!(_.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&h(this.input.charAt(t+8)))},W.parseStatement=function(e,t,n){var a,i=this.type,r=this.startNode();switch(this.isLet()&&(i=v._var,a="let"),i){case v._break:case v._continue:return this.parseBreakContinueStatement(r,i.keyword);case v._debugger:return this.parseDebuggerStatement(r);case v._do:return this.parseDoStatement(r);case v._for:return this.parseForStatement(r);case v._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1);case v._class:return e||this.unexpected(),this.parseClass(r,!0);case v._if:return this.parseIfStatement(r);case v._return:return this.parseReturnStatement(r);case v._switch:return this.parseSwitchStatement(r);case v._throw:return this.parseThrowStatement(r);case v._try:return this.parseTryStatement(r);case v._const:case v._var:return a=a||this.value,e||"var"==a||this.unexpected(),this.parseVarStatement(r,a);case v._while:return this.parseWhileStatement(r);case v._with:return this.parseWithStatement(r);case v.braceL:return this.parseBlock();case v.semi:return this.parseEmptyStatement(r);case v._export:case v._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===v._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(r,!0);var o=this.value,s=this.parseExpression();return i===v.name&&"Identifier"===s.type&&this.eat(v.colon)?this.parseLabeledStatement(r,o,s):this.parseExpressionStatement(r,s)}},W.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(v.semi)||this.insertSemicolon()?e.label=null:this.type!==v.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a=6?this.eat(v.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},W.parseForStatement=function(e){if(this.next(),this.labels.push(G),this.enterLexicalScope(),this.expect(v.parenL),this.type===v.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===v._var||this.type===v._const||t){var n=this.startNode(),a=t?"let":this.value;return this.next(),this.parseVar(n,!0,a),this.finishNode(n,"VariableDeclaration"),!(this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==a&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new H,r=this.parseExpression(!0,i);return this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(r),this.checkLVal(r),this.checkPatternErrors(i,!0),this.parseForIn(e,r)):(this.checkExpressionErrors(i,!0),this.parseFor(e,r))},W.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},W.isFunction=function(){return this.type===v._function||this.isAsyncFunction()},W.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(v._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},W.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(v.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},W.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(v.braceL),this.labels.push(U),this.enterLexicalScope();for(var n=!1;this.type!=v.braceR;)if(this.type===v._case||this.type===v._default){var a=this.type===v._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),a?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(v.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},W.parseThrowStatement=function(e){return this.next(),_.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var q=[];W.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===v._catch){var t=this.startNode();this.next(),this.expect(v.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(v.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(v._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},W.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},W.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(G),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},W.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},W.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},W.parseLabeledStatement=function(e,t,n){for(var a=0;a=0;r--){var o=this.labels[r];if(o.statementStart!=e.start)break;o.statementStart=this.start,o.kind=i}return this.labels.push({name:t,kind:i,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},W.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},W.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(v.braceL),e&&this.enterLexicalScope();!this.eat(v.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},W.parseFor=function(e,t){return e.init=t,this.expect(v.semi),e.test=this.type===v.semi?null:this.parseExpression(),this.expect(v.semi),e.update=this.type===v.parenR?null:this.parseExpression(),this.expect(v.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},W.parseForIn=function(e,t){var n=this.type===v._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(v.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},W.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var a=this.startNode();if(this.parseVarId(a,n),this.eat(v.eq)?a.init=this.parseMaybeAssign(t):"const"!==n||this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==a.id.type||t&&(this.type===v._in||this.isContextual("of"))?a.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(a,"VariableDeclarator")),!this.eat(v.comma))break}return e},W.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},W.parseFunction=function(e,t,n,a){this.initFunction(e),this.options.ecmaVersion>=6&&!a&&(e.generator=this.eat(v.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&&(e.id="nullableID"===t&&this.type!=v.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,r=this.inAsync,o=this.yieldPos,s=this.awaitPos,l=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==v.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=r,this.yieldPos=o,this.awaitPos=s,this.inFunction=l,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},W.parseFunctionParams=function(e){this.expect(v.parenL),e.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},W.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),a=!1;for(n.body=[],this.expect(v.braceL);!this.eat(v.braceR);)if(!this.eat(v.semi)){var i=this.startNode(),r=this.eat(v.star),o=!1,s=this.type===v.name&&"static"===this.value;this.parsePropertyName(i),i.static=s&&this.type!==v.parenL,i.static&&(r&&this.unexpected(),r=this.eat(v.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!r&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==v.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind="method";var l=!1;if(!i.computed){var c=i.key;r||o||"Identifier"!==c.type||this.type===v.parenL||"get"!==c.name&&"set"!==c.name||(l=!0,i.kind=c.name,c=this.parsePropertyName(i)),!i.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(a&&this.raise(c.start,"Duplicate constructor in the same class"),l&&this.raise(c.start,"Constructor can't have get/set modifier"),r&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),i.kind="constructor",a=!0)}if(this.parseClassMethod(n,i,r,o),l){var u="get"===i.kind?0:1;if(i.value.params.length!==u){var d=i.value.start;"get"===i.kind?this.raiseRecoverable(d,"getter should have no params"):this.raiseRecoverable(d,"setter should have exactly one param")}else"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},W.parseClassMethod=function(e,t,n,a){t.value=this.parseMethod(n,a),e.body.push(this.finishNode(t,"MethodDefinition"))},W.parseClassId=function(e,t){e.id=this.type===v.name?this.parseIdent():!0===t?this.unexpected():null},W.parseClassSuper=function(e){e.superClass=this.eat(v._extends)?this.parseExprSubscripts():null},W.parseExport=function(e,t){if(this.next(),this.eat(v.star))return this.expectContextual("from"),e.source=this.type===v.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(v._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===v._function||(n=this.isAsyncFunction())){var a=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(a,"nullableID",!1,n)}else if(this.type===v._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===v.string?this.parseExprAtom():this.unexpected();else{for(var r=0;r=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0;n=6&&(e.computed||e.method||e.shorthand))){var n,a=e.key;switch(a.type){case"Identifier":n=a.name;break;case"Literal":n=String(a.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(a.start,"Redefinition of __proto__ property"),t.proto=!0);else{var r=t[n="$"+n];r?("init"===i?this.strict&&r.init||r.get||r.set:r.init||r[i])&&this.raiseRecoverable(a.start,"Redefinition of property"):r=t[n]={init:!1,get:!1,set:!1},r[i]=!0}}},V.parseExpression=function(e,t){var n=this.start,a=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===v.comma){var r=this.startNodeAt(n,a);for(r.expressions=[i];this.eat(v.comma);)r.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(r,"SequenceExpression")}return i},V.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var a=!1,i=-1,r=-1;t?(i=t.parenthesizedAssign,r=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new H,a=!0);var o=this.start,s=this.startLoc;this.type!=v.parenL&&this.type!=v.name||(this.potentialArrowAt=this.start);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,o,s)),this.type.isAssign){this.checkPatternErrors(t,!0),a||H.call(t);var c=this.startNodeAt(o,s);return c.operator=this.value,c.left=this.type===v.eq?this.toAssignable(l):l,t.shorthandAssign=-1,this.checkLVal(l),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return a&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),r>-1&&(t.trailingComma=r),l},V.parseMaybeConditional=function(e,t){var n=this.start,a=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(v.question)){var r=this.startNodeAt(n,a);return r.test=i,r.consequent=this.parseMaybeAssign(),this.expect(v.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return i},V.parseExprOps=function(e,t){var n=this.start,a=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,a,-1,e)},V.parseExprOp=function(e,t,n,a,i){var r=this.type.binop;if(null!=r&&(!i||this.type!==v._in)&&r>a){var o=this.type===v.logicalOR||this.type===v.logicalAND,s=this.value;this.next();var l=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1),l,c,r,i),d=this.buildBinary(t,n,e,u,s,o);return this.parseExprOp(d,t,n,a,i)}return e},V.buildBinary=function(e,t,n,a,i,r){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=a,this.finishNode(o,r?"LogicalExpression":"BinaryExpression")},V.parseMaybeUnary=function(e,t){var n,a=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var r=this.startNode(),o=this.type===v.incDec;r.operator=this.value,r.prefix=!0,this.next(),r.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(r.argument):this.strict&&"delete"===r.operator&&"Identifier"===r.argument.type?this.raiseRecoverable(r.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(r,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var s=this.startNodeAt(a,i);s.operator=this.value,s.prefix=!1,s.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(s,"UpdateExpression")}}return!t&&this.eat(v.starstar)?this.buildBinary(a,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},V.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,a=this.parseExprAtom(e),i="ArrowFunctionExpression"===a.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return a;var r=this.parseSubscripts(a,t,n);return e&&"MemberExpression"===r.type&&(e.parenthesizedAssign>=r.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=r.start&&(e.parenthesizedBind=-1)),r},V.parseSubscripts=function(e,t,n,a){for(var i,r=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=this.eat(v.bracketL))||this.eat(v.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=i?this.parseExpression():this.parseIdent(!0),o.computed=!!i,i&&this.expect(v.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!a&&this.eat(v.parenL)){var s=new H,l=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var u=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1,s);if(r&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(s,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=l,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),u,!0);this.checkExpressionErrors(s,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=c||this.awaitPos;var d=this.startNodeAt(t,n);d.callee=e,d.arguments=u,e=this.finishNode(d,"CallExpression")}else{if(this.type!==v.backQuote)return e;var h=this.startNodeAt(t,n);h.tag=e,h.quasi=this.parseTemplate(),e=this.finishNode(h,"TaggedTemplateExpression")}},V.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case v._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case v._this:var a=this.type===v._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,a);case v.name:var i=this.start,r=this.startLoc,o=this.parseIdent(this.type!==v.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(v._function))return this.parseFunction(this.startNodeAt(i,r),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(v.arrow))return this.parseArrowExpression(this.startNodeAt(i,r),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===v.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(v.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,r),[o],!0)}return o;case v.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case v.num:case v.string:return this.parseLiteral(this.value);case v._null:case v._true:case v._false:return(t=this.startNode()).value=this.type===v._null?null:this.type===v._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case v.parenL:var l=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),c;case v.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(v.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case v.braceL:return this.parseObj(!1,e);case v._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case v._class:return this.parseClass(this.startNode(),!1);case v._new:return this.parseNew();case v.backQuote:return this.parseTemplate();default:this.unexpected()}},V.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},V.parseParenExpression=function(){this.expect(v.parenL);var e=this.parseExpression();return this.expect(v.parenR),e},V.parseParenAndDistinguishExpression=function(e){var t,n=this.start,a=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var r,o,s=this.start,l=this.startLoc,c=[],u=!0,d=!1,h=new H,p=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==v.parenR;){if(u?u=!1:this.expect(v.comma),i&&this.afterTrailingComma(v.parenR,!0)){d=!0;break}if(this.type===v.ellipsis){r=this.start,c.push(this.parseParenItem(this.parseRest())),this.type===v.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==v.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var g=this.start,y=this.startLoc;if(this.expect(v.parenR),e&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=p,this.awaitPos=m,this.parseParenArrowList(n,a,c);c.length&&!d||this.unexpected(this.lastTokStart),r&&this.unexpected(r),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=m||this.awaitPos,c.length>1?((t=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(t,"SequenceExpression",g,y)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var f=this.startNodeAt(n,a);return f.expression=t,this.finishNode(f,"ParenthesizedExpression")}return t},V.parseParenItem=function(e){return e},V.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Y=[];V.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(v.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,a=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,a,!0),this.eat(v.parenL)?e.arguments=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Y,this.finishNode(e,"NewExpression")},V.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===v.backQuote,this.finishNode(e,"TemplateElement")},V.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(v.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(v.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},V.parseObj=function(e,t){var n=this.startNode(),a=!0,i={};for(n.properties=[],this.next();!this.eat(v.braceR);){if(a)a=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var r,o,s,l,c=this.startNode();this.options.ecmaVersion>=6&&(c.method=!1,c.shorthand=!1,(e||t)&&(s=this.start,l=this.startLoc),e||(r=this.eat(v.star))),this.parsePropertyName(c),e||!(this.options.ecmaVersion>=8)||r||c.computed||"Identifier"!==c.key.type||"async"!==c.key.name||this.type===v.parenL||this.type===v.colon||this.canInsertSemicolon()?o=!1:(o=!0,this.parsePropertyName(c,t)),this.parsePropertyValue(c,e,r,o,s,l,t),this.checkPropClash(c,i),n.properties.push(this.finishNode(c,"Property"))}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},V.parsePropertyValue=function(e,t,n,a,i,r,o){if((n||a)&&this.type===v.colon&&this.unexpected(),this.eat(v.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===v.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,a);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=v.comma&&this.type!=v.braceR){(n||a||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var s="get"===e.kind?0:1;if(e.value.params.length!==s){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(i,r,e.key):this.type===v.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,r,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},V.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(v.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(v.bracketR),e.key;e.computed=!1}return e.key=this.type===v.num||this.type===v.string?this.parseExprAtom():this.parseIdent(!0)},V.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},V.parseMethod=function(e,t){var n=this.startNode(),a=this.inGenerator,i=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(v.parenL),n.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=a,this.inAsync=i,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(n,"FunctionExpression")},V.parseArrowExpression=function(e,t,n){var a=this.inGenerator,i=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=a,this.inAsync=i,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},V.parseFunctionBody=function(e,t){var n=t&&this.type!==v.braceL,a=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var r=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);a&&!r||(i=this.strictDirective(this.end))&&r&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!a&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=a},V.isSimpleParamList=function(e){for(var t=0;t=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},V.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==v.semi||this.canInsertSemicolon()||this.type!=v.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(v.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},V.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var z=j.prototype;z.raise=function(e,t){var n=N(this.input,e);t+=" ("+n.line+":"+n.column+")";var a=new SyntaxError(t);throw a.pos=e,a.loc=n,a.raisedAt=this.pos,a},z.raiseRecoverable=z.raise,z.curPosition=function(){if(this.options.locations)return new I(this.curLine,this.pos-this.lineStart)};var J=j.prototype,$=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var a=0;a=0;e--)if(this.context[e].generator)return!0;return!1},ne.updateContext=function(e){var t,n=this.type;n.keyword&&e==v.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},v.parenR.updateContext=v.braceR.updateContext=function(){if(1!=this.context.length){var e,t=this.context.pop();t===te.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):this.exprAllowed=t===te.b_tmpl||!t.isExpr}else this.exprAllowed=!0},v.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0},v.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0},v.parenL.updateContext=function(e){var t=e===v._if||e===v._for||e===v._with||e===v._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0},v.incDec.updateContext=function(){},v._function.updateContext=function(e){e.beforeExpr&&e!==v.semi&&e!==v._else&&(e!==v.colon&&e!==v.braceL||this.curContext()!==te.b_stat)&&this.context.push(te.f_expr),this.exprAllowed=!1},v.backQuote.updateContext=function(){this.curContext()===te.q_tmpl?this.context.pop():this.context.push(te.q_tmpl),this.exprAllowed=!1},v.star.updateContext=function(e){e==v._function&&(this.curContext()===te.f_expr?this.context[this.context.length-1]=te.f_expr_gen:this.context.push(te.f_gen)),this.exprAllowed=!0},v.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ae=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new P(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ie=j.prototype,re="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);function oe(e,t,n,a){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&a.raise(n,"Error parsing regular expression: "+e.message),e}}ie.next=function(){this.options.onToken&&this.options.onToken(new ae(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ie.getToken=function(){return this.next(),new ae(this)},"undefined"!=typeof Symbol&&(ie[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===v.eof,value:t}}}}),ie.curContext=function(){return this.context[this.context.length-1]},ie.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(v.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ie.readToken=function(e){return d(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ie.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},ie.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,a=this.input.indexOf("*/",this.pos+=2);if(-1===a&&this.raise(this.pos-2,"Unterminated comment"),this.pos=a+2,this.options.locations)for(k.lastIndex=n;(e=k.exec(this.input))&&e.index8&&e<14||e>=5760&&O.test(String.fromCharCode(e))))break e;++this.pos}}},ie.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ie.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(v.ellipsis)):(++this.pos,this.finishToken(v.dot))},ie.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(v.assign,2):this.finishOp(v.slash,1)},ie.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,a=42===e?v.star:v.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,a=v.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(v.assign,n+1):this.finishOp(a,n)},ie.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?v.logicalOR:v.logicalAND,2):61===t?this.finishOp(v.assign,2):this.finishOp(124===e?v.bitwiseOR:v.bitwiseAND,1)},ie.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(v.assign,2):this.finishOp(v.bitwiseXOR,1)},ie.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&_.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(v.incDec,2):61===t?this.finishOp(v.assign,2):this.finishOp(v.plusMin,1)},ie.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(v.assign,n+1):this.finishOp(v.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(v.relational,n))},ie.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(v.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(v.arrow)):this.finishOp(61===e?v.eq:v.prefix,1)},ie.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(v.parenL);case 41:return++this.pos,this.finishToken(v.parenR);case 59:return++this.pos,this.finishToken(v.semi);case 44:return++this.pos,this.finishToken(v.comma);case 91:return++this.pos,this.finishToken(v.bracketL);case 93:return++this.pos,this.finishToken(v.bracketR);case 123:return++this.pos,this.finishToken(v.braceL);case 125:return++this.pos,this.finishToken(v.braceR);case 58:return++this.pos,this.finishToken(v.colon);case 63:return++this.pos,this.finishToken(v.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(v.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(v.prefix,1)}this.raise(this.pos,"Unexpected character '"+le(e)+"'")},ie.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var se=!!oe("￿","u");function le(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}ie.readRegexp=function(){for(var e,t,n=this,a=this.pos;;){n.pos>=n.input.length&&n.raise(a,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(_.test(i)&&n.raise(a,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var r=this.input.slice(a,this.pos);++this.pos;var o=this.readWord1(),s=r,l="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(a,"Invalid regular expression flag"),o.indexOf("u")>=0&&(se?l="u":(s=(s=s.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(a+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),l=l.replace("u","")))}var u=null;return re||(oe(s,l,a,this),u=oe(r,o)),this.finishToken(v.regexp,{pattern:r,flags:o,value:u})},ie.readInt=function(e,t){for(var n=this.pos,a=0,i=0,r=null==t?1/0:t;i=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=e)break;++this.pos,a=a*e+o}return this.pos===n||null!=t&&this.pos-n!==t?null:a},ie.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,t)},ie.readNumber=function(e){var t=this.pos,n=!1,a=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),a&&this.pos==t+1&&(a=!1);var i=this.input.charCodeAt(this.pos);46!==i||a||(++this.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||a||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=this.input.slice(t,this.pos);return n?r=parseFloat(o):a&&1!==o.length?/[89]/.test(o)||this.strict?this.raise(t,"Invalid number"):r=parseInt(o,8):r=parseInt(o,10),this.finishToken(v.num,r)},ie.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},ie.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;92===a?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(E(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(v.string,t)},ie.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos===this.start&&this.type===v.template?36===n?(this.pos+=2,this.finishToken(v.dollarBraceL)):(++this.pos,this.finishToken(v.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(v.template,e));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(E(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},ie.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return le(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(n,8);return a>255&&(n=n.slice(0,-1),a=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(a)}return String.fromCharCode(t)}},ie.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},ie.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,a=this.options.ecmaVersion>=6;this.pos0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}E.prototype.setPosition=function(e,t){this.pos=[e,t]},E.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"))},E.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"))},E.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t(this.start(),!1));var d=document.createElement("a");d.innerHTML="Forfeit Mission (Exit)",d.classList.add("a-link-button"),d.classList.add("hack-mission-header-element"),d.style.display="inline-block",d.addEventListener("click",()=>(this.finishMission(!1),!1));var h=document.createElement("p");h.setAttribute("id","hacking-mission-timer"),h.style.display="inline-block",h.style.margin="6px";var p=document.createElement("span");p.style.display="block",p.classList.add("hack-mission-action-buttons-container");for(var m=0;m<6;++m)this.actionButtons.push(document.createElement("a")),this.actionButtons[m].style.display="inline-block",this.actionButtons[m].classList.add("a-link-button-inactive"),this.actionButtons[m].classList.add("tooltip"),this.actionButtons[m].classList.add("hack-mission-header-element"),p.appendChild(this.actionButtons[m]);this.actionButtons[0].innerText="Attack(a)";var g=document.createElement("span");g.classList.add("tooltiptexthigh"),g.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(g),this.actionButtons[1].innerText="Scan(s)";var E=document.createElement("span");E.classList.add("tooltiptexthigh"),E.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(E),this.actionButtons[2].innerText="Weaken(w)";var O=document.createElement("span");O.classList.add("tooltiptexthigh"),O.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(O),this.actionButtons[3].innerText="Fortify(f)";var C=document.createElement("span");C.classList.add("tooltiptexthigh"),C.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(C),this.actionButtons[4].innerText="Overflow(r)";var w=document.createElement("span");w.classList.add("tooltiptexthigh"),w.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(w),this.actionButtons[5].innerText="Drop Connection(d)";var S=document.createElement("span");S.classList.add("tooltiptexthigh"),S.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(S);var T=document.createElement("p"),R=document.createElement("p");T.style.display="inline-block",R.style.display="inline-block",T.style.color="#00ccff",R.style.color="red",T.style.margin="4px",R.style.margin="4px",T.setAttribute("id","hacking-mission-player-stats"),R.setAttribute("id","hacking-mission-enemy-stats"),p.appendChild(T),p.appendChild(R),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===y.Core&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(f,!1),this.selectedNode.forEach(function(e){e.action=f})):console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(b,!1),this.selectedNode.forEach(function(e){e.action=b}))}else console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(v,!1),this.selectedNode.forEach(function(e){e.action=v}))}else console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(_,!1),this.selectedNode.forEach(function(e){e.action=_})):console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(k,!1),this.selectedNode.forEach(function(e){e.action=k}))}else console.log("ERR: 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=_}):console.log("ERR: Pressing Action button without selected node")});var x=document.createElement("p");e.appendChild(i),e.appendChild(r),e.appendChild(l),e.appendChild(c),e.appendChild(d),e.appendChild(h),e.appendChild(p),e.appendChild(x)},O.prototype.setActionButtonsInactive=function(){for(var e=0;ePlayer Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;tEnemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},O.prototype.calculateDefenses=function(){for(var e=0,t=0;tPlayer Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;tEnemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},O.prototype.removeAvailablePosition=function(e,t){for(var n=0;nDef: "+Object(u.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){var t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],a=(document.getElementById(n),document.getElementById(n+"-txt"));switch(e.type){case y.Core:t="CPU Core
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Firewall:t="Firewall
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Database:t="Database
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Spam:t="Spam
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Transfer:t="Transfer
HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Shield:default:t="Shield
HP: "+Object(u.formatNumber)(e.hp,1)}t+="
Atk: "+Object(u.formatNumber)(e.atk,1)+"
Def: "+Object(u.formatNumber)(e.def,1),e.action&&(t+="
"+e.action),a.innerHTML=t}else console.log("ERR: Calling updateNodeDomElement on a Node without an element")},O.prototype.getNodeFromElement=function(e){var t=(Object(h.isString)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.log("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.log("ERROR: Unexpected values for x and y: "+n+", "+a),null):this.map[n][a]},O.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.log("Error getting Node object");var t=this;function n(){!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.log("Error getting Node object"),n.plyrCtrl&&(C(e),n.select(e.actionButtons),e.selectedNode.push(n))}(t,e)}e.addEventListener("click",n),e.addEventListener("dblclick",function(){!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.log("ERROR: Getting Node Object in multiselectNode()"),n.plyrCtrl){C(e);var a=n.type;a===y.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))})}}(t,e)}),e.firstChild&&e.firstChild.addEventListener("click",n)},O.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n0&&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(l.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{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,t)=>{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 w=0;O.prototype.process=function(e=1){if(this.started&&!((w+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,w)}),this.playerNodes.forEach(e=>{e.type!==y.Transfer&&e.type!==y.Shield&&e.type!==y.Firewall||(t|=this.processNode(e,w))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,w)}),this.enemyNodes.forEach(e=>{e.type!==y.Transfer&&e.type!==y.Shield&&e.type!==y.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,w))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*w,e.hp+=.1*w}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*w,e.maxhp+=.05*w,e.hp+=.1*w,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=w*i.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),w=0)):this.finishMission(!1):this.finishMission(!0)}},O.prototype.processNode=function(e,t=1){if(null!=e.action){var n,i,r=null;e.conn&&(null==(r=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(r.plyrCtrl?(n=this.playerDef,i=this.enemyAtk):r.enmyCtrl?(n=this.enemyDef,i=this.playerAtk):(n=r.def,i=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*a.a.HackingMissionDifficultyToHacking;switch(e.action){case f:if(null==r)break;if(null==e.conn)break;var u=this.calculateAttackDamage(i,n,l?o.a.hacking_skill:c);r.hp-=u/5*t;break;case b:if(null==r)break;if(null==e.conn)break;var d=this.calculateScanEffect(i,n,l?o.a.hacking_skill:c);r.def-=d/5*t,s=!0;break;case v:if(null==r)break;if(null==e.conn)break;d=this.calculateWeakenEffect(i,n,l?o.a.hacking_skill:c);r.atk-=d/5*t,s=!0;break;case _:d=this.calculateFortifyEffect(o.a.hacking_skill);e.def+=d/5*t,s=!0;break;case k:d=this.calculateOverflowEffect(o.a.hacking_skill);if(e.def{0===e.targetedCount&&(e.def*=a.a.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),r&&this.updateNodeDomElement(r),s}},O.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case y.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(d.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(d.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(d.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=_}else{var a;null==(a=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.log("Error getting Target node Object in enemyAISelectAction()"),a.def>this.enemyAtk+15?e.def<50?e.action=_:e.action=k:Math.abs(a.def-this.enemyAtk)<=15?e.action=b:e.action=f}break;case y.Transfer:e.def<125?e.action=_:e.action=k;break;case y.Firewall:case y.Shield:e.action=_}};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(p=!1,m=null,e){var t=1+this.faction.favor/100;console.log("Hacking mission base reward: "+this.reward),console.log("favorMult: "+t),console.log("rep mult: "+o.a.faction_rep_mult);var n=this.reward*o.a.faction_rep_mult*t;Object(s.dialogBoxCreate)("Mission won! You earned "+Object(u.formatNumber)(n,3)+" reputation with "+this.faction.name),o.a.gainIntelligenceExp(this.difficulty*a.a.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",i.Engine.loadFactionContent(),Object(r.c)(this.faction.name)}}).call(this,n(53))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayToString=function(e){return`[${e.join(", ")}]`}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return S}),n.d(t,"d",function(){return ne}),n.d(t,"g",function(){return ie}),n.d(t,"e",function(){return O}),n.d(t,"a",function(){return k}),n.d(t,"f",function(){return E}),n.d(t,"c",function(){return le});var a=n(1),i=n(6),r=n(12),o=n(0),s=n(8),l=n(10),c=n(58),u=n(3),d=n(36),h=n(14),p=n.n(h),m=n(2),g=n(5),y=n(27),f=n(55),b=n(20),v=n(15);e(document).keydown(function(e){if(i.Engine.currentPage==i.Engine.Page.Gang&&!v.e){if(null!=Y&&Y===document.activeElement)return;49===e.keyCode?"block"===W.style.display&&D.click():50===e.keyCode&&"block"===H.style.display&&F.click()}}),e(document).mousedown(function(t){N&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(f.removeElement)($),$=null,X=null,N=!1,Z=null)});let _=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"],k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}};function E(){k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}}function O(e){k=JSON.parse(e,l.Reviver)}let C=0;let w=0;function S(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.power=0,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0}function T(e){this.name=e,this.task=x.Unassigned,this.city=o.a.city,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.upgrades=[]}function R(e="",t="",n={baseRespect:0,baseWanted:0,baseMoney:0,hackWeight:0,strWeight:0,defWeight:0,dexWeight:0,agiWeight:0,chaWeight:0,difficulty:0}){this.name=e,this.desc=t,this.baseRespect=n.baseRespect?n.baseRespect:0,this.baseWanted=n.baseWanted?n.baseWanted:0,this.baseMoney=n.baseMoney?n.baseMoney:0,this.hackWeight=n.hackWeight?n.hackWeight:0,this.strWeight=n.strWeight?n.strWeight:0,this.defWeight=n.defWeight?n.defWeight:0,this.dexWeight=n.dexWeight?n.dexWeight:0,this.agiWeight=n.agiWeight?n.agiWeight:0,this.chaWeight=n.chaWeight?n.chaWeight:0,this.difficulty=n.difficulty?n.difficulty:1}S.prototype.process=function(e=1){this.processGains(e),this.processExperienceGains(e),function(e=1){if(o.a.inGang()&&!((C+=e)<150)){var t=o.a.gang.facName;for(var n in k)if(k.hasOwnProperty(n))if(n==t)k[n].power+=o.a.gang.calculatePower();else{var a=.02*Math.random();k[n].power+=a}C-=150}}(e),function(e=1){if(o.a.inGang()&&!((w+=e)
Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:5e-5,baseWanted:1e-5,baseMoney:1,hackWeight:100,difficulty:1}),Phishing:new R("Phishing","Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:8e-5,baseWanted:.001,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3}),"Identity Theft":new R("Identity Theft","Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",{baseRespect:1e-4,baseWanted:.01,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:4}),"DDoS Attacks":new R("DDoS Attacks","Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level",{baseRespect:4e-4,baseWanted:.05,hackWeight:100,difficulty:7}),"Plant Virus":new R("Plant Virus","Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level",{baseRespect:6e-4,baseWanted:.05,hackWeight:100,difficulty:10}),"Fraud & Counterfeiting":new R("Fraud & Counterfeiting","Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:5e-4,baseWanted:.1,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:17}),"Money Laundering":new R("Money Laundering","Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",{baseRespect:6e-4,baseWanted:.2,baseMoney:40,hackWeight:75,chaWeight:25,difficulty:20}),Cyberterrorism:new R("Cyberterrorism","Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level",{baseRespect:.001,baseWanted:.5,hackWeight:80,chaWeight:20,difficulty:33}),"Ethical Hacking":new R("Ethical Hacking","Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level",{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}),"Mug People":new R("Mug People","Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level",{baseRespect:5e-5,baseWanted:1e-5,baseMoney:1,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}),"Deal Drugs":new R("Deal Drugs","Assign this gang member to sell drugs.

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:8e-5,baseWanted:.001,baseMoney:4,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3}),"Run a Con":new R("Run a Con","Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",{baseRespect:15e-5,baseWanted:.01,baseMoney:10,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:10}),"Armed Robbery":new R("Armed Robbery","Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level",{baseRespect:15e-5,baseWanted:.05,baseMoney:25,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:17}),"Traffick Illegal Arms":new R("Traffick Illegal Arms","Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level",{baseRespect:3e-4,baseWanted:.1,baseMoney:40,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:75,difficulty:25}),"Threaten & Blackmail":new R("Threaten & Blackmail","Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:2e-4,baseWanted:.05,baseMoney:15,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}),Terrorism:new R("Terrorism","Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level",{baseRespect:.001,baseWanted:1,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:33}),"Vigilante Justice":new R("Vigilante Justice","Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level",{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1}),"Train Combat":new R("Train Combat","Assign this gang member to increase their combat stats (str, def, dex, agi)",{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:5}),"Train Hacking":new R("Train Hacking","Assign this gang member to train their hacking skills",{hackWeight:100,difficulty:8}),"Territory Warfare":new R("Territory Warfare","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.",{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:3})};function I(e="",t="",n=0,a="w"){this.name=e,this.desc=t,this.cost=n,this.type=a}I.prototype.apply=function(e){switch(this.name){case"Baseball Bat":e.str_mult*=1.05,e.def_mult*=1.05;break;case"Katana":e.str_mult*=1.1,e.def_mult*=1.1,e.dex_mult*=1.1;break;case"Glock 18C":e.str_mult*=1.15,e.def_mult*=1.15,e.dex_mult*=1.15,e.agi_mult*=1.15;break;case"P90C":e.str_mult*=1.2,e.def_mult*=1.2,e.agi_mult*=1.1;break;case"Steyr AUG":e.str_mult*=1.25,e.def_mult*=1.25;break;case"AK-47":e.str_mult*=1.5,e.def_mult*=1.5;break;case"M15A10 Assault Rifle":e.str_mult*=1.6,e.def_mult*=1.6;break;case"AWM Sniper Rifle":e.str_mult*=1.5,e.dex_mult*=1.5,e.agi_mult*=1.5;break;case"Bulletproof Vest":e.def_mult*=1.05;break;case"Full Body Armor":e.def_mult*=1.1;break;case"Liquid Body Armor":e.def_mult*=1.25,e.agi_mult*=1.25;break;case"Graphene Plating Armor":e.def_mult*=1.5;break;case"Ford Flex V20":e.agi_mult*=1.1,e.cha_mult*=1.1;break;case"ATX1070 Superbike":e.agi_mult*=1.15,e.cha_mult*=1.15;break;case"Mercedes-Benz S9001":e.agi_mult*=1.2,e.cha_mult*=1.2;break;case"White Ferrari":e.agi_mult*=1.25,e.cha_mult*=1.25;break;case"NUKE Rootkit":e.hack_mult*=1.1;break;case"Soulstealer Rootkit":e.hack_mult*=1.2;break;case"Demon Rootkit":e.hack_mult*=1.3;break;default:console.log("ERROR: Could not find this upgrade: "+this.name)}},I.prototype.toJSON=function(){return Object(l.Generic_toJSON)("GangMemberUpgrade",this)},I.fromJSON=function(e){return Object(l.Generic_fromJSON)(I,e.data)},l.Reviver.constructors.GangMemberUpgrade=I;let P={"Baseball Bat":new I("Baseball Bat","Increases strength and defense by 5%",1e6,"w"),Katana:new I("Katana","Increases strength, defense, and dexterity by 10%",12e6,"w"),"Glock 18C":new I("Glock 18C","Increases strength, defense, dexterity, and agility by 15%",25e6,"w"),P90C:new I("P90C","Increases strength and defense by 20%. Increases agility by 10%",5e7,"w"),"Steyr AUG":new I("Steyr AUG","Increases strength and defense by 25%",6e7,"w"),"AK-47":new I("AK-47","Increases strength and defense by 50%",1e8,"w"),"M15A10 Assault Rifle":new I("M15A10 Assault Rifle","Increases strength and defense by 60%",15e7,"w"),"AWM Sniper Rifle":new I("AWM Sniper Rifle","Increases strength, dexterity, and agility by 50%",225e6,"w"),"Bulletproof Vest":new I("Bulletproof Vest","Increases defense by 5%",2e6,"a"),"Full Body Armor":new I("Full Body Armor","Increases defense by 10%",5e6,"a"),"Liquid Body Armor":new I("Liquid Body Armor","Increases defense and agility by 25%",25e6,"a"),"Graphene Plating Armor":new I("Graphene Plating Armor","Increases defense by 50%",4e7,"a"),"Ford Flex V20":new I("Ford Flex V20","Increases agility and charisma by 10%",3e6,"v"),"ATX1070 Superbike":new I("ATX1070 Superbike","Increases agility and charisma by 15%",9e6,"v"),"Mercedes-Benz S9001":new I("Mercedes-Benz S9001","Increases agility and charisma by 20%",18e6,"v"),"White Ferrari":new I("White Ferrari","Increases agility and charisma by 25%",3e7,"v"),"NUKE Rootkit":new I("NUKE Rootkit","Increases hacking by 10%",5e6,"r"),"Soulstealer Rootkit":new I("Soulstealer Rootkit","Increases hacking by 20%",15e6,"r"),"Demon Rootkit":new I("Demon Rootkit","Increases hacking by 30%",5e7,"r")},N=!1;function A(e=""){var t="gang-member-upgrade-popup-box";if(N){if(null==Z||null==$||null==X)return void console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null");for(var n=1;n-1||o.a.gang.members[n].task.name.indexOf(a)>-1){var i=M(o.a.gang.members[n]);X.appendChild(i),Z.push(i)}}else{Q=Object(u.createElement)("input",{type:"text",placeholder:"Filter gang members",value:e,onkeyup:()=>{A(Q.value.toString())}}),Z=[Q];for(a=Q.value.toString(),n=0;n-1||o.a.gang.members[n].task.name.indexOf(a)>-1)&&Z.push(M(o.a.gang.members[n]));$=Object(d.createPopup)(t,Z),X=document.getElementById(t+"-content"),N=!0}}function M(e){var t=Object(u.createElement)("div",{border:"1px solid white"}),n=Object(u.createElement)("h1",{innerText:e.name+" ("+e.task.name+")"});t.appendChild(n);for(var a=Object(u.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+e.hack+" (x"+Object(m.formatNumber)(e.hack_mult,2)+")\nStr: "+e.str+" (x"+Object(m.formatNumber)(e.str_mult,2)+")\nDef: "+e.def+" (x"+Object(m.formatNumber)(e.def_mult,2)+")\nDex: "+e.dex+" (x"+Object(m.formatNumber)(e.dex_mult,2)+")\nAgi: "+e.agi+" (x"+Object(m.formatNumber)(e.agi_mult,2)+")\nCha: "+e.cha+" (x"+Object(m.formatNumber)(e.cha_mult,2)+")\n"}),i=[],r=0;r{return!o.a.money.lt(e.cost)&&(o.a.loseMoney(e.cost),n.upgrades.push(e.name),e.apply(n),A(Q.value.toString()),!1)}}))}(f=C[S],w,e)}return t.appendChild(b),t.appendChild(v),t.appendChild(_),t.appendChild(k),t}let L,B=!1,j=null,D=null,F=null,H=null,W=null,G=null,U=null,q=null,K=null,V=null,Y=null,z=null,J=null,$=null,X=null,Q=null,Z=null,ee=null,te=null;function ne(){if(!B||null==j){B=!0,j=Object(u.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var e=o.a.gang.facName;o.a.gang.members,o.a.gang.wanted,o.a.gang.respect;j.appendChild(Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(i.Engine.loadFactionContent(),Object(r.c)(e),!1)})),D=Object(u.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (1)",clickListener:()=>(H.style.display="block",W.style.display="none",D.classList.toggle("a-link-button-inactive"),D.classList.toggle("a-link-button"),F.classList.toggle("a-link-button-inactive"),F.classList.toggle("a-link-button"),ie(),!1)}),F=Object(u.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (2)",clickListener:()=>(H.style.display="none",W.style.display="block",D.classList.toggle("a-link-button-inactive"),D.classList.toggle("a-link-button"),F.classList.toggle("a-link-button-inactive"),F.classList.toggle("a-link-button"),ie(),!1)}),j.appendChild(D),j.appendChild(F),H=Object(u.createElement)("div",{display:"block",id:"gang-management-subpage"});var t="";t=o.a.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice",G=Object(u.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.

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

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

"}),H.appendChild(G),U=Object(u.createElement)("p",{id:"gang-info",width:"70%"}),H.appendChild(U),q=Object(u.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{var e=Object(v.j)(),t=Object(v.i)();return e.innerHTML="Recruit Gang Member",t.innerHTML="Cancel",e.addEventListener("click",()=>{var e=Object(v.h)();if(""===e)Object(s.dialogBoxCreate)("You must enter a name for your Gang member!");else{for(var t=0;t{Object(v.f)()}),Object(v.g)("Please enter a name for your new Gang member:"),!1}}),H.appendChild(q),K=Object(u.createElement)("p",{color:"red",id:"gang-recruit-requirement-text"}),H.appendChild(K),H.appendChild(Object(u.createElement)("br",{})),V=Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=H.getElementsByClassName("accordion-header"),t=0;t{for(var e=H.getElementsByClassName("accordion-header"),t=0;t{ae()}}),z=Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{A()}}),H.appendChild(V),H.appendChild(L),H.appendChild(Y),H.appendChild(z),J=Object(u.createElement)("ul",{id:"gang-member-list"}),ae(),H.appendChild(J),W=Object(u.createElement)("div",{id:"gang-territory-subpage",display:"none"}),ee=Object(u.createElement)("p",{width:"70%",innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.

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

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

"}),W.appendChild(ee);var n=Object(u.createElement)("fieldset",{width:"50%",display:"inline-block"});te=Object(u.createElement)("p",{id:"gang-territory-info"}),n.appendChild(te),W.appendChild(n),j.appendChild(W),j.appendChild(H),document.getElementById("entire-game-container").appendChild(j)}j.style.display="block",ie()}function ae(){Object(y.removeChildrenFromElement)(J);for(var e=o.a.gang.members,t=Y.value.toString(),n=0;n-1||e[n].task.name.indexOf(t)>-1)&&re(e[n])}function ie(){if(B&&o.a.inGang())if("block"===W.style.display){for(var e in te.innerHTML="",k)if(k.hasOwnProperty(e)){var t=k[e];let n,a=100*t.territory;n=a<=0?Object(m.formatNumber)(0,2):a>=100?Object(m.formatNumber)(100,2):Object(m.formatNumber)(a,2),e==o.a.gang.facName?te.innerHTML+=""+e+"
(Power: "+Object(m.formatNumber)(t.power,6)+"): "+n+"%

":te.innerHTML+=e+"
(Power: "+Object(m.formatNumber)(t.power,6)+"): "+n+"%

"}}else{if(U instanceof Element){var n;n=(c=r.b[o.a.gang.facName])instanceof r.a?c.playerReputation:"ERROR",Object(y.removeChildrenFromElement)(U),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Respect: "+Object(m.formatNumber)(o.a.gang.respect,6)+" ("+Object(m.formatNumber)(5*o.a.gang.respectGainRate,6)+" / sec)",tooltip:"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction."})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+Object(m.formatNumber)(o.a.gang.wanted,6)+" ("+Object(m.formatNumber)(5*o.a.gang.wantedGainRate,6)+" / sec)",tooltip:"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1."})),U.appendChild(Object(u.createElement)("br",{}));var i=o.a.gang.respect/(o.a.gang.respect+o.a.gang.wanted);i=100*(1-i),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Wanted Level Penalty: -"+Object(m.formatNumber)(i,2)+"%",tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Money gain rate: $"+Object(m.formatNumber)(5*o.a.gang.moneyGainRate,2)+" / sec"})),U.appendChild(Object(u.createElement)("br",{}));var l=100*k[o.a.gang.facName].territory;let e;e=l<=0?Object(m.formatNumber)(0,2):l>=100?Object(m.formatNumber)(100,2):Object(m.formatNumber)(l,2),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Territory: "+Object(m.formatNumber)(e,3)+"%",tooltip:"The percentage of total territory your Gang controls"})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Faction reputation: "+Object(m.formatNumber)(n,3)})),U.appendChild(Object(u.createElement)("br",{}))}else console.log("ERROR: gang-info DOM element DNE");var c,d=o.a.gang.members.length,h=0;if(d>0)h=Math.pow(a.a.GangRecruitCostMultiplier,d);if(null==(c=r.b[o.a.gang.facName]))return void Object(s.dialogBoxCreate)("Could not find your gang's faction. This is probably a bug please report to dev");var p=q;d>=a.a.MaximumGangMembers?(p.className="a-link-button-inactive",K.style.display="block",K.innerHTML="You have reached the maximum amount of gang members"):c.playerReputation>=h?(p.className="a-link-button",K.style.display="none"):(p.className="a-link-button-inactive",K.style.display="block",K.innerHTML=Object(m.formatNumber)(h,2)+" Faction reputation needed to recruit next member");for(var g=0;gStrength: "+Object(m.formatNumber)(e.str,0)+" ("+p()(e.str_exp).format("(0.00a)")+" exp)
Defense: "+Object(m.formatNumber)(e.def,0)+" ("+p()(e.def_exp).format("(0.00a)")+" exp)
Dexterity: "+Object(m.formatNumber)(e.dex,0)+" ("+p()(e.dex_exp).format("(0.00a)")+" exp)
Agility: "+Object(m.formatNumber)(e.agi,0)+" ("+p()(e.agi_exp).format("(0.00a)")+" exp)
Charisma: "+Object(m.formatNumber)(e.cha,0)+" ("+p()(e.cha_exp).format("(0.00a)")+" exp)
");var a=document.getElementById(t+"gang-member-gain-info");a&&(a.innerHTML="Money: $"+Object(m.formatNumber)(5*e.calculateMoneyGain(),2)+" / sec
Respect: "+Object(m.formatNumber)(5*e.calculateRespectGain(),6)+" / sec
Wanted Level: "+Object(m.formatNumber)(5*e.calculateWantedLevelGain(),6)+" / sec
")}}function se(e,t){var n=e.name,a=document.getElementById(n+"gang-member-task-description");if(a){var i=x[t];if(null==i)return;var r=i.desc;a.innerHTML=r}}function le(){null!=j&&Object(b.removeElementById)(j.id),B=!1,j=null,D=null,F=null,H=null,W=null,G=null,U=null,q=null,K=null,V=null,L=null,Y=null,z=null,J=null,$=null,X=null,Q=null,Z=null}}).call(this,n(53))},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(8);function i(e){Object(a.dialogBoxCreate)("Caught an exception: "+e+"

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

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

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

If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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.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";n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return l});var a=n(0),i=n(28),r=n(7);function o(e,t,n){return`ERROR: bladeburner.${e}() failed due to an invalid action specified. `+`Type: ${t}, Name: ${n}. Note that for contracts and operations, the `+"name of the operation is case-sensitive."}function s(e,t){return`Bladeburner.${e}() failed with exception: `+t}function l(e,t){const n=`${t}() failed because you do not`+" currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7";if(!(a.a.bladeburner instanceof i.a&&(7===a.a.bitNodeN||a.a.sourceFiles.some(e=>7===e.n))))throw Object(r.d)(e,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(3);t.appendLineBreaks=function(e,t){for(let n=0;n=n.length){var o=n.substring(0,a);return t.innerHTML="> "+o,i(!0)}var o=n.substring(0,a);t.innerHTML="> "+o+"";var s=e(t,n,a+1);s.then(function(e){i(e)},function(e){r(e)})},30)})}(i,e,0).then(function(e){t(e)},function(e){n(e)})})}let m=!1;function g(e,t=!1){return m=!0,i.Engine.loadRedPillContent(),p("[ERROR] SEMPOOL INVALID").then(function(){return p("[ERROR] Segmentation Fault")}).then(function(){return p("[ERROR] SIGKILL RECVD")}).then(function(){return p("Dumping core...")}).then(function(){return p("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return p("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return p("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return p("----------------------------------------")}).then(function(){return p("Failsafe initiated...")}).then(function(){return p("Restarting BitNode-"+e+"...")}).then(function(){return p("...........")}).then(function(){return p("...........")}).then(function(){return p("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return p("..............................................")}).then(function(){return p("..............................................")}).then(function(){return function(e,t=!1){var n=document.getElementById("red-pill-container");Object(d.removeChildrenFromElement)(n);for(var i=document.createElement("pre"),r=[],o=1;o<=12;++o)r.push(y(o));i.innerHTML=" O
| O O | O O |
O | | / __| \\ | | O
O | O | | O / | O | | O | O
| | | | |_/ |/ | \\_ \\_| | | | |
O | | | O | | O__/ | / \\__ | | O | | | O
| | | | | | | / /| O / \\| | | | | | |
O | | | \\| | O / _/ | / O | |/ | | | O
| | | |O / | | O / | O O | | \\ O| | | |
| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |
\\| O | |_/ |\\| \\ O \\__| \\_| | O |/
| | |_/ | | \\| / | \\_| | |
\\| / \\| | / / \\ |/
| "+r[9]+" | | / | "+r[10]+" |
"+r[8]+" | | | | | | | "+r[11]+"
| | | / / \\ \\ | | |
\\| | / "+r[6]+" / \\ "+r[7]+" \\ | |/
\\ | / / | | \\ \\ | /
\\ \\JUMP "+r[4]+"3R | | | | | | R3"+r[5]+" PMUJ/ /
\\|| | | | | | | | | ||/
\\| \\_ | | | | | | _/ |/
\\ \\| / \\ / \\ |/ /
"+r[0]+" |/ "+r[1]+" | | "+r[2]+" \\| "+r[3]+"
| | | | | | | |
\\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/



",n.appendChild(i);for(var o=1;o<=12;++o)!function(n){var i="bitnode-"+n.toString(),r=Object(c.clearEventListeners)(i);null!=r&&(1===n||2===n||3===n||4===n||5===n||6===n||7===n||8===n||11===n||12===n?r.addEventListener("click",function(){var i="BitNode"+n,r=a.b[i];null!=r?(Object(h.b)("BitNode-"+n+": "+r.name+"

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

"+n.desc+"
"}function f(t,n,a=!1){var i=Object(h.d)();i.innerHTML="Enter BitNode-"+t,i.addEventListener("click",function(){a?r.a.gainIntelligenceExp(-5):function(e){var t="SourceFile"+e.toString(),n=s.b[t];if(null!=n){for(var a=!1,i=null,o=0;o=3&&12!==i.n?Object(u.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++i.lvl,Object(u.dialogBoxCreate)(n.name+" was upgraded to level "+i.lvl+" for destroying its corresponding BitNode!"));else{var l=new s.a(e,1);r.a.sourceFiles.push(l),5===e&&(r.a.intelligence=1),Object(u.dialogBoxCreate)("You received a Source-File for destroying a Bit Node!

"+n.name+"

"+n.info)}}else console.log("ERROR: could not find source file for Bit node: "+e)}(n),m=!1;var i=document.getElementById("red-pill-container");Object(d.removeChildrenFromElement)(i),r.a.bitNodeN=t,console.log("Entering Bit Node "+r.a.bitNodeN),e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),document.getElementById("terminal-input-td").innerHTML='$ ',e("input[class=terminal-input]").prop("disabled",!1),l.b.hackFlag=!1,Object(o.b)(),Object(h.a)()});var c=Object(h.c)();c.innerHTML="Back",c.addEventListener("click",function(){Object(h.a)()})}}).call(this,n(53))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return Corporation});var _BitNode__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(16),_engine__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6),_Faction__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_Literature__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(63),_Location__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4),_Player__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(0),decimal_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(26),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(100),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(10),numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(14),numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(3),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(36),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(2),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(5),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(32),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(27),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(20),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(15),companyStates=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];function CorporationState(){this.state=0}CorporationState.prototype.nextState=function(){(this.state<0||this.state>=companyStates.length)&&(this.state=0),++this.state,this.state>=companyStates.length&&(this.state=0)},CorporationState.prototype.getState=function(){return companyStates[this.state]},CorporationState.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("CorporationState",this)},CorporationState.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(CorporationState,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.CorporationState=CorporationState;var TOTALSHARES=1e9,CyclesPerMarketCycle=75,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/companyStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5;function Material(e={}){this.name=e.name?e.name:"",this.qty=0,this.qlt=0,this.dmd=0,this.dmdR=0,this.cmp=0,this.cmpR=0,this.mv=0,this.mku=0,this.buy=0,this.sll=0,this.prd=0,this.exp=[],this.totalExp=0,this.imp=0,this.bCost=0,this.sCost=0,this.prdman=[!1,0],this.sllman=[!1,0],this.init()}Material.prototype.init=function(e={}){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1e3,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,100],this.cmp=80,this.cmpR=[65,95],this.bCost=1500,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=4e3,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=6750,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,100],this.cmp=50,this.cmpR=[25,75],this.bCost=16e3,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,100],this.bCost=8e3,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,100],this.cmp=90,this.cmpR=[80,100],this.bCost=2e4,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,100],this.cmp=90,this.cmpR=[80,100],this.bCost=27e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":break;default:console.log("Invalid material type in init(): "+this.name)}},Material.prototype.processMarket=function(){var e=Math.random()*this.mv/100,t=Math.random()*this.mv/300;Math.random()<.42?(this.cmp*=1+e,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1-t):(this.cmp*=1-e,this.cmpthis.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=1+t):(this.dmd*=1-e,this.dmd
Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Energy).format("$0.000a")+"
Recommended starting Industry: NO",Utilities:"Distributes water and provides wastewater services.

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

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

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

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

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

Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Tobacco).format("$0.000a")+"
Recommended starting Industry: YES",Chemical:"Product industrial chemicals

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

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

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

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

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

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

Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.RealEstate).format("$0.000a")+"
Recommended starting Industry: NO"},ProductRatingWeights={[Industries.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[Industries.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[Industries.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[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},[Industries.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[Industries.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[Industries.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[Industries.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}},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."]},empManualAssignmentModeActive=!1;function Industry(e={}){this.offices={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chongqing]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:new OfficeSpace({loc:_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12,size:OfficeInitialSize}),[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:0},this.warehouses={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chonqing]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:new Warehouse({loc:_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12,size:WarehouseInitialSize}),[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new Material({name:"Scientific Research"}),this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0);var t=Object.keys(IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.init()}Industry.prototype.init=function(){switch(this.startingCost=IndustryStartingCosts[this.type],this.type){case 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 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 Industries.Agriculture:this.reFac=.75,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 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 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 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 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 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 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 Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2.5,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case 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 Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.1,this.aiFac=.1,this.robFac=.05,this.reqMats={Hardware:.5,Energy:1},this.prodMats=["AICores"],this.makesProducts=!0;break;case 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 Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:20,Energy:10,Water:10,Hardware:5},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.log("ERR: Invalid Industry Type passed into Industry.init(): "+this.type)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case Industries.Food:return"create and manage restaurants";case Industries.Tobacco:return"create tobacco and tobacco-related products";case Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case Industries.Robotics:return"build specialized robots and robot-related products";case Industries.Software:return"develop computer software";case Industries.Healthcare:return"build and manage hospitals";case Industries.RealEstate:return"develop and manage real estate properties";default:return console.log("ERROR: Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"
")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"!==t){var a=this.processMaterials(e,n);this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1]),a=this.processProducts(e,n),this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1])}else{(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.log("ERROR: NaN in Corporation's computed revenue/expenses"),console.log(this.thisCycleRevenue.toString()),console.log(this.thisCycleExpenses.toString()),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var i=0;for(var r in this.offices)this.offices.hasOwnProperty(r)&&this.offices[r]instanceof OfficeSpace&&(i+=this.offices[r].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(i),this.processMaterialMarket(e),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);var o=n.getDreamSenseGain(),s=4*o;o>0&&(this.popularity+=o*e,this.awareness+=s*e)}},Industry.prototype.processMaterialMarket=function(e=1){for(var t=this.reqMats,n=this.prodMats,a=0;a0&&(i.qty+=a,expenses+=a*i.bCost)}(matName,industry),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier(),prod;prod=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,prod*=SecsPerMarketCycle*marketCycles;for(var totalMatSize=0,tmp=0;tmp0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);prod=Math.min(maxAmt,prod)}prod<0&&(prod=0),warehouse.smartSupplyStore+=prod/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*prod;warehouse.materials[reqMatName].qty0&&prod>0){for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=this.reqMats[reqMatName]*prod*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd=0,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(var j=0;jmat.bCost?sCost-mat.bCost>markupLimit&&(markup=markupLimit/(sCost-mat.bCost)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI=expWarehouse.size)return;var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.log("ERROR: Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.005*Math.pow(office.employeeProd[EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(var a in this.products){if(this.products.hasOwnProperty(a))if(!(l=this.products[a]).fin){var i,r=l.createCity,o=this.offices[r],s=o.employeeProd[EmployeePositions.Operations]+o.employeeProd[EmployeePositions.Engineer]+o.employeeProd[EmployeePositions.Management];i=0===s?0:o.employeeProd[EmployeePositions.Engineer]/s+o.employeeProd[EmployeePositions.Operations]/s+o.employeeProd[EmployeePositions.Management]/s,l.createProduct(e,i*Math.pow(s,.29)),l.prog>=100&&l.finishProduct(o.employeeProd,this);break}}for(var a in this.products){var l;if(this.products.hasOwnProperty(a))(l=this.products[a])instanceof Product&&l.fin&&(n+=this.processProduct(e,l,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){for(var totalProfit=0,i=0;i0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);prod=Math.min(maxAmt,prod)}warehouse.smartSupplyStore+=prod/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*prod;warehouse.materials[reqMatName].qty0&&prod>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*prod*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=prod*producableFrac}product.data[city][1]=prod*producableFrac/(SecsPerMarketCycle*marketCycles);break;case"SALE":for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);var sCost;product.pCost*=ProductProductionCostRatio,Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1,markupLimit=product.rat/product.mku;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor,sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sllman[city][1])){var tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.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]):maxSell;sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break;case"START":case"PURCHASE":case"EXPORT":break;default:console.log("ERROR: Invalid State: "+this.state)}}return totalProfit},Industry.prototype.discontinueProduct=function(e,t){var n=t.company;t.industry;for(var a in this.products)this.products.hasOwnProperty(a)&&e===this.products[a]&&(delete this.products[a],n.updateUIContent())},Industry.prototype.upgrade=function(e,t){var n=t.corporation,a=(t.division,t.office),i=e[0];for(e[1],e[2],e[3];this.upgrades.length<=i;)this.upgrades.push(0);switch(++this.upgrades[i],i){case 0:for(var r=0;r0&&(t=1+e.employeeProd[EmployeePositions.Business]/e.employeeProd.total),t*Math.pow(1+e.employeeProd[EmployeePositions.Business],.15)},Industry.prototype.getAdvertisingFactors=function(){var 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]},Industry.prototype.getMarketFactor=function(e){return e.dmd*(100-e.cmp)/100},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Industry=Industry;var EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"};function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.age=e.age?e.age:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(20,50),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(.1,5),this.pro=0,this.loc=e.loc?e.loc:"",this.pos=EmployeePositions.Unassigned}Employee.prototype.process=function(e=1,t){var n=.001*e,a=n*Math.random();this.age+=n,this.exp+=n,this.age>150&&(this.int-=a,this.eff-=a,this.cha-=a);var i=n*Math.random();this.pos===EmployeePositions.Training&&(this.cha+=i,this.exp+=i,this.eff+=i);var r=.5*(t.employees.length/t.size-.5);return Math.random()<.5-r?(this.ene+=a,this.hap+=a):(this.ene-=a,this.hap-=a),this.eneHappiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.hap,3)+"
Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.ene,3)+"
Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.age,3)+"
Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,3)+"
Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(a,3)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.exp,3)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n,3)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"
Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a")+"/ s
"}));var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{});for(var s in EmployeePositions)EmployeePositions.hasOwnProperty(s)&&o.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:EmployeePositions[s],value:EmployeePositions[s]}));o.addEventListener("change",()=>{this.pos=o.options[o.selectedIndex].value});for(var l=0;lHappiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.hap,3)+"
Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.ene,3)+"
Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.age,3)+"
Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,3)+"
Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(a,3)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.exp,3)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n,3)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"
Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a")+"/ s
"}else console.log("ERROR: Employee.updateUI() called with null panel")},Employee.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Employee",this)},Employee.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Employee,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Employee=Employee;var OfficeSpaceTiers={Basic:"Basic",Enhanced:"Enhanced",Luxurious:"Luxurious",Extravagant:"Extravagant"};function OfficeSpace(e={}){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,this.tier=OfficeSpaceTiers.Basic,this.minEne=0,this.minHap=0,this.employees=[],this.employeeProd={[EmployeePositions.Operations]:0,[EmployeePositions.Engineer]:0,[EmployeePositions.Business]:0,[EmployeePositions.Management]:0,[EmployeePositions.RandD]:0,total:0}}function Warehouse(e={}){this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.level=0,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.breakdown="",this.smartSupplyStore=0,this.materials={Water:new Material({name:"Water"}),Energy:new Material({name:"Energy"}),Food:new Material({name:"Food"}),Plants:new Material({name:"Plants"}),Metal:new Material({name:"Metal"}),Hardware:new Material({name:"Hardware"}),Chemicals:new Material({name:"Chemicals"}),Drugs:new Material({name:"Drugs"}),Robots:new Material({name:"Robots"}),AICores:new Material({name:"AI Cores"}),RealEstate:new Material({name:"Real Estate"})}}OfficeSpace.prototype.process=function(e=1,t){var n=t.corporation,a=t.industry,i=1;a.funds<0&&a.lastCycleRevenue<0?i=Math.pow(.99,e):a.funds>0&&a.lastCycleRevenue>0&&(i=Math.pow(1.01,e));for(var r=0,o=0;oCharisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.cha,1)+"
Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.exp,1)+"
Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.cre,1)+"
Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.eff,1)+"
Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t.sal).format("$0.000a")+" s
",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),y=[p,m(u,this),m(d,this),m(h,this),g];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)("cmpy-mgmt-hire-employee-popup",y)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,a=t.division,i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.j)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.i)();i.innerHTML="Hire",r.innerHTML="Cancel",i.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.h)(),i=0;iObject(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.f)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.g)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(e){var t=e.corporation,n=e.division;if(null==document.getElementById("cmpy-mgmt-hire-employee-popup")){for(var a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(76,100)/100,i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),c=new Employee({intelligence:i*a,charisma:r*a,experience:o*a,creativity:s*a,efficiency:l*a,salary:2.2*(i+r+o+s+l)*a}),u=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.generateRandomString)(7),d=0;d0&&(this.breakdown+=e+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.qty*MaterialSizes[e],0)+"
"))}this.sizeUsed>this.size&&console.log("ERROR: Warehouse size used greater than capacity, something went wrong")},Warehouse.prototype.updateSize=function(e){null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),this.size=100*this.level*e.getStorageMultiplier()},Warehouse.prototype.createUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry;Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehousePanel),industryWarehouseStorageText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{display:"inline-block",class:"tooltip",color:this.sizeUsed>=this.size?"red":"white"}),industryWarehousePanel.appendChild(industryWarehouseStorageText);var a=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);industryWarehouseUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Upgrade Warehouse Size - "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(a).format("$0.000a"),display:"inline-block",class:t.funds.lt(a)?"a-link-button-inactive":"a-link-button",clickListener:()=>{null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),++this.level,this.updateSize(t),t.funds=t.funds.minus(a),this.createUI(e)}}),industryWarehousePanel.appendChild(industryWarehouseUpgradeSizeButton);var i="This Industry uses ["+Object.keys(n.reqMats).join(", ")+"] in order to ";n.prodMats.length>0?(i+="produce ["+n.prodMats.join(", ")+"] ",n.makesProducts&&(i+=" and "+n.getProductDescriptionText())):n.makesProducts&&(i+=n.getProductDescriptionText()),i+="

To get started with production, purchase your required materials or import them from another of your company's divisions.

";var r="The exact requirements for production are:
";for(var o in n.reqMats)n.reqMats.hasOwnProperty(o)&&(r+=n.reqMats[o]+" "+o+"
");if(r+="in order to create ",n.prodMats.length>0?(r+="one of each produced Material ("+n.prodMats.join(", ")+") ",n.makesProducts&&(r+="or to create one of its Products")):n.makesProducts&&(r+="one of its Products"),industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:i,tooltipleft:r})),industryWarehouseStateText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p"),industryWarehousePanel.appendChild(industryWarehouseStateText),t.unlockUpgrades[1]){null==this.smartSupplyEnabled&&(this.smartSupplyEnabled=!1);industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("label",{for:"cmpy-mgmt-smart-supply-checkbox",innerText:"Enable Smart Supply",color:"white"})),(industrySmartSupplyCheckbox=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",margin:"3px",changeListener:()=>{this.smartSupplyEnabled=industrySmartSupplyCheckbox.checked}})).checked=this.smartSupplyEnabled,industryWarehousePanel.appendChild(industrySmartSupplyCheckbox)}industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"
Materials:
"})),industryWarehouseMaterials=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseMaterials),n.makesProducts&&Object.keys(n.products).length>0&&(industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"
Products:
"})),industryWarehouseProducts=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseProducts)),this.updateUI(e)}else console.log("ERROR: Warehouse.createUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.updateUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry,a="Storage: "+(this.sizedUsed,this.size,Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.sizeUsed,3))+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.size,3);null!=this.breakdown&&""!=this.breakdown&&(a+=""+this.breakdown+""),industryWarehouseStorageText.innerHTML=a;var i=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);t.funds.lt(i)?industryWarehouseUpgradeSizeButton.className="a-link-button-inactive":industryWarehouseUpgradeSizeButton.className="a-link-button";var r="Current state: ";switch(n.state){case"START":r+="Preparing...";break;case"PURCHASE":r+="Purchasing materials...";break;case"PRODUCTION":r+="Producing materials and/or products...";break;case"SALE":r+="Selling materials and/or products...";break;case"EXPORT":r+="Exporting materials and/or products...";break;default:console.log("ERROR: Invalid state: "+n.state)}for(var o in industryWarehouseStateText.innerText=r,Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehouseMaterials),this.materials)this.materials.hasOwnProperty(o)&&this.materials[o]instanceof Material&&(Object.keys(n.reqMats).includes(o)||n.prodMats.includes(o)||"Hardware"===o||"Robots"===o||"AICores"===o||"RealEstate"===o)&&industryWarehouseMaterials.appendChild(this.createMaterialUI(this.materials[o],o,e));if(Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehouseProducts),n.makesProducts&&Object.keys(n.products).length>0)for(var s in n.products)n.products.hasOwnProperty(s)&&n.products[s]instanceof Product&&industryWarehouseProducts.appendChild(this.createProductUI(n.products[s],e))}else console.log("ERROR: Warehouse.updateUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.createMaterialUI=function(mat,matName,parentRefs){if(null!=parentRefs.company&&null!=parentRefs.industry){var company=parentRefs.company,industry=parentRefs.industry,purchasePopupId="cmpy-mgmt-material-purchase-popup",sellPopupid="cmpy-mgmt-material-sell-popup",div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-warehouse-material-div"}),totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="
Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="
Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.cmp,3));var innerTxt="

"+mat.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.qty,3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(totalGain,3)+"/s)Buy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.buy,3)+"/s
Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.prd,3)+"/s
Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/s
Export: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.totalExp,3)+"/s
Import: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.imp,3)+"/s"+cmpAndDmdText+"


MP: $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.bCost,2)+"Market Price: The price you would pay if you were to buy this material on the market


Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.qlt,2)+"The quality of your material. Higher quality will lead to more sales

";div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:innerTxt,id:"cmpy-mgmt-warehouse-"+matName+"-text",display:"inline-block"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var tutorial=industry.newInd&&Object.keys(industry.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,buyButtonParams={innerText:"Buy ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.buy,3)+")",display:"inline-block",class:tutorial?"a-link-button flashing-button":"a-link-button",clickListener:()=>{var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the amount of "+mat.name+" you would like to purchase per second. This material's cost changes constantly"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",value:mat.buy?mat.buy:null,placeholder:"Purchase amount",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{if(!isNaN(n.value))return mat.buy=parseFloat(n.value),isNaN(mat.buy)&&(mat.buy=0),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1;Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid amount")}});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Clear Purchase",class:"a-link-button",clickListener:()=>(mat.buy=0,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1)}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>{Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId)}});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(purchasePopupId,[t,n,e,a,i]),n.focus()}},innerTextString;if(tutorial&&(buyButtonParams.tooltip="Purchase your required materials to get production started!"),buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",buyButtonParams)),1===company.unlockUpgrades[0]){function createExportPopup(){for(var popupId="cmpy-mgmt-export-popup",exportTxt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"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."}),citySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown"}),industrySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown",changeListener:()=>{for(var e=industrySelector.options[industrySelector.selectedIndex].value,t=0;t{var industryName=industrySelector.options[industrySelector.selectedIndex].text,cityName=citySelector.options[citySelector.selectedIndex].text,amt=exportAmount.value,sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");var temp=sanitizedAmt.replace(/MAX/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid expression entered for export amount: "+e),!1}if(null!=temp&&!isNaN(temp)){var exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};return mat.exp.push(exportObj),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid amount entered for export")}}),cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1)}),currExportsText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"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."}),currExports=[],i=0;iCity: "+t.exp[e].city+"
Amount/s: "+t.exp[e].amt,clickListener:()=>{t.exp.splice(e,1),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),createExportPopup()}}))}(i,mat,currExports);Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(popupId,[exportTxt,industrySelector,citySelector,exportAmount,exportBtn,cancelBtn,currExportsText].concat(currExports))}buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Export",display:"inline-block",class:"a-link-button",clickListener:()=>{createExportPopup()}}))}if(buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),mat.sllman[0]){if(innerTextString=-1===mat.sllman[1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sllman[1],3)+")",mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(mat.sCost)){var sCost=mat.sCost.replace(/MP/g,mat.bCost);innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(eval(sCost),2)}else innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sCost,2)}else innerTextString="Sell (0.000/0.000)";return buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:innerTextString,display:"inline-block",class:"a-link-button",clickListener:()=>{var txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the maximum amount of "+mat.name+" you would like to sell per second, as well as the price at which you would like to sell at.

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

Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.

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.

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."}),br=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sllman[1]?mat.sllman[1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sCost?mat.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",margin:"6px",clickListener:()=>{var cost=inputPx.value.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");var temp=cost.replace(/MP/g,mat.bCost);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;mat.sllman[0]=!0,mat.sllman[1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric or 'MAX'"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(sellPopupid),!1}});var cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",margin:"6px",clickListener:()=>{Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(sellPopupid)}});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(sellPopupid,[txt,br,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),div}console.log("ERROR: Warehouse.createMaterialUI called without industry or company parent refs")},Warehouse.prototype.createProductUI=function(product,parentRefs){var company=parentRefs.company,industry=parentRefs.industry,city=currentCityUi,div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-warehouse-product-div"});if(!product.fin)return div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Designing "+product.name+"...
"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.prog,2)+"% complete"})),div;var cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="
Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="
Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.cmp,3));var totalGain=product.data[city][1]-product.data[city][2];div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"

"+product.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][0],3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(totalGain,3)+"/s)Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][1],3)+"/s
Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/s


Rating: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.rat,3)+"Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.qlt,3)+"
Performance: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.per,3)+"
Durability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.dur,3)+"
Reliability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.rel,3)+"
Aesthetics: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.aes,3)+"
Features: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.fea,3)+cmpAndDmdText+"


Est. Production Cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost/ProductProductionCostRatio).format("$0.000a")+"An estimate of the material cost it takes to create this Product.


Est. Market Price: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost+product.rat/product.mku).format("$0.000a")+"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.

"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var sellInnerTextString=-1===product.sllman[city][1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.sllman[city][1],3)+")";product.sCost&&(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sCost)?sellInnerTextString+=" @ "+product.sCost:sellInnerTextString+=" @ "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.sCost).format("$0.000a")),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:sellInnerTextString,class:"a-link-button",display:"inline-block",margin:"6px",clickListener:()=>{var popupId="cmpy-mgmt-sell-product-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the maximum amount of "+product.name+" you would like to sell per second, as well as the price at which you would like to sell it at.

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.

Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.

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.

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."}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",value:product.sllman[city][1]?product.sllman[city][1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",value:product.sCost?product.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Confirm",clickListener:()=>{if(inputPx.value.includes("MP")){var price=inputPx.value.replace(/\s+/g,"");price=price.replace(/[^-()\d/*+.MP]/g,"");var temp=price.replace(/MP/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell quantity field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell quantity field."),!1;product.sCost=price}else{var cost=parseFloat(inputPx.value);if(isNaN(cost))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell price field"),!1;product.sCost=cost}if(inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;product.sllman[city][0]=!0,product.sllman[city][1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?product.sllman[city][0]=!1:(product.sllman[city][0]=!0,product.sllman[city][1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1}});var cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(popupId,[txt,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var limitProductionInnerText="Limit Production";return product.prdman[city][0]&&(limitProductionInnerText+=" ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.prdman[city][1],3)+")"),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:limitProductionInnerText,display:"inline-block",clickListener:()=>{var e,t="cmpy-mgmt-limit-product-production-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Limit",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Limit production",margin:"6px",clickListener:()=>{if(""===a.value)return product.prdman[city][0]=!1,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1;var e=parseFloat(a.value);return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value entered"),!1):(e<0?product.prdman[city][0]=!1:(product.prdman[city][0]=!0,product.prdman[city][1]=e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",margin:"6px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,a,e,i])}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Discontinue",clickListener:()=>{var e="cmpy-mgmt-discontinue-product-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"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"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Discontinue",clickListener:()=>(industry.discontinueProduct(product,parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[t,n,a])}})),div},Warehouse.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Warehouse",this)},Warehouse.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Warehouse,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Warehouse=Warehouse;var 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,5e10,"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 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."]},CorporationUpgrades={0:[0,2e9,1.07,.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.07,.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,8e9,1.09,.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 20 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.08,.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)."]},companyManagementDiv,companyManagementHeaderTabs,companyManagementPanel,currentCityUi,corporationUnlockUpgrades,corporationUpgrades,industryOverviewPanel,industryOverviewText,industryEmployeePanel,industryEmployeeText,industryEmployeeHireButton,industryEmployeeAutohireButton,industryEmployeeManagementUI,industryEmployeeInfo,industryIndividualEmployeeInfo,industryOfficeUpgradeSizeButton,industryWarehousePanel,industrySmartSupplyCheckbox,industryWarehouseStorageText,industryWarehouseUpgradeSizeButton,industryWarehouseStateText,industryWarehouseMaterials,industryWarehouseProducts,headerTabs,cityTabs;function Corporation(e={}){this.name=e.name?e.name:"The Corporation",this.divisions=[],this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(15e10),this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.fundingRound=0,this.public=!1,this.numShares=TOTALSHARES,this.issuedShares=0,this.sharePrice=0,this.storedCycles=0;var t=Object.keys(CorporationUnlockUpgrades).length,n=Object.keys(CorporationUpgrades).length;this.unlockUpgrades=Array(t).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1),this.state=new CorporationState}Corporation.prototype.getState=function(){return this.state.getState()},Corporation.prototype.storeCycles=function(e=1){this.storedCycles+=e},Corporation.prototype.process=function(){var e=this;if(this.storedCycles>=CyclesPerIndustryStateCycle){var t=this.getState();if(this.storedCycles-=1*CyclesPerIndustryStateCycle,"START"===t){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.divisions.forEach(e=>{this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses)});var n=this.revenue.minus(this.expenses).times(1*SecsPerMarketCycle);isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.

(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(15e10)),this.funds=this.funds.plus(n),this.updateSharePrice()}this.divisions.forEach(function(n){n.process(1,t,e)}),this.state.nextState(),_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.currentPage===_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.Page.Corporation&&this.updateUIContent()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(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+=32e4*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode__WEBPACK_IMPORTED_MODULE_0__.a.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();switch(this.fundingRound){case 0:e=.1;break;case 1:e=.35;break;case 2:e=.25;break;case 3:e=.2;break;case 4:return}var n=t*e*4,a=Math.floor(TOTALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.d)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.c)();i.innerHTML="Accept",r.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(n),this.numShares-=a,this.displayCorporationOverviewContent(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.a)())),r.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.a)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.b)("An investment firm has offered you "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a")+" in funding in exchange for a "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(100*e).format("0.000a")+"% stake in the company ("+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(a).format("0.000a")+" shares).

Do you accept or reject this offer?")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/TOTALSHARES,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).

Furthermore, issuing more shares now will help drive up your company's stock price in the future.

You have a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a")+" of shares that you can issue."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(a.value),t=this.determineValuation()/TOTALSHARES;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.displayCorporationOverviewContent(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)}});var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)("cmpy-mgmt-go-public-popup",[n,i,a,e,r])},Corporation.prototype.updateSharePrice=function(){var e=this.determineValuation()/(TOTALSHARES-this.issuedShares);this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.unlock=function(e){for(var t=e[0],n=e[1];this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],a=e[2],i=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var r=n*Math.pow(a,this.upgrades[t]);if(this.funds.lt(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough funds to purchase this!");else{if(++this.upgrades[t],this.funds=this.funds.minus(r),this.upgradeMultipliers[t]=1+this.upgrades[t]*i,1===t)for(var o=0;o(this.selectHeaderTab(e),this.displayCorporationOverviewContent(),!1)});companyManagementHeaderTabs.appendChild(e);for(var t=0;t{if(null==document.getElementById("cmpy-mgmt-expand-industry-popup")){var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"popup-box-container",id:"cmpy-mgmt-expand-industry-popup"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"popup-box-content"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Create a new division to expand into a new industry:"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",id:"cmpy-mgmt-expand-industry-name-input",class:"text-input",display:"block",maxLength:30,pattern:"[a-zA-Z0-9-_]",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("label",{for:"cmpy-mgmt-expand-industry-name-input",innerText:"Division name: "});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"popup-box-button",innerText:"Create Division",clickListener:()=>{for(var e=i.options[i.selectedIndex].value,t=o.value,n=0;n
",i.addEventListener("change",function(){var e=i.options[i.selectedIndex].value;r.innerHTML=IndustryDescriptions[e]+"

"}),n.appendChild(a),n.appendChild(i),n.appendChild(r),n.appendChild(s),n.appendChild(o),n.appendChild(l),n.appendChild(e),t.appendChild(n),document.getElementById("entire-game-container").appendChild(t),t.style.display="block",!1}}})),headerTabs=companyManagementDiv.getElementsByClassName("cmpy-mgmt-header-tab")}else console.log("ERROR: Header tabs div has not yet been created when Corporation.updateUIHeaderTabs() is called")},Corporation.prototype.selectHeaderTab=function(e){if(null!=e){for(var t=0;t(this.selectHeaderTab(n),this.displayDivisionContent(e,_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12),!1)});companyManagementHeaderTabs.appendChild(n)},Corporation.prototype.clearUIPanel=function(){for(;companyManagementPanel.firstChild;)companyManagementPanel.removeChild(companyManagementPanel.firstChild)},Corporation.prototype.updateUIContent=function(){if(null!=headerTabs){for(var e=0;e=1&&this.selectHeaderTab(headerTabs[0]);for(var e=_Player__WEBPACK_IMPORTED_MODULE_5__.a.getHomeComputer(),t=!1,n="corporation-management-handbook.lit",a=0;a(t||e.messages.push(n),Object(_Literature__WEBPACK_IMPORTED_MODULE_3__.b)(n),!1)})),this.public){var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Sell Shares",display:"inline-block",tooltip:"Sell your shares in the company. This is the only way to profit from your business venture.",clickListener:()=>{var e="cmpy-mgmt-sell-shares-popup",t=this.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation). The current price of your company's stock is "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to sell",margin:"5px",inputListener:()=>{var e=Math.round(i.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to sell":e>this.numShares?a.innerText="You don't have this many shares to sell!":a.innerText="Sell "+e+" shares for a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e*t).format("$0.000a")}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Sell shares",display:"inline-block",clickListener:()=>{var t=Math.round(i.value);if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else{if(!(t>this.numShares)){if(this.numShares-=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var n=parseInt(this.issuedShares);isNaN(n)?this.issuedShares=0:this.issuedShares=n}return this.issuedShares+=t,_Player__WEBPACK_IMPORTED_MODULE_5__.a.gainMoney(t*this.sharePrice),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You don't have this many shares to sell")}}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[n,a,i,r,o])}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Buyback shares",display:"inline-block",tooltip:"Buy back shares you that previously issued or sold at market price.",clickListener:()=>{var e="cmpy-mgmt-buyback-shares-popup",t=this.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to buy back at market price. To purchase these shares, you must use your own money (NOT your Corporation's funds). The current price of your company's stock is "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")+". Your company currently has "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.issuedShares,3)+" outstanding stock shares"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to buyback",margin:"5px",inputListener:()=>{var e=Math.round(i.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to buyback":e>this.issuedShares?a.innerText="There are not this many shares available to buy back. There are only "+this.issuedShares+" outstanding shares.":(console.log("here"),a.innerText="Purchase "+e+" shares for a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e*t).format("$0.000a"))}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Buy shares",display:"inline-block",clickListener:()=>{var t=Math.round(i.value),n=this.sharePrice;if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else if(t>this.issuedShares)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: There are not this many oustanding shares to buy back");else if(t*n>_Player__WEBPACK_IMPORTED_MODULE_5__.a.money)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have enough money to purchase this many shares (you need "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t*n).format("$0.000a")+")");else{if(this.numShares+=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var a=parseInt(this.issuedShares);isNaN(a)?this.issuedShares=0:this.issuedShares=a}this.issuedShares-=t,_Player__WEBPACK_IMPORTED_MODULE_5__.a.loseMoney(t*n),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e)}return!1}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[n,a,i,r,o])}});companyManagementPanel.appendChild(i),companyManagementPanel.appendChild(r);var o=this.determineValuation()>=BribeThreshold,s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:o?"a-link-button":"a-link-button-inactive",innerText:"Bribe Factions",display:"inline-block",tooltip:o?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders",clickListener:()=>{for(var e="cmpy-mgmt-bribe-factions-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{margin:"3px"}),a=0;a<_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions.length;++a){var i=_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions[a];n.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:i,value:i}))}var r,o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Corporation funds",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,a=null==r.value||""==r.value?0:Math.round(parseFloat(r.value));if(isNaN(e)||isNaN(a)||e<0||a<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var i=(Number(e)+a*t)/BribeToRepRatio;o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Stock Shares",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,a=null==r.value||""==r.value?0:Math.round(r.value);if(isNaN(e)||isNaN(a)||e<0||a<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var i=(e+a*t)/BribeToRepRatio;console.log("repGain: "+i),o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Bribe",display:"inline-block",clickListener:()=>{var t=null==s.value||""==s.value?0:parseFloat(s.value),a=this.sharePrice,i=null==r.value||""==r.value?0:Math.round(parseFloat(r.value)),o=_Faction__WEBPACK_IMPORTED_MODULE_2__.b[n.options[n.selectedIndex].value];if(null==o)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You must select a faction to bribe"),!1;if(isNaN(t)||isNaN(i)||t<0||i<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value(s) entered");else if(this.funds.lt(t))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have this much money to bribe with");else{if(!(i>this.numShares)){var l=(t+i*a)/BribeToRepRatio;return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You gained "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(l,0)+" reputation with "+o.name+" by bribing them."),o.playerReputation+=l,this.funds=this.funds.minus(t),this.numShares-=i,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have this many shares to bribe with")}}}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[t,n,o,s,r,l,c])}});companyManagementPanel.appendChild(s)}else{var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.fundingRound>=4?"a-link-button-inactive":"a-link-button tooltip",innerText:"Find Investors",display:"inline-block",clickListener:()=>{this.getInvestment()}});if(this.fundingRound<4){var c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"tooltiptext",innerText:"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company"});l.appendChild(c)}var u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button tooltip",innerText:"Go Public",display:"inline-block",clickListener:()=>(this.goPublic(),!1)}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"tooltiptext",innerText:"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."});u.appendChild(d),companyManagementPanel.appendChild(l),companyManagementPanel.appendChild(u)}if(this.updateCorporationOverviewContent(),!(this.divisions.length<=0)){var h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-upgrade-container"});h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h1",{innerText:"Unlocks",margin:"6px",padding:"6px"}));var p=Object.keys(CorporationUnlockUpgrades).length,m=Object.keys(CorporationUpgrades).length;for(null!=this.unlockUpgrades&&null!=this.upgrades||(this.unlockUpgrades=Array(p).fill(0),this.upgrades=Array(m).fill(0));this.unlockUpgrades.length{t.funds.lt(n[1])?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(t.unlock(n),t.displayCorporationOverviewContent())}}))}}(a,this);h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h1",{innerText:"Upgrades",margin:"6px",padding:"6px"}));for(a=0;a{t.funds.lt(r)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(t.upgrade(n),t.displayCorporationOverviewContent())}}))}else console.log("ERROR: Could not find levelable upgrade index "+e)}(a,this);companyManagementPanel.appendChild(h)}},Corporation.prototype.updateCorporationOverviewContent=function(){var e=document.getElementById("cmpy-mgmt-overview-text");if(null!=e){var t=this.funds,n=(new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.revenue.minus(this.expenses).toNumber()),a=n>=0?numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"):"-"+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1*n).format("$0.000a"),i="Total Funds: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t.toNumber()).format("$0.000a")+"
Total Revenue: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.revenue.toNumber()).format("$0.000a")+" / s
Total Expenses: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.expenses.toNumber()).format("$0.000a")+"/ s
Total Profits: "+a+" / s
Publicly Traded: "+(this.public?"Yes":"No")+"
Owned Stock Shares: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a")+"
Stock Price: "+(this.public?"$"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.sharePrice,2):"N/A")+"

",r=this.getProductionMultiplier(),o=this.getStorageMultiplier(),s=this.getAdvertisingMultiplier(),l=this.getEmployeeCreMultiplier(),c=this.getEmployeeChaMultiplier(),u=this.getEmployeeIntMultiplier(),d=this.getEmployeeEffMultiplier(),h=this.getSalesMultiplier(),p=this.getScientificResearchMultiplier();r>1&&(i+="Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"
"),o>1&&(i+="Storage Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(o,3)+"
"),s>1&&(i+="Advertising Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(s,3)+"
"),l>1&&(i+="Empl. Creativity Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(l,3)+"
"),c>1&&(i+="Empl. Charisma Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(c,3)+"
"),u>1&&(i+="Empl. Intelligence Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(u,3)+"
"),d>1&&(i+="Empl. Efficiency Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(d,3)+"
"),h>1&&(i+="Sales Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(h,3)+"
"),p>1&&(i+="Scientific Research Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(p,3)+"
"),e.innerHTML=i}else console.log("WARNING: Could not find overview text elemtn in updateCorporationOverviewContent()")},Corporation.prototype.displayDivisionContent=function(e,t){for(var n in this.clearUIPanel(),currentCityUi=t,e.offices)e.offices[n]instanceof OfficeSpace&&this.createCityUITab(n,e);(cityTabs=companyManagementPanel.getElementsByClassName("cmpy-mgmt-city-tab")).length>0&&this.selectCityTab(document.getElementById("cmpy-mgmt-city-"+t+"-tab"),t),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{class:"cmpy-mgmt-city-tab",innerText:"Expand into new City",display:"inline-block",clickListener:()=>{var t="cmpy-mgmt-expand-city-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Would you like to expand into a new city by opening an office? This would cost "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(OfficeInitialCost).format("$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown",margin:"5px"});for(var i in e.offices)e.offices.hasOwnProperty(i)&&(e.offices[i]instanceof OfficeSpace||a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:i,value:i})));var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",display:"inline-block",margin:"3px",clickListener:()=>{var n=a.options[a.selectedIndex].value;return this.funds.lt(OfficeInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to open a new office!"):(this.funds=this.funds.minus(OfficeInitialCost),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Opened a new office in "+n+"!"),e.offices[n]=new OfficeSpace({loc:n,size:OfficeInitialSize}),this.displayDivisionContent(e,n)),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",display:"inline-block",margin:"3px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,a,r,o]),!1}})),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var a=e.offices[currentCityUi];if(a instanceof OfficeSpace){var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-industry-left-panel"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-industry-right-panel"});companyManagementPanel.appendChild(i),companyManagementPanel.appendChild(r),industryOverviewPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-industry-overview-panel",class:"cmpy-mgmt-industry-overview-panel"}),i.appendChild(industryOverviewPanel),industryEmployeePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-employee-panel",class:"cmpy-mgmt-employee-panel"}),i.appendChild(industryEmployeePanel),industryWarehousePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-warehouse-panel",class:"cmpy-mgmt-warehouse-panel"}),r.appendChild(industryWarehousePanel),industryOverviewText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),industryOverviewPanel.appendChild(industryOverviewText),industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));for(var o=Object.keys(IndustryUpgrades).length;e.upgrades.length{n.funds.lt(c)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(n.funds=n.funds.minus(c),a.upgrade(r,{corporation:n,office:i}),n.displayDivisionContent(a,t))}})),s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}))}else console.log("ERROR: Could not find levelable upgrade index: "+e)}(l,this,e,a);if(industryOverviewPanel.appendChild(s),e.makesProducts){var c,u;switch(e.type){case Industries.Food:c="Build Restaurant",u="Build and manage a new restaurant!";break;case Industries.Tobacco:c="Create Product",u="Create a new tobacco product!";break;case Industries.Pharmaceutical:c="Create Drug",u="Design and develop a new pharmaceutical drug!";break;case Industries.Computer:case"Computer":c="Create Product",u="Design and manufacture a new computer hardware product!";break;case Industries.Robotics:c="Design Robot",u="Design and create a new robot or robotic system!";break;case Industries.Software:c="Develop Software",u="Develop a new piece of software!";break;case Industries.Healthcare:c="Build Hospital",u="Build and manage a new hospital!";break;case Industries.RealEstate:c="Develop Property",u="Develop a new piece of real estate property!";break;default:return c="Create Product",""}u+="

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.

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.",industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:c,margin:"6px",display:"inline-block",clickListener:()=>{var n="cmpy-mgmt-create-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:u}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{});for(var r in e.offices)e.offices[r]instanceof OfficeSpace&&i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{value:r,text:r}));var o="Product Name";e.type===Industries.Food?o="Restaurant Name":e.type===Industries.Healthcare?o="Hospital Name":e.type===Industries.RealEstate&&(o="Property Name");var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{placeholder:o}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Design investment"}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Marketing investment"}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Develop Product",clickListener:()=>{null==c.value&&(c.value=0),null==d.value&&(d.value=0);var a=parseFloat(c.value),r=parseFloat(d.value);if(null==s.value||""===s.value)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You must specify a name for your product!");else if(isNaN(a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for design investment");else if(isNaN(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for marketing investment");else if(this.funds.lt(a+r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to make this large of an investment");else{var o=new Product({name:s.value.replace(/[<>]/g,""),createCity:i.options[i.selectedIndex].value,designCost:a,advCost:r});this.funds=this.funds.minus(a+r),e.products[o.name]=o,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n)}return this.displayDivisionContent(e,t),!1}}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(n,[a,i,s,l,c,d,h,p])}}))}if(industryEmployeeText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{id:"cmpy-mgmt-employee-p",display:"block",innerHTML:"

Office Space


Type: "+a.tier+"
Comfort: "+a.comf+"
Beauty: "+a.beau+"
Size: "+a.employees.length+" / "+a.size+" employees"}),industryEmployeePanel.appendChild(industryEmployeeText),industryEmployeeHireButton=0===a.employees.length?Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",tooltip:"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position",clickListener:()=>(a.findEmployees({corporation:this,division:e}),!1)}):Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",clickListener:()=>(a.findEmployees({corporation:this,division:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeHireButton),industryEmployeeAutohireButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Autohire Employee",fontSize:"13px",tooltip:"Automatically hires an employee and gives him/her a random name",clickListener:()=>(a.hireRandomEmployee({corporation:this,division:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeAutohireButton),industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryOfficeUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Upgrade size",display:"inline-block",margin:"6px",fontSize:"13px",tooltip:"Upgrade the office's size so that it can hold more employees!",clickListener:()=>{for(var e="cmpy-mgmt-upgrade-office-size-popup",t=Math.round(a.size/OfficeInitialSize),n=OfficeInitialCost*Math.pow(1.07,t),i=0,r=0;r<5;++r)i+=Math.pow(1.07,t+r);var o=OfficeInitialCost*i,s=this.funds.dividedBy(OfficeInitialCost).toNumber(),l=1;for(i=Math.pow(1.07,t);l<50&&!(i>=s);){var c=Math.pow(1.07,t+l);if(i+c>s)break;i+=c,++l}var u=OfficeInitialCost*i,d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Increase the size of your office space to fit additional employees!"}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Upgrade size: "}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(n)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 3",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"),clickListener:()=>(this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=OfficeInitialSize,this.funds=this.funds.minus(n),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(o)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 15",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(o).format("$0.000a"),clickListener:()=>(this.funds.lt(o)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=5*OfficeInitialSize,this.funds=this.funds.minus(o),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(u)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by MAX ("+l*OfficeInitialSize+")",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(u).format("$0.000a"),clickListener:()=>(this.funds.lt(u)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=OfficeInitialSize*l,this.funds=this.funds.minus(u),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),y=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",margin:"4px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[d,h,p,m,g,y]),!1}}),industryEmployeePanel.appendChild(industryOfficeUpgradeSizeButton),industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",fontSize:"13px",tooltip:"Throw an office party to increase your employee's morale and happiness",clickListener:()=>{var e,t="cmpy-mgmt-throw-office-party-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Throwing this party will cost a total of $0"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",margin:"5px",placeholder:"$ / employee",inputListener:()=>{if(isNaN(r.value)||r.value<0)i.innerText="Invalid value entered!";else{var e=r.value*a.employees.length;i.innerText="Throwing this party will cost a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e).format("$0.000a")}},onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",clickListener:()=>{if(isNaN(r.value)||r.value<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value entered");else{var e=r.value*a.employees.length;if(this.funds.lt(e))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to throw this party!");else{var n;this.funds=this.funds.minus(e);for(var i=0;i(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,i,r,e,o])}})),industryEmployeeManagementUI=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{}),industryEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{margin:"4px",padding:"4px"}),empManualAssignmentModeActive){industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",margin:"4px",innerText:"Switch to Auto Mode",tooltip:"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",clickListener:()=>{empManualAssignmentModeActive=!1,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryIndividualEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{margin:"4px",padding:"4px"});var d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{color:"white",backgroundColor:"black",margin:"4px",padding:"4px",changeListener:()=>{for(var e=d.options[d.selectedIndex].text,t=0;t{empManualAssignmentModeActive=!0,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var h=0,p=0,m=0,g=0,y=0,f=0,b=0;for(l=0;l0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"+",clickListener:()=>{a.assignEmployeeToJob(v[i]),n.displayDivisionContent(e,t)}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:k[i]>0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"-",clickListener:()=>{a.unassignEmployeeFromJob(v[i]),n.displayDivisionContent(e,t)}}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{});industryEmployeeManagementUI.appendChild(r),industryEmployeeManagementUI.appendChild(o),industryEmployeeManagementUI.appendChild(s),industryEmployeeManagementUI.appendChild(l)}(this,l)}industryEmployeePanel.appendChild(industryEmployeeManagementUI);var E=e.warehouses[currentCityUi];E instanceof Warehouse?E.createUI({industry:e,company:this}):industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Purchase Warehouse ($5b)",class:"a-link-button",clickListener:()=>(this.funds.lt(WarehouseInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You do not have enough funds to do this!"):(e.warehouses[currentCityUi]=new Warehouse({loc:currentCityUi,size:WarehouseInitialSize}),this.funds=this.funds.minus(WarehouseInitialCost),this.displayDivisionContent(e,currentCityUi)),!1)})),this.updateDivisionContent(e)}else console.log("ERROR: Current city for UI does not have an office space")},Corporation.prototype.updateDivisionContent=function(e){if(e instanceof Industry){var t=1===this.unlockUpgrades[4],n=e.lastCycleRevenue.minus(e.lastCycleExpenses).toNumber(),a=n>=0?numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"):"-"+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1*n).format("$0.000a"),i="";if(t){var r=e.getAdvertisingFactors(),o=r[1],s=r[2],l=r[3],c=r[0];i="

Advertising Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(c,3)+"Total multiplier for this industry's sales due to its awareness and popularity
Awareness Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(o,.85),3)+"
Popularity Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(s,.85),3)+"
Ratio Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(l,.85),3)+"


"}Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryOverviewText),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Industry: "+e.type+" (Corp Funds: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.funds.toNumber()).format("$0.000a")+")

Awareness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.awareness,3)+"
Popularity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.popularity,3)+"
"+i+"
Revenue: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e.lastCycleRevenue.toNumber()).format("$0.000a")+" / s
Expenses: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e.lastCycleExpenses.toNumber()).format("$0.000a")+" /s
Profit: "+a+" / s

"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{marginTop:"2px",innerText:"Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.prodMult,2),tooltip:"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.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.

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.")}})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br")),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{display:"inline-block",innerText:"Scientific Research: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.sciResearch.qty,3),tooltip:"Scientific Research increases the quality of the materials and products that you produce."}));var u=e.offices[currentCityUi];industryEmployeeText.innerHTML="

Office Space


Type: "+u.tier+"
Comfort: "+u.comf+"
Beauty: "+u.beau+"
Size: "+u.employees.length+" / "+u.size+" employees",u.employees.length>=u.size?(industryEmployeeHireButton.className="a-link-button-inactive",industryEmployeeAutohireButton.className="a-link-button-inactive tooltip"):0===u.employees.length?(industryEmployeeHireButton.className="a-link-button tooltip flashing-button",industryEmployeeAutohireButton.className="a-link-button tooltip"):(industryEmployeeHireButton.className="a-link-button",industryEmployeeAutohireButton.className="a-link-button tooltip");for(var d=0,h=0,p=0,m=0,g=0,y=0,f=0;f0&&(m=d/u.employees.length,g=h/u.employees.length,y=p/u.employees.length),industryEmployeeInfo.innerHTML="Avg Employee Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(m,3)+"
Avg Employee Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(g,3)+"
Avg Employee Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(y,3),t&&(industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Material Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getOfficeProductivity(u),3),tooltip:"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"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Product Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getOfficeProductivity(u,{forProduct:!0}),3),tooltip:"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"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Business Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getBusinessFactor(u),3),tooltip:"The effect this office's 'Business' employees has on boosting sales"})));var b=e.warehouses[currentCityUi];b instanceof Warehouse&&b.updateUI({industry:e,company:this})}else console.log("ERROR: Invalid 'division' argument in Corporation.updateDivisionContent")},Corporation.prototype.createCityUITab=function(e,t){var n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{id:"cmpy-mgmt-city-"+e+"-tab",class:"cmpy-mgmt-city-tab",innerText:e,clickListener:()=>(this.selectCityTab(n,e),this.displayDivisionContent(t,e),!1)});companyManagementPanel.appendChild(n)},Corporation.prototype.selectCityTab=function(e,t){if(null!=e||null!=(e=document.getElementById("cmpy-mgmt-city-"+t+"-tab"))){for(var n=0;n
Level 1: 16%
Level 2: 24%
Level 3: 28%"),o.SourceFile2=new r(2,"This Source-File increases the player's crime success rate, crime money, and charisma multipliers by:

Level 1: 20%
Level 2: 30%
Level 3: 35%"),o.SourceFile3=new r(3,"This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:
Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile4=new r(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."),o.SourceFile5=new r(5,"This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will raise all of your hacking-related multipliers by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile6=new r(6,"This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile7=new r(7,"This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:

Level 1: 8%
Level 2: 12%
Level 3: 14%"),o.SourceFile8=new r(8,"This Source-File grants the following benefits:

Level 1: Permanent access to WSE and TIX API
Level 2: Ability to short stocks in other BitNodes
Level 3: Ability to use limit/stop orders in other BitNodes

This Source-File also increases your hacking growth multipliers by:
Level 1: 12%
Level 2: 18%
Level 3: 21%"),o.SourceFile9=new r(9),o.SourceFile10=new r(10),o.SourceFile11=new r(11,"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:

Level 1: 24%
Level 2: 36%
Level 3: 42%
"),o.SourceFile12=new r(12,"This Source-File increases all your multipliers by 1% per level. This effect is multiplicative with itself. In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)")}function l(e,t){this.n=e,this.lvl=t}function c(e){var t="SourceFile"+e.n,n=o[t];if(null!=n){switch(e.n){case 1:for(var i=0,r=0;r=i.a.HacknetNodeMaxLevel)return!1;if(this.level+e>i.a.HacknetNodeMaxLevel){var n=Math.max(0,i.a.HacknetNodeMaxLevel-this.level);return this.purchaseLevelUpgrade(n)}return!s.a.money.lt(t)&&(s.a.loseMoney(t),this.level=Math.round(this.level+e),this.updateMoneyGainRate(),!0)},g.prototype.calculateRamUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;let t=0,n=Math.round(Math.log2(this.ram)),a=this.ram;for(let r=0;r=i.a.HacknetNodeMaxRam)return!1;if(this.ram*Math.pow(2,e)>i.a.HacknetNodeMaxRam){var n=Math.max(0,Math.log2(Math.round(i.a.HacknetNodeMaxRam/this.ram)));return this.purchaseRamUpgrade(n)}if(s.a.money.lt(t))return!1;s.a.loseMoney(t);for(let t=0;t=i.a.HacknetNodeMaxCores)return!1;if(this.cores+e>i.a.HacknetNodeMaxCores){var n=Math.max(0,i.a.HacknetNodeMaxCores-this.cores);return this.purchaseCoreUpgrade(n)}return!s.a.money.lt(t)&&(s.a.loseMoney(t),this.cores=Math.round(this.cores+e),this.updateMoneyGainRate(),!0)},g.prototype.toJSON=function(){return Object(u.Generic_toJSON)("HacknetNode",this)},g.fromJSON=function(e){return Object(u.Generic_fromJSON)(g,e.data)},u.Reviver.constructors.HacknetNode=g;var v=1;function _(){var e=document.getElementById("hacknet-nodes-1x-multiplier"),t=document.getElementById("hacknet-nodes-5x-multiplier"),n=document.getElementById("hacknet-nodes-10x-multiplier"),a=document.getElementById("hacknet-nodes-max-multiplier");e.setAttribute("class","a-link-button"),t.setAttribute("class","a-link-button"),n.setAttribute("class","a-link-button"),a.setAttribute("class","a-link-button"),0==s.a.hacknetNodes.length?(e.setAttribute("class","a-link-button-inactive"),t.setAttribute("class","a-link-button-inactive"),n.setAttribute("class","a-link-button-inactive"),a.setAttribute("class","a-link-button-inactive")):1==v?e.setAttribute("class","a-link-button-inactive"):5==v?t.setAttribute("class","a-link-button-inactive"):10==v?n.setAttribute("class","a-link-button-inactive"):a.setAttribute("class","a-link-button-inactive")}function k(e){if(s.a.money.lt(e.calculateLevelUpgradeCost(1)))return 0;var t=1,n=i.a.HacknetNodeMaxLevel-1,a=i.a.HacknetNodeMaxLevel-e.level;if(s.a.money.gt(e.calculateLevelUpgradeCost(a)))return a;for(;t<=n;){var r=(t+n)/2|0;if(r!=i.a.HacknetNodeMaxLevel&&s.a.money.gt(e.calculateLevelUpgradeCost(r))&&s.a.money.lt(e.calculateLevelUpgradeCost(r+1)))return Math.min(a,r);if(s.a.money.lt(e.calculateLevelUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateLevelUpgradeCost(r)))return Math.min(a,r);t=r+1}}return 0}function E(e){if(s.a.money.lt(e.calculateRamUpgradeCost(1)))return 0;const t=Math.round(Math.log2(i.a.HacknetNodeMaxRam/e.ram));if(s.a.money.gt(e.calculateRamUpgradeCost(t)))return t;for(let n=t-1;n>=0;--n)if(s.a.money.gt(e.calculateRamUpgradeCost(n)))return n;return 0}function O(e){if(s.a.money.lt(e.calculateCoreUpgradeCost(1)))return 0;var t=1,n=i.a.HacknetNodeMaxCores-1;const a=i.a.HacknetNodeMaxCores-e.cores;if(s.a.money.gt(e.calculateCoreUpgradeCost(a)))return a;for(;t<=n;){let r=(t+n)/2|0;if(r!=i.a.HacknetNodeMaxCores&&s.a.money.gt(e.calculateCoreUpgradeCost(r))&&s.a.money.lt(e.calculateCoreUpgradeCost(r+1)))return Math.min(a,r);if(s.a.money.lt(e.calculateCoreUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateCoreUpgradeCost(r)))return Math.min(a,r);t=r+1}}return 0}function C(){Object(c.clearEventListeners)("hacknet-nodes-purchase-button").addEventListener("click",function(){return y(),!1}),_();for(var e=document.getElementById("hacknet-nodes-list");e.firstChild;)e.removeChild(e.firstChild);for(var t=0;tLevel:

'}),a=Object(d.createElement)("div",{class:"hacknet-node-ram-container row",innerHTML:'

RAM:

'}),i=Object(d.createElement)("div",{class:"hacknet-node-cores-container row",innerHTML:'

Cores:

'}),r=Object(d.createElement)("div",{class:"hacknet-node-container",innerHTML:'

Node name:

Production:

'});r.appendChild(n),r.appendChild(a),r.appendChild(i);var o=Object(d.createElement)("li",{class:"hacknet-node"});o.appendChild(r),n.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-level-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=k(e)),e.purchaseLevelUpgrade(t),w(),!1}})),a.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-ram-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=E(e)),e.purchaseRamUpgrade(t),w(),!1}})),i.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-core-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=O(e)),e.purchaseCoreUpgrade(t),w(),!1}})),document.getElementById("hacknet-nodes-list").appendChild(o),T(e)}function T(e){var t=e.name;m("hacknet-node-name-"+t,t),m("hacknet-node-total-production-"+t,"$"+Object(h.formatNumber)(e.totalMoneyGenerated,2)),m("hacknet-node-production-rate-"+t,"($"+Object(h.formatNumber)(e.moneyGainRatePerSecond,2)+" / second)"),m("hacknet-node-level-"+t,e.level),m("hacknet-node-ram-"+t,e.ram+"GB"),m("hacknet-node-cores-"+t,e.cores);var n=Object(p.getElementById)("hacknet-node-upgrade-level-"+t);if(e.level>=i.a.HacknetNodeMaxLevel)m("hacknet-node-upgrade-level-"+t,"MAX LEVEL"),n.setAttribute("class","a-link-button-inactive");else{let o=0;if(0==v)o=k(e);else{var a=i.a.HacknetNodeMaxLevel-e.level;o=Math.min(a,v)}var r=e.calculateLevelUpgradeCost(o);m("hacknet-node-upgrade-level-"+t,"Upgrade x"+o+" - $"+Object(h.formatNumber)(r,2)),s.a.money.lt(r)?n.setAttribute("class","a-link-button-inactive"):n.setAttribute("class","a-link-button")}var o=Object(p.getElementById)("hacknet-node-upgrade-ram-"+t);if(e.ram>=i.a.HacknetNodeMaxRam)m("hacknet-node-upgrade-ram-"+t,"MAX RAM"),o.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==v)n=E(e);else{a=Math.round(Math.log2(i.a.HacknetNodeMaxRam/e.ram));n=Math.min(a,v)}var l=e.calculateRamUpgradeCost(n);m("hacknet-node-upgrade-ram-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(l,2)),s.a.money.lt(l)?o.setAttribute("class","a-link-button-inactive"):o.setAttribute("class","a-link-button")}var c=Object(p.getElementById)("hacknet-node-upgrade-core-"+t);if(e.cores>=i.a.HacknetNodeMaxCores)m("hacknet-node-upgrade-core-"+t,"MAX CORES"),c.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==v)n=O(e);else{a=i.a.HacknetNodeMaxCores-e.cores;n=Math.min(a,v)}var u=e.calculateCoreUpgradeCost(n);m("hacknet-node-upgrade-core-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(u,2)),s.a.money.lt(u)?c.setAttribute("class","a-link-button-inactive"):c.setAttribute("class","a-link-button")}}function R(e){for(var t=0,n=0;n{const t=`${e.hostname}${" ".repeat(18)}`.slice(0,Math.max(e.hostname.length,18)),n={progress:e.ramUsed/e.maxRam,totalTicks:30};return`${t} ${Object(d.createProgressBarText)(n)}`.replace(/\s/g," ")},C=e=>{const t=k[e.hostname];if(null===t||void 0===t)return;const n=""+Object(_.roundToTwo)(e.ramUsed/e.maxRam);t.header.dataset.ramPercentage!==n&&(t.header.dataset.ramPercentage=n,t.header.innerHTML=O(e))};function w(e){var t=Object(o.e)(e.serverIp);if(null==t)return void console.log("ERROR: Invalid server IP for workerscript in addActiveScriptsItem()");let n=t.hostname;E.push(function(e,n){null==k[n]&&function(e){let t=e.hostname;var n=document.getElementById("active-scripts-list");let a=Object(l.createAccordionElement)({hdrText:O(e)}),i=a[0];var r=a[1];let o=a[2];if(null==k[t]){var s=Object(u.createElement)("ul");return o.appendChild(s),n.appendChild(i),k[t]={header:r,panel:o,panelList:s,scripts:{},scriptHdrs:{},scriptStats:{}},i}console.log("WARNING: Tried to create already-existing Active Scripts Server panel. This is most likely fine. It probably means many scripts just got started up on a new server. Aborting")}(t);for(var a=["active","scripts",n,e.name],r=0;rArgs: "+Object(c.arrayToString)(e.args)}));var y=Object(u.createElement)("p",{innerText:"Loading...",fontSize:"14px"});g.appendChild(y),g.appendChild(Object(u.createElement)("br")),g.appendChild(Object(u.createElement)("span",{innerText:"Log",class:"active-scripts-button",margin:"4px",padding:"4px",clickListener:()=>(Object(m.a)(e.scriptRef),!1)})),g.appendChild(Object(u.createElement)("span",{innerText:"Kill Script",class:"active-scripts-button",margin:"4px",padding:"4px",clickListener:()=>(Object(i.d)(e.scriptRef,e.scriptRef.scriptRef.server),Object(s.dialogBoxCreate)("Killing script, may take a few minutes to complete..."),!1)})),k[n].panelList.appendChild(h),k[n].scripts[o]=h,k[n].scriptHdrs[o]=p,k[n].scriptStats[o]=y}.bind(null,e,n))}function S(e){E.push(function(e){var t=Object(o.e)(e.serverIp);if(null==t)throw new Error("ERROR: Invalid server IP for workerscript. This most likely occurred because you tried to delete a large number of scripts and also deleted servers at the same time. It's not a big deal, just save and refresh the game.");let n=t.hostname;if(null==k[n])return void console.log("ERROR: Trying to delete Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: "+n);for(var a=["active","scripts",t.hostname,e.name],i=0;i0?console.log("WARNING: Tried to delete Active Scripts Server panel that still has scripts. Aborting"):(Object(v.removeElement)(k[t].panel),Object(v.removeElement)(k[t].header),delete k[t]):console.log("WARNING: Tried to delete non-existent Active Scripts Server panel. Aborting")}(t)}.bind(null,e))}function T(e=150){let t=Math.min(e,E.length);for(let e=0;e"+l+"
"+c+"
"+d+"
"+h+"
"+p+"
"+g+"
"+v+"
",r}(e,k[n].scriptStats[r],r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(8),i=n(10);class r{static fromJSON(e){return i.Generic_fromJSON(r,e.data)}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(),setTimeout(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){a.dialogBoxCreate(`${this.fn}

${this.text}`,!0)}toJSON(){return i.Generic_toJSON("TextFile",this)}write(e){this.text=e}}function o(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=r,i.Reviver.constructors.TextFile=r,t.getTextFile=o,t.createTextFile=function(e,t,n){if(null!==o(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const a=new r(e,t);return n.textFiles.push(a),a}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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";n.d(t,"a",function(){return i});var a=n(22);function i(){this.data=[]}i.prototype.write=function(e){return this.data.push(e),this.data.length>a.a.MaxPortCapacity?this.data.shift():null},i.prototype.tryWrite=function(e){return!(this.data.length>=a.a.MaxPortCapacity)&&(this.data.push(e),!0)},i.prototype.read=function(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()},i.prototype.peek=function(){return 0===this.data.length?"NULL PORT DATA":this.data.slice()[0]},i.prototype.full=function(){return this.data.length==a.a.MaxPortCapacity},i.prototype.empty=function(){return 0===this.data.length},i.prototype.clear=function(){this.data.length=0}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return T}),n.d(t,"a",function(){return x});var a=n(35),i=n(11),r=n(1),o=n(6),s=n(12),l=n(38),c=n(41),u=n(50),d=n(33),h=n(0),p=n(30),m=n(9),g=n(22),y=n(19),f=n(24),b=n(8),v=n(65),_=n(13),k=n(10),E=n(3),O=n(36),C=n(2),w=n(20),S=n(26);let T=new R;function R(){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=""}function x(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,k.Reviver);if(Object(h.b)(t.PlayerSave),Object(m.g)(t.AllServersSave),Object(i.i)(t.CompaniesSave),Object(s.i)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(a.c)(t.AliasesSave)}catch(e){Object(a.c)("")}else Object(a.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(a.d)(t.GlobalAliasesSave)}catch(e){Object(a.d)("")}else Object(a.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(d.e)(t.MessagesSave)}catch(e){Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.j)(t.StockMarketSave)}catch(e){Object(f.j)("")}else Object(f.j)("");if(t.hasOwnProperty("SettingsSave"))try{Object(g.c)(t.SettingsSave)}catch(e){console.log("ERROR: Failed to parse Settings. Re-initing default values"),Object(g.b)()}else Object(g.b)();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,k.Reviver);null!=h.a.bitNodeN&&0!==h.a.bitNodeN||h.a.setBitNodeNumber(1),(n.startsWith("0.27.")||n.startsWith("0.28."))&&(console.log("Evaluating changes needed for version compatibility"),h.a.augmentations.length>0||h.a.queuedAugmentations.length>0||h.a.sourceFiles.length>0?(h.a.firstFacInvRecvd=!0,h.a.firstAugPurchased=!0,h.a.firstJobRecvd=!0,h.a.firstTimeTraveled=!0,h.a.firstProgramAvailable=!0):((h.a.factions.length>0||h.a.factionInvitations.length>0)&&(h.a.firstFacInvRecvd=!0),""===h.a.companyName&&""===h.a.companyPosition||(h.a.firstJobRecvd=!0),h.a.hacking_skill>=25&&(h.a.firstScriptAvailable=!0))),window.location.href.toLowerCase().includes("bitburner-beta")?Object(b.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.
Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).

"+r.a.LatestUpdate):n!=r.a.Version&&I()}catch(e){I()}else I();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(c.e)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function I(){Object(b.dialogBoxCreate)("New update!
Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).

"+r.a.LatestUpdate)}function P(t){var n=t.target.files[0];if(n){var _=new FileReader;_.onload=function(t){var n=t.target.result;!function(t,n){var _=null,T=null;try{var x=decodeURIComponent(escape(atob(n)));if(_=new R,_=JSON.parse(x,k.Reviver),(T=JSON.parse(_.PlayerSave,k.Reviver)).money=new S.a(T.money),T.total_money=new S.a(T.total_money),T.lifetime_money=new S.a(T.lifetime_money),JSON.parse(_.AllServersSave,k.Reviver),JSON.parse(_.CompaniesSave,k.Reviver),JSON.parse(_.FactionsSave,k.Reviver),JSON.parse(_.SpecialServerIpsSave,k.Reviver),_.hasOwnProperty("AliasesSave"))try{JSON.parse(_.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Aliases save failed: "+e)}if(_.hasOwnProperty("GlobalAliases"))try{JSON.parse(_.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Global Aliases save failed: "+e)}if(_.hasOwnProperty("MessagesSave"))try{JSON.parse(_.MessagesSave,k.Reviver)}catch(e){console.log("Parsing Messages save failed: "+e),Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{JSON.parse(_.StockMarketSave,k.Reviver)}catch(e){console.log("Parsing StockMarket save failed: "+e)}if(_.hasOwnProperty("VersionSave"))try{((P=JSON.parse(_.VersionSave,k.Reviver)).startsWith("0.27.")||P.startsWith("0.28."))&&(null!=T.bitNodeN&&0!=T.bitNodeN||(T.bitNodeN=1),null==T.sourceFiles&&(T.sourceFiles=[])),r.a.Version}catch(e){console.log("Parsing Version save failed: "+e)}if(2==T.bitNodeN&&T.inGang()&&_.hasOwnProperty("AllGangsSave"))try{Object(c.e)(_.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}}catch(e){return Object(b.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(n=decodeURIComponent(escape(atob(n))),t=JSON.parse(n,k.Reviver),Object(h.b)(t.PlayerSave),Object(m.g)(t.AllServersSave),Object(i.i)(t.CompaniesSave),Object(s.i)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(a.c)(t.AliasesSave)}catch(e){Object(a.c)("")}else Object(a.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(a.d)(t.GlobalAliasesSave)}catch(e){Object(a.d)("")}else Object(a.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(d.e)(t.MessagesSave)}catch(e){Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.j)(t.StockMarketSave)}catch(e){Object(f.j)("")}else Object(f.j)("");if(t.hasOwnProperty("SettingsSave"))try{Object(g.c)(t.SettingsSave)}catch(e){Object(g.b)()}else Object(g.b)();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to load .fconf settings when importing")}if(t.hasOwnProperty("VersionSave"))try{var P=JSON.parse(t.VersionSave,k.Reviver);null!=h.a.bitNodeN&&0!=h.a.bitNodeN||h.a.setBitNodeNumber(1),(P.startsWith("0.27.")||P.startsWith("0.28."))&&(console.log("Evaluating changes needed for version compatibility"),h.a.augmentations.length>0||h.a.queuedAugmentations.length>0||h.a.sourceFiles.length>0?(h.a.firstFacInvRecvd=!0,h.a.firstAugPurchased=!0,h.a.firstJobRecvd=!0,h.a.firstTimeTraveled=!0,h.a.firstProgramAvailable=!0):((h.a.factions.length>0||h.a.factionInvitations.length>0)&&(h.a.firstFacInvRecvd=!0),""===h.a.companyName&&""===h.a.companyPosition||(h.a.firstJobRecvd=!0),h.a.hacking_skill>=25&&(h.a.firstScriptAvailable=!0))),P!=r.a.Version&&I()}catch(e){I()}else I();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(c.e)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}var N="import-game-restart-game-notice",A=Object(E.createElement)("p",{innerText:"Imported game! I would suggest saving the game and then reloading the page to make sure everything runs smoothly"}),M=Object(E.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(w.removeElementById)(N)}});Object(O.createPopup)(N,[A,M]),Object(v.a)(),console.log("Importing game"),o.Engine.setDisplayElements(),o.Engine.init(),i.d.init(),o.Engine._lastUpdate=(new Date).getTime();var L=h.a.lastUpdate,B=Math.floor((o.Engine._lastUpdate-L)/o.Engine._idleSpeed),j=Object(p.f)();h.a.isWorking&&(console.log("work() called in load() for "+B*o.Engine._idleSpeed+" milliseconds"),h.a.workType==r.a.WorkTypeFaction?h.a.workForFaction(B):h.a.workType==r.a.WorkTypeCreateProgram?h.a.createProgramWork(B):h.a.workType==r.a.WorkTypeStudyClass?h.a.takeClass(B):h.a.workType==r.a.WorkTypeCrime?h.a.commitCrime(B):h.a.workType==r.a.WorkTypeCompanyPartTime?h.a.workPartTime(B):h.a.work(B));var D=Object(u.d)(B);Object(s.j)(B);var F=B*o.Engine._idleSpeed;null==h.a.totalPlaytime&&(h.a.totalPlaytime=0),null==h.a.playtimeSinceLastAug&&(h.a.playtimeSinceLastAug=0),null==h.a.playtimeSinceLastBitnode&&(h.a.playtimeSinceLastBitnode=0),h.a.totalPlaytime+=F,h.a.playtimeSinceLastAug+=F,h.a.playtimeSinceLastBitnode+=F,h.a.reapplyAllAugmentations(),e("#terminal tr:not(:last)").remove(),h.a.lastUpdate=o.Engine._lastUpdate,o.Engine.start(),Object(b.dialogBoxCreate)("While you were offline, your scripts generated $"+Object(C.formatNumber)(j,2)+" and your Hacknet Nodes generated $"+Object(C.formatNumber)(D,2))}(T,n)},_.readAsText(n)}else Object(b.dialogBoxCreate)("Invalid file selected")}R.prototype.saveGame=function(e){this.PlayerSave=JSON.stringify(h.a);var t=JSON.parse(JSON.stringify(m.b),k.Reviver);for(var n in t){var u=t[n];if(null!=u)for(var p=0;p(Object(a.d)(e,e.server),!1)),document.getElementById("log-box-kill-script").style.display="inline-block",s=!0,document.getElementById("log-box-container").style.display="block",document.getElementById("log-box-text-header").innerHTML=l.filename+" "+Object(r.arrayToString)(l.args)+":

",l.logUpd=!0,u()}function u(){var e=document.getElementById("log-box-text");if(l&&s&&e&&l.logUpd){e.innerHTML="";for(var t=0;t";l.logUpd=!1}}}).call(this,n(53))},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return h});var a=n(21),i=n(0),r=n(19),o=n(25),s=n(66),l=n(2);function c(){if(r.a.hasOwnProperty("Darkweb Server")){var e=r.a["Darkweb Server"];if(!Object(s.isValidIPAddress)(e))return;e==i.a.getCurrentServer().ip&&Object(o.c)("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")}}function u(e){if(0!=e.length)switch(e[0]){case"buy":if(2!=e.length)return Object(o.c)("Incorrect number of arguments. Usage: "),Object(o.c)("buy -l"),void Object(o.c)("buy [item name]");var t=e[1];"-l"==t?function(){for(const e in h){const t=h[e];Object(o.c)(t.toString())}}():function(e){e=e.toLowerCase();let t=null;for(const n in h){const a=h[n];a.program.toLowerCase()==e&&(t=a)}if(null===t)return void Object(o.c)("Unrecognized item: "+e);if(i.a.hasProgram(t.program))return void Object(o.c)("You already have the "+t.program+" program");if(i.a.money.lt(t.price))return void Object(o.c)("Not enough money to purchase "+t.program);i.a.loseMoney(t.price),i.a.getHomeComputer().programs.push(t.program),Object(o.c)("You have purchased the "+t.program+" program. The new program can be found on your home computer.")}(t);break;default:Object(o.c)("Command not found")}}function d(e,t,n){this.program=e,this.price=t,this.description=n}d.prototype.toString=function(){return[this.program,"$"+Object(l.formatNumber)(this.price),this.description].join(" - ")};const h={BruteSSHProgram:new d(a.a.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new d(a.a.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new d(a.a.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new d(a.a.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new d(a.a.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new d(a.a.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new d(a.a.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new d(a.a.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.roundToTwo=function(e){return+`${Math.round(parseFloat(`${e}e+2`))}e-2`}},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return r});var a=n(8);function i(e,t,n){this.title=e,this.fn=t,this.txt=n}function r(e){var t=o[e];if(null!=t){var n=""+t.title+"

"+t.txt;Object(a.dialogBoxCreate)(n)}}let o={};function s(){var e,t,n;e="The Beginner's Guide to Hacking",n="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.

-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)

-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()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-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

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-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.",o[t="hackers-starting-handbook.lit"]=new i(e,t,n),e="The Complete Handbook for Creating a Successful Corporation",n="Getting Started with Corporations
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.

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.

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.

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.

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').

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.

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.

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.

Tips/Pointers
-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-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.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-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

-Remember, you need to spend money to make money!

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",o[t="corporation-management-handbook.lit"]=new i(e,t,n),e="A Brief History of Synthoids",n="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.

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.

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.

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.

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.

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.

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.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

Nobody knows what happened to the terrorist group Ascendis Totalis.",o[t="history-of-synthoids.lit"]=new i(e,t,n),e="A Green Tomorrow",n="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 renwable sources such as solar and geothermal. Unfortunately, these efforts were not the huge success that they seem to be.

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.

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.

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.",o[t="A-Green-Tomorrow.lit"]=new i(e,t,n),e="Alpha and Omega",n="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.'

And once were 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.'",o[t="alpha-omega.lit"]=new i(e,t,n),e="Are We Living in a Computer Simulation?",n="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.

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 this is a reasonable outcome of continued technological advancement, then it is very likely that such a scenario has already happened.

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?",o[t="simulated-reality.lit"]=new i(e,t,n),e="Beyond Man",n="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.

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?

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.",o[t="beyond-man.lit"]=new i(e,t,n),e="Brighter than the Sun",n="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.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search, 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.

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.

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.",o[t="brighter-than-the-sun.lit"]=new i(e,t,n),e="Democracy is Dead: The Fall of an Empire",n="They rose from the shadows in the street
From the places where the oppressed meet
Their cries echoed loudly through the air
As they once did in Tiananmen Square
Loudness in the silence, Darkness in the light
They came forth with power and might
Once the beacon of democracy, America was first
Its pillars of society destroyed and dispersed
Soon the cries rose everywhere, with revolt and riot
Until one day, finally, all was quiet
From the ashes rose a new order, corporatocracy was its name
Rome, Mongol, Byzantine, all of history is just the same
For man will never change in a fundamental way
And now democracy is dead, in the USA",o[t="democracy-is-dead.lit"]=new i(e,t,n),e="Figures Show Rising Crime Rates in Sector-12",n="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.

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.",o[t="sector-12-crime.lit"]=new i(e,t,n),e="Man and the Machine",n="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?

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.",o[t="man-and-machine.lit"]=new i(e,t,n),e="Secret Societies",n="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.

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.

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.",o[t="secret-societies.lit"]=new i(e,t,n),e="Space: The Failed Frontier",n="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.

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.

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.",o[t="the-failed-frontier.lit"]=new i(e,t,n),e="Coded Intelligence: Myth or Reality?",n="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.

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.

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.'",o[t="coded-intelligence.lit"]=new i(e,t,n),e="Synthetic Muscles",n="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.

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.",o[t="synthetic-muscles.lit"]=new i(e,t,n),e="Tensions rise in global tech race",n="Have we entered a new Cold War? Is WWIII just beyond the horizon?

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.",o[t="tensions-in-tech-race.lit"]=new i(e,t,n),e="The Cost of Immortality",n="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.

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.

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.",o[t="cost-of-immortality.lit"]=new i(e,t,n),e="The Hidden World",n="WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

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.

OPEN YOUR EYES

It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

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.",o[t="the-hidden-world.lit"]=new i(e,t,n),e="The New God",n="Everyone has that moment in their life where they wonder about the bigger questions

What's the point of all of this? What is my purpose?

Some people dare to think even bigger

What will be the fate of the human race?

We live in an era vastly different from that of even 15 or 20 years ago. We have gone where no man has gone before. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into something greater. This is our future

Embrace it, and you will obey a new god. The God in the Machine",o[t="the-new-god.lit"]=new i(e,t,n),e="The New Triads",n="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.

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.

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.",o[t="new-triads.lit"]=new i(e,t,n),e="The Secret War",n="",o[t="the-secret-war.lit"]=new i(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProgressBarText=function(e){const t=Object.assign({},{progress:0,totalTicks:20},e),n=Math.floor(t.progress/(1/t.totalTicks)),a=t.totalTicks-n;return`[${"|".repeat(n+1)}${"-".repeat(a+1)}]`}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i}),e(document).click(function(t){a&&null==e(t.target).closest(".game-options-box").get(0)&&i()});var a=!1;function i(){a=!1,document.getElementById("game-options-container").style.display="none"}function r(){document.getElementById("game-options-container").style.display="block",setTimeout(function(){a=!0},500)}document.addEventListener("DOMContentLoaded",function(){document.getElementById("options-menu-link").addEventListener("click",function(){return r(),!1}),document.getElementById("game-options-close-button").addEventListener("click",function(){return i(),!1})},!1)}).call(this,n(53))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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";(function(e){n.d(t,"a",function(){return T}),n.d(t,"b",function(){return R});n(51);var a=n(18),i=n(16),r=n(28),o=n(74),s=n(11),l=n(21),c=n(6),u=n(12),d=n(41),h=(n(4),n(33)),p=n(34),m=n(23),g=n(0),y=n(9),f=n(19),b=n(24),v=n(25),_=n(26),k=n(8),E=n(20),O=n(3),C=n(36),w=n(42);n(15);let S=25e7;function T(){Object(i.c)(),g.a.prestigeAugmentation(),Object(m.e)();var t=g.a.getHomeComputer();for(var n in Object(y.h)(),Object(f.e)(),Object(y.a)(t),Object(y.i)(t),Object(a.f)(a.b.Neurolink)&&a.c[a.b.Neurolink].owned&&(t.programs.push(l.a.FTPCrackProgram.name),t.programs.push(l.a.RelaySMTPProgram.name)),Object(a.f)(a.b.CashRoot)&&a.c[a.b.CashRoot].owned&&(g.a.setMoney(new _.a(1e6)),t.programs.push(l.a.BruteSSHProgram.name)),Object(y.f)(),document.getElementById("location-purchase-tor").setAttribute("class","a-link-button"),s.a)s.a.hasOwnProperty(n)&&s.a[n].gainFavor();for(var n in u.b)u.b.hasOwnProperty(n)&&u.b[n].gainFavor();c.Engine._actionInProgress&&(c.Engine._actionInProgress=!1,v.b.finishAction(!0)),Object(u.f)(),Object(a.h)(),g.a.reapplyAllSourceFiles(),Object(s.h)(),e("#terminal tr:not(:last)").remove(),Object(v.d)(),Object(h.d)(),g.a.hasWseAccount&&(Object(b.g)(),Object(b.i)()),Object(b.m)(!1);for(var o=document.getElementById("stock-market-list");o.firstChild;)o.removeChild(o.firstChild);if(2==g.a.bitNodeN&&g.a.inGang()){var d=u.b[g.a.gang.facName];d instanceof u.a&&Object(u.h)(d)}if(g.a.bladeburner instanceof r.a&&g.a.bladeburner.prestige(),8===g.a.bitNodeN&&(g.a.money=new _.a(S)),(8===g.a.bitNodeN||p.f)&&(g.a.hasWseAccount=!0,g.a.hasTixApiAccess=!0),document.getElementById("mainmenu-container").style.visibility="visible",v.b.resetTerminalInput(),c.Engine.loadTerminalContent(),Object(a.f)(a.b.TheRedPill)&&a.c[a.b.TheRedPill].owned){var k=y.b[f.a[f.b.WorldDaemon]],E=y.b[f.a[f.b.DaedalusServer]];k&&E&&(k.serversOnNetwork.push(E.ip),E.serversOnNetwork.push(k.ip))}}function R(){Object(i.c)(),g.a.prestigeSourceFile(),Object(m.e)();var t=g.a.getHomeComputer();Object(y.h)(),Object(f.e)(),Object(y.a)(t),Object(y.i)(t),Object(y.f)();for(var n=!1,r=0;r(Object(E.removeElementById)(e),!1)});Object(C.createPopup)(e,[t,n,a])}).catch(function(e){Object(w.a)(e)})}8===g.a.bitNodeN&&(g.a.money=new _.a(S)),(8===g.a.bitNodeN||p.f)&&(g.a.hasWseAccount=!0,g.a.hasTixApiAccess=!0),g.a.gainIntelligenceExp(5)}}).call(this,n(53))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrays=function(e,t){if(e.length!==t.length)return!1;for(let n=0;n=t.length)return Promise.resolve(!0);return(a=t[n],new Promise(function(e,t){var n=document.getElementById("cinematic-text-container"),i=document.createElement("p");n.appendChild(i);var r=function e(t,n,a=0){return new Promise(function(i,r){setTimeout(function(){if(a>=n.length){var o=n.substring(0,a);return t.innerHTML=o,i(!0)}var o=n.substring(0,a);t.innerHTML=o+"";var s=e(t,n,a+1);s.then(function(e){i(e)},function(e){r(e)})},15)})}(i,a,0);r.then(function(t){e(t)},function(e){t(e)})})).then(function(){return e(t,n+1)});var a}(e).then(function(){return e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container"),e.appendChild(Object(r.createElement)("br")),new Promise(function(n,o){e.appendChild(Object(r.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(i.removeChildrenFromElement)(e),a.Engine.loadTerminalContent(),t.style.visibility="visible",l=!1,n()}}))});var e,t}).catch(function(e){Object(o.a)(e)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalHelpText="Type 'help name' to learn more about the command 'name'

alias [-g] [name=\"value\"] Create or display Terminal aliases
analyze Get information about the current machine
buy [-l/program] Purchase a program through the Dark Web
cat [file] Display a .msg, .lit, or .txt file
check [script] [args...] Print a script's logs to Terminal
clear Clear all text on the terminal
cls See 'clear' command
connect [ip/hostname] Connects to a remote server
download [script/text file] Downloads scripts or text files to your computer
free Check the machine's memory (RAM) usage
hack Hack the current machine
help [command] Display this help text, or the help text for a command
home Connect to home computer
hostname Displays the hostname of the machine
ifconfig Displays the IP address of the machine
kill [script] [args...] Stops the specified script on the current server
killall Stops all running scripts on the current machine
ls [| grep pattern] Displays all files on the machine
lscpu Displays the number of CPU cores on the machine
mem [script] [-t] [n] Displays the amount of RAM required to run the script
nano [file] Text editor - Open up and edit a script or text file
ps Display all scripts that are currently running
rm [file] Delete a file from the server
run [name] [-t] [n] [args...] Execute a program or script
scan Prints all immediately-available network connections
scan-analyze [d] [-a] Prints info for all servers up to d nodes away
scp [file] [server] Copies a file to a destination server
sudov Shows whether you have root access on this computer
tail [script] [args...] Displays dynamic logs for the specified script
theme [preset] | bg txt hlgt Change the color scheme of the UI
top Displays all running scripts and their RAM usage
unalias \"[alias name]\" Deletes the specified alias
",t.HelpTexts={alias:"alias [-g] [name=\"value\"]
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:

alias nuke=\"run NUKE.exe\"

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:

alias worm=\"HTTPWorm.exe\"

and then you tried to run the following terminal command:

run worm

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:

alias -g worm=\"HTTPWorm.exe\"

Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command.

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.

The 'unalias' command can be used to remove aliases.

",analyze:"analze
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.",buy:"buy [-l / program]
Purchase a program through the Dark Web. Requires a TOR router to use.

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.

Otherwise, the name of the program must be passed in as a parameter. This is name is NOT case-sensitive.",cat:"cat [file]
Display message (.msg), literature (.lit), or text (.txt) files. Examples:

cat j1.msg
cat foo.lit
cat servers.txt",check:"check [script name] [args...]
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:

run foo.script 1 2 foodnstuff

Then to run the 'check' command on this script you would have to pass the same arguments in:

check foo.script 1 2 foodnstuff",clear:"clear
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
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]
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]
Downloads a script or text file to your computer (like your real life computer).
You can also download all of your scripts/text files as a zip file using the following Terminal commands:

Download all scripts and text files: download *
Download all scripts: download *.script
Download all text files: download *.txt
",free:"free
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
Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics
",help:"help [command]
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:

help alias
help scan-analyze",home:"home
Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname
Prints the hostname of the current server",ifconfig:"ipconfig
Prints the IP address of the current server",kill:"kill [script name] [args...]
Kill 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 are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 sigma-cosmetics

Then to kill this script the same arguments would have to be used:

kill foo.script 1 sigma-cosmetics

Note that after issuing the 'kill' command 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.",killall:"killall
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 [| grep pattern]
The ls command, with no arguments, prints all files on the current server to the Terminal screen. This includes all scripts, programs, and message files. The files will be displayed in alphabetical order.

The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern. For example, if you wanted to only display files with the .script extension, you could use:

ls | grep .script

Alternatively, if you wanted to display all files with the word purchase in the filename, you could use:

ls | grep purchase",lscpu:"lscpu
Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]
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:

mem foo.script
mem foo.script -t 50
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.",nano:"nano [file name]
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
Prints all scripts that are running on the current server",rm:"rm [file]
Removes the specified file from the current server. A file can be a script, a program, or a message file.

WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]
Execute a program or a script.

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.

[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.

",scan:"scan
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]
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.

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.

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.

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]
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
Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]
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:

run foo.script 10 50000

Then in order to check its logs with 'tail' the same arguments must be used:

tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]
Change the color of the game's user interface

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:

theme #ffffff #385 #235012

A color picker such as Google's can be used to get your desired hex color values

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
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]"
Deletes the specified alias. Note that the double quotation marks are required.

As an example, if an alias was declared using:

alias r="run"

Then it could be removed using:

unalias "r"

It is not necessary to differentiate between global and non-global aliases when using \'unalias\''}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(50),i=n(34),r=n(56);function o(e,t){this.vars=t?Object.assign({},t.vars):Object(i.a)(e),this.parent=t,this.stopFlag=!1}o.prototype={extend:function(){return new o(null,this)},lookup:function(e){for(var t=this;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null},get:function(e){if(e in this.vars)return this.vars[e];throw new Error("Undefined variable "+e)},set:function(e,t){var n=this.lookup(e);return null!==n?n.vars[e]=t:this.vars[e]=t},setArrayElement:function(e,t,n){if(!(t instanceof Array))throw new Error("idx parameter is not an Array");var i=this.lookup(e);if(!i&&this.parent)throw new Error("Undefined variable "+e);var o=(i||this).vars[e];if(!(o.constructor===Array||o instanceof Array))throw new Error("Variable is not an array: "+e);for(var s=o,l=0;l=s.length)throw new Error("Out-of-bounds array access");s=s[c]}if(s[t[t.length-1]]instanceof a.a)throw new Error("Cannot assign a Hacknet Node handle to a new value");if(s[t[t.length-1]]instanceof r.a)throw new Error("Cannot assign a Netscript Port handle to a new value");return s[t[t.length-1]]=n},def:function(e,t){return this.vars[e]=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__(7);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urlStack=null,script=workerScript.getScript();""===script.module&&(urlStack=_getScriptUrls(script,scripts,[]),script.module=await eval("import(urlStack[urlStack.length - 1])")),loadedModule=script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.d)(workerScript,`${script.filename} cannot be run because it does not have a main function.`);return loadedModule.main(ns)}finally{if(null!=urlStack)for(const e in urlStack)URL.revokeObjectURL(e)}}function _getScriptUrls(e,t,n){const a=[];n.push(e);try{const i=e.code.replace(/((?:from|import)\s+(?:'|"))([^'"]+)('|";)/g,(e,i,r,o)=>{if(!t.some(e=>e.filename==r))return e;const[s]=t.filter(e=>e.filename==r),l=_getScriptUrls(s,t,n);return a.push(...l),[i,l[l.length-1],o].join("")});return a.push(URL.createObjectURL(makeScriptBlob(i))),a}catch(e){for(const e in a)URL.revokeObjectURL(e);throw e}finally{n.pop()}}},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"a",function(){return u});var a=n(1),i=n(0),r=n(9),o=n(8),s=n(17),l=n(15);function c(e,t){if(i.a.money.lt(t))Object(o.dialogBoxCreate)("You don't have enough money to purchase this server!");else if(i.a.purchasedServers.length>=a.a.PurchasedServerLimit)Object(o.dialogBoxCreate)("You have reached the maximum limit of "+a.a.PurchasedServerLimit+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");else{var n=Object(l.h)();if(""!=n){var c=new r.d({ip:Object(s.a)(),hostname:n,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:e});Object(r.a)(c),i.a.purchasedServers.push(c.ip);var u=i.a.getHomeComputer();u.serversOnNetwork.push(c.ip),c.serversOnNetwork.push(u.ip),i.a.loseMoney(t),Object(o.dialogBoxCreate)("Server successfully purchased with hostname "+n)}else Object(o.dialogBoxCreate)("You must enter a hostname for your new server!")}}function u(e){if(i.a.money.lt(e))Object(o.dialogBoxCreate)("You do not have enough money to purchase additional RAM for your home computer");else{var t=i.a.getHomeComputer();t.maxRam*=2,i.a.loseMoney(e),Object(o.dialogBoxCreate)("Purchased additional RAM for home computer! It now has "+t.maxRam+"GB of RAM.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a{constructor(e,t,n,a,i,r){this.infoText=e,this.enemies=t,this.offerHackingMission=n,this.offerHackingWork=a,this.offerFieldWork=i,this.offerSecurityWork=r,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}}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.

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 things that others don't. We imagine. We create. We invent. We build things that 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.

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.

Legal Insight - Business Instinct - Experience Innovation",[],!0,!0,!0,!0),"Blade Industries":new a("Augmentation is salvation",[],!0,!0,!0,!0),NWO:new a("The human being does not truly desire freedom. It wants to be observed, understood, and judged. It wants to be given purpose and direction in its life. That is why humans created God. And that is why humans 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("Unlocking the power of the genome",[],!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.

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.

So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new a(" __..__
_.nITESECNIt.
.-'NITESECNITESEc.
.' NITESECNITESECn
/ NITESECNITESEC;
: :NITESECNITESEC;
; $ NITESECNITESECN
: _, ,N'ITESECNITESEC
: .+^^`, : `NITESECNIT
) /), `-,-=,NITESECNI
/ ^ ,-;|NITESECN;
/ _.' '-';NITESECN
( , ,-''`^NITE'
)` :`. .'
)-- ; `- /
' _.-' :
( _.-' .
------.
.
_.nIt
_.nITESECNi
nITESECNIT^'
NITE^' ___
/ .gP''''Tp.
: d' . `b
; d' o `b ;
/ d; `b|
/, $; @ `:
/' $$ ;
.' $$b o |
.' d$$$; :
/ .d$$$$; , ;
d .dNITESEC $ |
:bp.__.gNITESEC$$ :$ ;
NITESECNITESECNIT $$b :
",[],!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, Honour, 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's all 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.\n\nThat'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 Righteousness",[],!0,!0,!1,!0),CyberSec:new a("The Internet is the first thing that humanity has built that humanity doesn’t understand, the largest experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by the internet, society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to protect the world from its imminent collapse.",[],!0,!0,!1,!1),Bladeburners:new a("It's too bad they won't live. But then again, who does?

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";Object.defineProperty(t,"__esModule",{value:!0});const a=n(44),i=n(20);t.removeLoadingScreen=function(){i.removeElementById("loader"),a.getElementById("entire-game-container").style.visibility="visible"}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(0),i=n(14),r=n.n(i);function o(){this.hp=document.getElementById("character-hp-text"),this.money=document.getElementById("character-money-text"),this.hack=document.getElementById("character-hack-text"),this.str=document.getElementById("character-str-text"),this.def=document.getElementById("character-def-text"),this.dex=document.getElementById("character-dex-text"),this.agi=document.getElementById("character-agi-text"),this.cha=document.getElementById("character-cha-text"),this.int=document.getElementById("character-int-text"),this.intWrapper=document.getElementById("character-int-wrapper"),this.repaintElem=document.getElementById("character-overview-text")}o.prototype.repaint=function(){this.repaintElem.getClientRects()},o.prototype.update=function(){null==a.a.hp&&(a.a.hp=a.a.max_hp);const e=function(e,t){return e.textContent!==t&&(e.textContent=t,!0)};let t=!1;t=e(this.hp,a.a.hp+" / "+a.a.max_hp)||t,t=e(this.money,r()(a.a.money.toNumber()).format("($0.000a)"))||t,t=e(this.hack,a.a.hacking_skill.toLocaleString())||t,t=e(this.str,a.a.strength.toLocaleString())||t,t=e(this.def,a.a.defense.toLocaleString())||t,t=e(this.dex,a.a.dexterity.toLocaleString())||t,t=e(this.agi,a.a.agility.toLocaleString())||t,t=e(this.cha,a.a.charisma.toLocaleString())||t,t=e(this.int,a.a.intelligence.toLocaleString())||t;const n=this.intWrapper,i=n.style.display,o=a.a.intelligence>=1?"":"none";i!==o&&(n.style.display=o,t=!0),t&&this.repaint()}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(37),i=function(e,t,n=0){this.sourceCode=e,this.sourceCodeLineOffset=n,"string"==typeof e&&(e=a.parse(e,i.PARSE_OPTIONS)),this.ast=e,this.initFunc_=t,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var r,o,s=/^step([A-Z]\w*)$/;for(var l in this)"function"==typeof this[l]&&(r=l.match(s))&&(this.stepFunctions_[r[1]]=this[l].bind(this));this.global=this.createScope(this.ast,null),this.ast=a.parse(this.polyfills_.join("\n"),i.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new i.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=e,(o=new i.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack};i.PARSE_OPTIONS={ecmaVersion:5,locations:!0},i.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},i.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},i.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},i.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},i.STEP_ERROR={},i.SCOPE_REFERENCE={},i.VALUE_IN_DESCRIPTOR={},i.toStringCycles_=[],i.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}},i.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)"},i.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.parse(e,i.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,r=0;n=e.body[r];r++)t.node.body.push(n);t.done=!1},i.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 r=this.stepFunctions_[a](e,t,n)}catch(e){if(e!==i.STEP_ERROR)throw e}return r&&e.push(r),!!n.end||this.step()},i.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},i.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,i.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,i.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,i.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,i.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,i.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new i.Object(null),this.FUNCTION_PROTO=new i.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,i.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"]],r=0;r>> 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(',');","}","});","")},i.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),i.NONENUMERABLE_DESCRIPTOR);for(var a=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],r=0;r= 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;","};","}","")},i.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)},i.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"],r=0;r>>0;return t===Number(e)?t:NaN},i.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},i.Value,i.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},i.Object.prototype.proto=null,i.Object.prototype.isObject=!0,i.Object.prototype.class="Object",i.Object.prototype.data=null,i.Object.prototype.toString=function(){if("Array"===this.class){(a=i.toStringCycles_).push(this);try{for(var e=[],t=0;t0;r.pop()){var o=r[r.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:e,value:t,label:n});case"CallExpression":case"NewExpression":if(e===i.Completion.RETURN)return void(o.value=t);if(e!==i.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===i.Completion.BREAK){if(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop||o.isSwitch)return void r.pop()}else if(e===i.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},i.prototype.createGetter_=function(e,t){var n=Array.isArray(t)?t[0]:t,a=new this.nodeConstructor;a.type="CallExpression";var r=new i.State(a,this.stateStack[this.stateStack.length-1].scope);return r.doneCallee_=!0,r.funcThis_=n,r.func_=e,r.doneArgs_=!0,r.arguments_=[],r},i.prototype.createSetter_=function(e,t,n){var a=Array.isArray(t)?t[0]:this.global,r=new this.nodeConstructor;r.type="CallExpression";var o=new i.State(r,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=a,o.func_=e,o.doneArgs_=!0,o.arguments_=[n],o},i.State=function(e,t){this.node=e,this.scope=t},i.prototype.stepArrayExpression=function(e,t,n){var a=n.elements,r=t.n_||0;for(t.array_?(this.setProperty(t.array_,r,t.value),r++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=a.length);r>=":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},i.prototype.stepBinaryExpression=function(e,t,n){if(!t.doneLeft_)return t.doneLeft_=!0,new i.State(n.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new i.State(n.right,t.scope);e.pop();var a,r=t.leftValue_,o=t.value;switch(n.operator){case"==":a=r==o;break;case"!=":a=r!=o;break;case"===":a=r===o;break;case"!==":a=r!==o;break;case">":a=r>o;break;case">=":a=r>=o;break;case"<":a=r>":a=r>>o;break;case">>>":a=r>>>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,r);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=!!r.isObject&&this.isa(r,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=a},i.prototype.stepBlockStatement=function(e,t,n){var a=t.n_||0,r=n.body[a];if(r)return t.n_=a+1,new i.State(r,t.scope);e.pop()},i.prototype.stepBreakStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(i.Completion.BREAK,void 0,a)},i.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var r=new i.State(n.callee,t.scope);return r.components=!0,r}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o,n),o[0]===i.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 i.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;uu?t.arguments_[u]:void 0;this.setProperty(c,d,h)}var p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;ut===e.name);return-1===t?console.log("ERROR: Could not find faction in Player.factionInvitations"):r.a.factionInvitations.splice(t,1),Object(a.h)(e),s(),i.Engine.currentPage===i.Engine.Page.Factions&&i.Engine.loadFactionsContent(),!1}),Object(o.clearEventListeners)("faction-invitation-box-no").addEventListener("click",function(){return s(),!1}),document.getElementById("faction-invitation-box-container").style.display="block"}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var a=n(16),i=n(1),r=n(12),o=n(0),s=n(8),l=n(13),c=n(2),u="";function d(){document.getElementById("infiltration-box-container").style.display="none"}function h(e){var t=2*e.clearanceLevel/e.maxClearanceLevel;o.a.gainHackingExp(e.hackingExpGained*t),o.a.gainStrengthExp(e.strExpGained*t),o.a.gainDefenseExp(e.defExpGained*t),o.a.gainDexterityExp(e.dexExpGained*t),o.a.gainAgilityExp(e.agiExpGained*t),o.a.gainCharismaExp(e.chaExpGained*t),o.a.gainIntelligenceExp(e.intExpGained*t);for(var n=0,h=0;h"+o.a.factions[e]+"");if(""!==u)for(let e=0;e
You gained:
"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp
"+Object(c.formatNumber)(e.strExpGained,3)+" str exp
"+Object(c.formatNumber)(e.defExpGained,3)+" def exp
"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp
"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp
"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp
"),d(),!1)})},750);var b=Object(l.clearEventListeners)("infiltration-box-faction");setTimeout(function(){b.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=y.options[y.selectedIndex].value;u=n;var a=r.b[n];return null==a?(Object(s.dialogBoxCreate)("Error finding faction. This is a bug please report to developer"),!1):(a.playerReputation+=m,Object(s.dialogBoxCreate)("You gave the classified information you stole from "+e.companyName+" to "+n+" and gained "+Object(c.formatNumber)(m,3)+" reputation with the faction.

You gained:
"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp
"+Object(c.formatNumber)(e.strExpGained,3)+" str exp
"+Object(c.formatNumber)(e.defExpGained,3)+" def exp
"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp
"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp
"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp
"),d(),!1)})},750),document.getElementById("infiltration-box-container").style.display="block"}else Object(s.dialogBoxCreate)("You successfully escaped the facility but you did not steal anything of worth when infiltrating.

You gained:
"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp
"+Object(c.formatNumber)(e.strExpGained,3)+" str exp
"+Object(c.formatNumber)(e.defExpGained,3)+" def exp
"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp
"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp
"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp
")}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(16),i=n(1),r=n(6),o=n(0),s=n(8),l=n(13),c=n(5),u=n(98),d=n(2);let h={Guards:"You see an armed security guard patrolling the area.",TechOnly:"The area is equipped with a state-of-the-art security system: cameras, laser tripwires, and sentry turrets.",TechOrLockedDoor:"The area is equipped with a state-of-the-art security system. There is a locked door on the side of the room that can be used to bypass security.",Bots:"You see a few security bots patrolling the area."};function p(e,t,n,a,i){this.companyName=e,this.clearanceLevel=0,this.maxClearanceLevel=a,this.securityLevel=t,this.difficulty=i,this.baseValue=n,this.secretsStolen=[],this.hackingExpGained=0,this.strExpGained=0,this.defExpGained=0,this.dexExpGained=0,this.agiExpGained=0,this.chaExpGained=0,this.intExpGained=0}function m(e,t,n,a,i){var r=new p(e,t,n,a,i);document.getElementById("infiltration-status-text").innerHTML="",y(r)}function g(e,t){t&&Object(u.a)(e),Object(l.clearEventListeners)("infiltration-kill"),Object(l.clearEventListeners)("infiltration-knockout"),Object(l.clearEventListeners)("infiltration-stealthknockout"),Object(l.clearEventListeners)("infiltration-assassinate"),Object(l.clearEventListeners)("infiltration-hacksecurity"),Object(l.clearEventListeners)("infiltration-destroysecurity"),Object(l.clearEventListeners)("infiltration-sneak"),Object(l.clearEventListeners)("infiltration-pickdoor"),Object(l.clearEventListeners)("infiltration-bribe"),Object(l.clearEventListeners)("infiltration-escape"),r.Engine.loadLocationContent()}function y(e){++e.clearanceLevel,v(e);var t=Object(l.clearEventListeners)("infiltration-kill"),n=Object(l.clearEventListeners)("infiltration-knockout"),a=Object(l.clearEventListeners)("infiltration-stealthknockout"),r=Object(l.clearEventListeners)("infiltration-assassinate"),s=Object(l.clearEventListeners)("infiltration-hacksecurity"),u=Object(l.clearEventListeners)("infiltration-destroysecurity"),p=Object(l.clearEventListeners)("infiltration-sneak"),m=Object(l.clearEventListeners)("infiltration-pickdoor"),y=Object(l.clearEventListeners)("infiltration-bribe"),k=Object(l.clearEventListeners)("infiltration-escape");t.style.display="none",n.style.display="none",a.style.display="none",r.style.display="none",s.style.display="none",u.style.display="none",p.style.display="none",m.style.display="none",y.style.display="none",k.style.display="none";var O=null;switch(Object(c.getRandomInt)(0,5)){case 1:O=h.TechOnly,s.style.display="block",u.style.display="block",p.style.display="block",k.style.display="block";break;case 2:O=h.TechOrLockedDoor,s.style.display="block",u.style.display="block",p.style.display="block",m.style.display="block",k.style.display="block";break;case 3:O=h.Bots,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=E(e);if(n[0])return b("You SUCCESSFULLY killed the security bots! Unfortunately you alerted the rest of the facility's security. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.karma-=1,f(e),!1;var a=Math.max(1,Math.round(1.5*e.securityLevel/o.a.defense));b("You FAILED to kill the security bots. The bots fight back and raise the alarm! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e)}),r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return b("You SUCCESSFULLY assassinated the security bots without being detected!"),o.a.karma-=1,f(e),!1;b("You FAILED to assassinate the security bots. The bots have not detected you but are now more alert for an intruder. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e)}),s.style.display="block",p.style.display="block",k.style.display="block";break;default:O=h.Guards,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=E(e);if(n[0])return b("You SUCCESSFULLY killed the security guard! Unfortunately you alerted the rest of the facility's security. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.karma-=3,++o.a.numPeopleKilled,f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));b("You FAILED to kill the security guard. The guard fights back and raises the alarm! You take "+a+" damage and the facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e)}),n.style.display="block",a.style.display="block",r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return b("You SUCCESSFULLY assassinated the security guard without being detected!"),o.a.karma-=3,++o.a.numPeopleKilled,f(e),!1;b("You FAILED to assassinate the security guard. The guard has not detected you but is now more alert for an intruder. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e)}),p.style.display="block",y.style.display="block",k.style.display="block"}n.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=C(e);return e.gainStrengthExp(e.securityLevel/70),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/70),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/70),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/70),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.03,[!0,1.03]):(e.securityLevel*=1.1,[!1,1.1])}(e);if(n[0])return b("You SUCCESSFULLY knocked out the security guard! Unfortunately you made a lot of noise and alerted other security."),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));return b("You FAILED to knockout the security guard. The guard raises the alarm and fights back! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e),!1}),a.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=w(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDexterityExp(e.securityLevel/60),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/60),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.1,[!1,1.1])}(e);if(n[0])return b("You SUCCESSFULLY knocked out the security guard without making any noise!"),f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));return b("You FAILED to stealthily knockout the security guard. The guard raises the alarm and fights back! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e),!1}),s.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=x(e);return e.gainHackingExp(e.securityLevel/30),o.a.hacking_exp_mult,e.gainIntelligenceExp(e.securityLevel/680),Math.random()<=t?(e.securityLevel*=1.03,[!0,1.03]):(e.securityLevel*=1.05,[!1,1.05])}(e);return n[0]?(b("You SUCCESSFULLY hacked and disabled the security system!"),b("The facility's security level increased by "+(100*n[1]-100).toString()+"%"),f(e),!1):(b("You FAILED to hack the security system. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),u.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=R(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/75),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/75),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/75),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.05,[!0,1.05]):(e.securityLevel*=1.1,[!1,1.1])}(e);return n[0]?(b("You SUCCESSFULLY and violently destroy the security system!"),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(b("You FAILED to destroy the security system. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),p.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=I(e);return e.gainAgilityExp(e.securityLevel/30),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.08,[!1,1.08])}(e);return n[0]?(b("You SUCCESSFULLY sneak past the security undetected!"),f(e),!1):(b("You FAILED and were detected while trying to sneak past security! The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),m.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=P(e);return e.gainDexterityExp(e.securityLevel/25),o.a.dexterity_exp_mult,Math.random()<=t?(e.securityLevel*=1.01,[!0,1.01]):(e.securityLevel*=1.03,[!1,1.03])}(e);return n[0]?(b("You SUCCESSFULLY pick the locked door!"),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(b("You FAILED to pick the locked door. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),y.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=i.a.InfiltrationBribeBaseAmount*e.clearanceLevel;if(o.a.money.lt(n))return b("You do not have enough money to bribe the guard. You need $"+n),!1;var a=function(e){var t=N(e);return e.gainCharismaExp(e.securityLevel/8),o.a.charisma_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.15,[!1,1.15])}(e);return a[0]?(b("You SUCCESSFULLY bribed a guard to let you through to the next clearance level for $"+n),o.a.loseMoney(n),f(e),!1):(b("You FAILED to bribe a guard! The guard is alerting other security guards about your presence! The facility's security level increased by "+Object(d.formatNumber)(100*a[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),k.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=A(e);return e.gainAgilityExp(e.securityLevel/30),o.a.agility_exp_mult,e.gainDexterityExp(e.securityLevel/30),o.a.dexterity_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.05,[!1,1.05])}(e);return n[0]?(b("You SUCCESSFULLY escape from the facility with the stolen classified documents and company secrets!"),g(e,!0),!1):(b("You FAILED to escape from the facility. You took 1 damage. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(1)&&g(e,!1),_(e,O),v(e),!1)}),_(e,O),b(""),b("You are now on clearance level "+e.clearanceLevel+".
"+O)}function f(e){if(e.clearanceLevel%5==0){var t=e.baseValue*e.clearanceLevel/2,n=t*o.a.faction_rep_mult*i.a.InfiltrationRepValue*a.a.InfiltrationRep,r=t*i.a.InfiltrationMoneyValue*a.a.InfiltrationMoney;e.secretsStolen.push(t),Object(s.dialogBoxCreate)("You found and stole a set of classified documents from the company. These classified secrets could probably be sold for money ($"+Object(d.formatNumber)(r,2)+"), or they could be given to factions for reputation ("+Object(d.formatNumber)(n,3)+" rep)")}e.securityLevel*=1+e.difficulty/100,b("You move on to the facility's next clearance level. This clearance level has "+e.difficulty+"% higher security"),e.clearanceLevel>=e.maxClearanceLevel?g(e,!0):y(e)}function b(e){var t=document.getElementById("infiltration-status-text");t.innerHTML+=e+"
",t.parentElement.scrollTop=t.scrollHeight}function v(e){for(var t=0,n=0,r=0;rClearance Level: "+e.clearanceLevel+"
Security Level: "+Object(d.formatNumber)(e.securityLevel,3)+"

Total reputation value of secrets stolen: "+Object(d.formatNumber)(t,3)+"
Total monetary value of secrets stolen: $"+Object(d.formatNumber)(n,2)+"

Hack exp gained: "+Object(d.formatNumber)(e.hackingExpGained*s,3)+"
Str exp gained: "+Object(d.formatNumber)(e.strExpGained*s,3)+"
Def exp gained: "+Object(d.formatNumber)(e.defExpGained*s,3)+"
Dex exp gained: "+Object(d.formatNumber)(e.dexExpGained*s,3)+"
Agi exp gained: "+Object(d.formatNumber)(e.agiExpGained*s,3)+"
Cha exp gained: "+Object(d.formatNumber)(e.chaExpGained*s,3)}function _(e,t){var n=O(e),a=C(e),i=w(e),r=T(e),o=R(e),s=x(e),l=I(e),c=P(e),u=N(e),p=A(e);switch(document.getElementById("infiltration-escape").innerHTML="EscapeAttempt to escape the facility with the classified secrets and documents you have stolen. You have a "+Object(d.formatNumber)(100*p,2)+"% chance of success. If you fail, the security level will increase by 5%.",t){case h.TechOrLockedDoor:document.getElementById("infiltration-pickdoor").innerHTML="LockpickAttempt to pick the locked door. You have a "+Object(d.formatNumber)(100*c,2)+"% chance of success. If you succeed, the security level will increased by 1%. If you fail, the security level will increase by 3%.";case h.TechOnly:document.getElementById("infiltration-hacksecurity").innerHTML="HackAttempt to hack and disable the security system. You have a "+Object(d.formatNumber)(100*s,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 5%.",document.getElementById("infiltration-destroysecurity").innerHTML="Destroy securityAttempt to violently destroy the security system. You have a "+Object(d.formatNumber)(100*o,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-sneak").innerHTML="SneakAttempt to sneak past the security system. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. ";break;case h.Bots:document.getElementById("infiltration-kill").innerHTML="Destroy botsAttempt to destroy the security bots through combat. You have a "+Object(d.formatNumber)(100*n,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-assassinate").innerHTML="Assassinate botsAttempt to stealthily destroy the security bots through assassination. You have a "+Object(d.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-hacksecurity").innerHTML="Hack botsAttempt to disable the security bots by hacking them. You have a "+Object(d.formatNumber)(100*s,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 5%. ",document.getElementById("infiltration-sneak").innerHTML="SneakAttempt to sneak past the security bots. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. ";break;case h.Guards:default:document.getElementById("infiltration-kill").innerHTML="KillAttempt to kill the security guard. You have a "+Object(d.formatNumber)(100*n,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will decrease by 10%. ",document.getElementById("infiltration-knockout").innerHTML="KnockoutAttempt to knockout the security guard. You have a "+Object(d.formatNumber)(100*a,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-stealthknockout").innerHTML="Stealth KnockoutAttempt to stealthily knockout the security guard. You have a "+Object(d.formatNumber)(100*i,2)+"% chance of success. If you fail, the security level will increase by 10%. ",document.getElementById("infiltration-assassinate").innerHTML="AssassinateAttempt to assassinate the security guard. You have a "+Object(d.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 5%. ",document.getElementById("infiltration-sneak").innerHTML="SneakAttempt to sneak past the security guard. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. ",document.getElementById("infiltration-bribe").innerHTML="BribeAttempt to bribe the security guard. You have a "+Object(d.formatNumber)(100*u,2)+"% chance of success. If you fail, the security level will increase by 15%. "}}p.prototype.gainHackingExp=function(e){isNaN(e)||(this.hackingExpGained+=e)},p.prototype.gainStrengthExp=function(e){isNaN(e)||(this.strExpGained+=e)},p.prototype.gainDefenseExp=function(e){isNaN(e)||(this.defExpGained+=e)},p.prototype.gainDexterityExp=function(e){isNaN(e)||(this.dexExpGained+=e)},p.prototype.gainAgilityExp=function(e){isNaN(e)||(this.agiExpGained+=e)},p.prototype.gainCharismaExp=function(e){isNaN(e)||(this.chaExpGained+=e)},p.prototype.gainIntelligenceExp=function(e){isNaN(e)||(this.intExpGained+=e)};let k=i.a.IntelligenceInfiltrationWeight;function E(e){var t=O(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/75),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/75),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/75),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.05,[!0,1.05]):(e.securityLevel*=1.1,[!1,1.1])}function O(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.45*t))}function C(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.7*t))}function w(e){var t=e.securityLevel;return Math.min(.95,(.55*o.a.strength+2*o.a.dexterity+2*o.a.agility+k*o.a.intelligence)/(3*t))}function S(e){var t=T(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDexterityExp(e.securityLevel/55),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/55),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.05,[!1,1.05])}function T(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+.5*o.a.agility+k*o.a.intelligence)/(2*t))}function R(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(2*t))}function x(e){var t=e.securityLevel;return Math.min(.95,(o.a.hacking_skill+k*o.a.intelligence)/t)}function I(e){var t=e.securityLevel;return Math.min(.95,(o.a.agility+.5*o.a.dexterity+k*o.a.intelligence)/(2*t))}function P(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+k*o.a.intelligence)/t)}function N(e){var t=e.securityLevel;return Math.min(.95,o.a.charisma/t)}function A(e){var t=e.securityLevel;return Math.min(.95,(2*o.a.agility+o.a.dexterity+k*o.a.intelligence)/t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSelector=function(e){for(let t=e.options.length-1;t>=0;t--)e.remove(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerOfTwo=function(e){return!isNaN(e)&&0!==e&&0==(e&e-1)}},,,,,,,,,,,,,,,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,function(e,t,n){},,,,,,,,,function(e,t,n){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},r.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};a.inherits(r,i),r.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},r.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},r.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=r}),ace.define("ace/mode/netscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,r=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*";let s="hack|sleep|grow|weaken|print|tprint|scan|nuke|brutessh|ftpcrack|clearLog|disableLog|enableLog|relaysmtp|httpworm|sqlinject|run|exec|spawn|kill|killall|exit|scp|ls|hasRootAccess|getIp|getHackingMultipliers|getBitNodeMultipliers|getStats|isBusy|getHacknetMultipliers|getHostname|getHackingLevel|getServerMoneyAvailable|getServerMaxMoney|getServerGrowth|getServerSecurityLevel|getServerBaseSecurityLevel|getServerMinSecurityLevel|getServerRequiredHackingLevel|getServerNumPortsRequired|getServerRam|serverExists|fileExists|isRunning|deleteServer|getPurchasedServers|getPurchasedServerLimit|getPurchasedServerMaxRam|getPurchasedServerCost|purchaseServer|round|write|read|peek|clear|rm|getPortHandle|scriptRunning|scriptKill|getScriptName|getScriptRam|getHackTime|getGrowTime|getWeakenTime|getScriptIncome|getScriptExpGain|getTimeSinceLastAug|prompt|universityCourse|getCharacterInformation|gymWorkout|travelToCity|purchaseTor|purchaseProgram|upgradeHomeRam|getUpgradeHomeRamCost|workForCompany|applyToCompany|getCompanyRep|getCompanyFavor|stopAction|getFactionFavor|getFavorToDonate|getFactionFavorGain|getCompanyFavorGain|checkFactionInvitations|joinFaction|workForFaction|getFactionRep|createProgram|commitCrime|getCrimeChance|getOwnedAugmentations|getOwnedSourceFiles|getAugmentationsFromFaction|getAugmentationCost|purchaseAugmentation|installAugmentations|getStockPrice|getStockPosition|buyStock|sellStock|shortStock|sellShort|placeOrder|cancelOrder|hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|upgradeLevel|upgradeRam|upgradeCore|getLevelUpgradeCost|getRamUpgradeCost|getCoreUpgradeCost|bladeburner|getContractNames|getOperationNames|getBlackOpNames|getGeneralActionNames|getSkillNames|startAction|stopBladeburnerAction|getActionTime|getActionEstimatedSuccessChance|getActionCountRemaining|getActionMaxLevel|getActionCurrentLevel|getActionAutolevel|setActionAutolevel|setActionLevel|getRank|getSkillPoints|getSkillLevel|upgradeSkill|getTeamSize|setTeamSize|getCityEstimatedPopulation|getCityEstimatedCommunities|getCityChaos|switchCity|getStamina|joinBladeburnerFaction";var l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|ns|"+s+"|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),c("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"/|"+s+"|/"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&0==e.jsx||function(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var a="/"==e.charAt(1)?2:1;return 1==a?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==a&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==a?"":"end-")+"tag-open.xml",value:e.slice(0,a)},{type:"meta.tag.tag-name.xml",value:e.substr(a)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}a.inherits(l,r),t.NetscriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var a=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,r=e.findMatchingBracket({row:t,column:i});if(!r||r.row==t)return 0;var o=this.$getIndent(e.getLine(r.row));e.replace(new a(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var a=e("../../lib/oop"),i=e("../../range").Range,r=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};a.inherits(o,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var a=e.getLine(n);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(a)?"start":i},this.getFoldWidgetRange=function(e,t,n,a){var i,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(i=r.match(this.foldingStartMarker)){var o=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,o);var s=e.getCommentFoldRange(n,o+i[0].length,1);return s&&!s.isMultiLine()&&(a?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=r.match(this.foldingStopMarker))){o=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),a=n.search(/\S/),r=t,o=n.length,s=t+=1,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=r)break;if(u.isMultiLine())t=u.end.row;else if(a==c)break}s=t}}return new i(r,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var a=t.search(/\s*$/),r=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++no)return new i(o,a,n,t.length)}}.call(o.prototype)}),ace.define("ace/mode/netscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/netscript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,a){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./netscript_highlight_rules").NetscriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("../worker/worker_client").WorkerClient,c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new c,this.foldingRules=new u};i.inherits(d,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var a=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),r=i.tokens,o=i.state;if(r.length&&"comment"==r[r.length-1].type)return a;if("start"==e||"no_regex"==e)(s=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(a+=n);else if("doc-start"==e){if("start"==o||"no_regex"==o)return"";var s;(s=t.match(/^\s*(\/?)\*/))&&(s[1]&&(a+=" "),a+="* ")}return a},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],n(144),"JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/netscript"}.call(d.prototype),t.Mode=d})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){}]); //# sourceMappingURL=engine.bundle.js.map \ No newline at end of file diff --git a/src/engine.js b/src/engine.js index 9620ea6ef..26e49704a 100644 --- a/src/engine.js +++ b/src/engine.js @@ -1430,11 +1430,12 @@ let Engine = { bladeburner.style.display = "none"; corp.style.display = "none"; gang.style.display = "none"; + dev.style.display = "none"; Engine.openMainMenuHeader( [terminal, createScript, activeScripts, stats, hacknetnodes, city, - tutorial, options, dev] + tutorial, options] ); //Start interactive tutorial @@ -1965,7 +1966,9 @@ let Engine = { Engine.Clickables.devMainMenuButton = clearEventListeners("dev-menu-link"); Engine.Clickables.devMainMenuButton.addEventListener("click", function() { - Engine.loadDevMenuContent(); + if( process.env.NODE_ENV === "development") { + Engine.loadDevMenuContent(); + } return false; });