mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 01:53:48 +01:00
2 lines
1.5 MiB
2 lines
1.5 MiB
!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],p=0,m=[];p<s.length;p++)o=s[p],i[o]&&m.push(i[o][0]),i[o]=0;for(a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a]);for(u&&u(t);m.length;)m.shift()();return r.push.apply(r,c||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,s=1;s<n.length;s++){var l=n[s];0!==i[l]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},i={2:0},r=[];function o(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var u=l;r.push([11,0]),n()}([function(e,t,n){"use strict";n.d(t,"a",function(){return $}),n.d(t,"b",function(){return q});var a=n(13),i=n(73),r=n(101),o=n(5),s=n(20),l=n(36),c=n(49),u=n(80),p=n(18),m=n(140),h=n(128),d=n(38),g=n(42),_=n(1),f=n(28),y=n(30),b=n(129),v=n(48),E=n(11),k=n(69),C=n(14),T=n(53),O=n(66),S=n(6),M=n(50),P=n(106),A=n(23),w=n(74),x=n(19),R=n(40),N=n(95),I=n(57),L=n(46),D=n(3),B=n(111),W=n(9),j=n(22),F=n(90),U=n(17),H=n(7);const G=1e3/_.CONSTANTS.MilliPerCycle;function K(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new L.a(1e3),this.homeComputer="",this.city=S.Locations.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.resleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new B.MoneySourceTracker,this.moneySourceB=new B.MoneySourceTracker,this.scriptProdSinceLastAug=0}function q(e){if(($=JSON.parse(e,U.Reviver)).money=new L.a($.money),$.corporation instanceof f.c){$.corporation.funds=new L.a($.corporation.funds),$.corporation.revenue=new L.a($.corporation.revenue),$.corporation.expenses=new L.a($.corporation.expenses);for(var t=0;t<$.corporation.divisions.length;++t){var n=$.corporation.divisions[t];n.lastCycleRevenue=new L.a(n.lastCycleRevenue),n.lastCycleExpenses=new L.a(n.lastCycleExpenses),n.thisCycleRevenue=new L.a(n.thisCycleRevenue),n.thisCycleExpenses=new L.a(n.thisCycleExpenses)}}}K.prototype.init=function(){var e=new w.Server({ip:Object(F.createRandomIp)(),hostname:"home",organizationName:"Home PC",isConnectedTo:!0,adminRights:!0,purchasedByPlayer:!0,maxRam:8});this.homeComputer=e.ip,this.currentServer=e.ip,Object(A.AddToAllServers)(e),this.getHomeComputer().programs.push(y.Programs.NukeProgram.name)},K.prototype.prestigeAugmentation=function(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,this.numPeopleKilled=0,this.karma=0,this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=new L.a(1e3),this.city=S.Locations.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.resleeves=[];for(let e=0;e<this.sleeves.length;++e)this.sleeves[e]instanceof P.Sleeve&&(this.sleeves[e].shock>=100?this.sleeves[e].synchronize(this):this.sleeves[e].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.updateSkillLevels(),this.hp=this.max_hp},K.prototype.prestigeSourceFile=function(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,this.numPeopleKilled=0,this.karma=0,this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=new L.a(1e3),this.city=S.Locations.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.resleeves=[],this.sleeves.length=I.SourceFileFlags[10]+this.sleevesFromCovenant;for(let e=0;e<this.sleeves.length;++e)this.sleeves[e]=new P.Sleeve(this);this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.hacknetNodes.length=0,this.gang=null,Object(O.d)(),this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.corporation=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.moneySourceB.reset(),this.updateSkillLevels(),this.hp=this.max_hp},K.prototype.getCurrentServer=function(){return A.AllServers[this.currentServer]},K.prototype.getHomeComputer=function(){return A.AllServers[this.homeComputer]},K.prototype.getUpgradeHomeRamCost=function(){const e=this.getHomeComputer().maxRam,t=Math.log2(e),n=Math.pow(1.58,t);return e*_.CONSTANTS.BaseCostFor1GBOfRamHome*n*s.BitNodeMultipliers.HomeComputerRamCost},K.prototype.receiveInvite=function(e){this.factionInvitations.includes(e)||this.factions.includes(e)||(this.firstFacInvRecvd=!0,this.factionInvitations.push(e))},K.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},K.prototype.updateSkillLevels=function(){this.hacking_skill=Math.max(1,Math.floor(this.calculateSkill(this.hacking_exp,this.hacking_mult*s.BitNodeMultipliers.HackingLevelMultiplier))),this.strength=Math.max(1,Math.floor(this.calculateSkill(this.strength_exp,this.strength_mult*s.BitNodeMultipliers.StrengthLevelMultiplier))),this.defense=Math.max(1,Math.floor(this.calculateSkill(this.defense_exp,this.defense_mult*s.BitNodeMultipliers.DefenseLevelMultiplier))),this.dexterity=Math.max(1,Math.floor(this.calculateSkill(this.dexterity_exp,this.dexterity_mult*s.BitNodeMultipliers.DexterityLevelMultiplier))),this.agility=Math.max(1,Math.floor(this.calculateSkill(this.agility_exp,this.agility_mult*s.BitNodeMultipliers.AgilityLevelMultiplier))),this.charisma=Math.max(1,Math.floor(this.calculateSkill(this.charisma_exp,this.charisma_mult*s.BitNodeMultipliers.CharismaLevelMultiplier))),this.intelligence>0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),$.hp=Math.round(this.max_hp*e)},K.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},K.prototype.hasProgram=function(e){var t=$.getHomeComputer();if(null==t)return!1;for(var n=0;n<t.programs.length;++n)if(e.toLowerCase()==t.programs[n].toLowerCase())return!0;return!1},K.prototype.setMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.setMoney()"):this.money=e},K.prototype.gainMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainMoney()"):this.money=this.money.plus(e)},K.prototype.loseMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.loseMoney()"):this.money=this.money.minus(e)},K.prototype.canAfford=function(e){return isNaN(e)?(console.error("NaN passed into Player.canAfford()"),!1):this.money.gte(e)},K.prototype.recordMoneySource=function(e,t){this.moneySourceA instanceof B.MoneySourceTracker||(console.warn("Player.moneySourceA was not properly initialized. Resetting"),this.moneySourceA=new B.MoneySourceTracker),this.moneySourceB instanceof B.MoneySourceTracker||(console.warn("Player.moneySourceB was not properly initialized. Resetting"),this.moneySourceB=new B.MoneySourceTracker),this.moneySourceA.record(e,t),this.moneySourceB.record(e,t)},K.prototype.gainHackingExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainHackingExp()"):(this.hacking_exp+=e,this.hacking_exp<0&&(this.hacking_exp=0))},K.prototype.gainStrengthExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainStrengthExp()"):(this.strength_exp+=e,this.strength_exp<0&&(this.strength_exp=0))},K.prototype.gainDefenseExp=function(e){isNaN(e)?console.log("ERR: NaN passed into player.gainDefenseExp()"):(this.defense_exp+=e,this.defense_exp<0&&(this.defense_exp=0))},K.prototype.gainDexterityExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainDexterityExp()"):(this.dexterity_exp+=e,this.dexterity_exp<0&&(this.dexterity_exp=0))},K.prototype.gainAgilityExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainAgilityExp()"):(this.agility_exp+=e,this.agility_exp<0&&(this.agility_exp=0))},K.prototype.gainCharismaExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainCharismaExp()"):(this.charisma_exp+=e,this.charisma_exp<0&&(this.charisma_exp=0))},K.prototype.gainIntelligenceExp=function(e){isNaN(e)?console.log("ERROR: NaN passed into Player.gainIntelligenceExp()"):(M.b||this.intelligence>0)&&(this.intelligence_exp+=e)},K.prototype.queryStatFromString=function(e){const t=e.toLowerCase();return t.includes("hack")?$.hacking_skill:t.includes("str")?$.strength:t.includes("def")?$.defense:t.includes("dex")?$.dexterity:t.includes("agi")?$.agility:t.includes("cha")?$.charisma:t.includes("int")?$.intelligence:void 0},K.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.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",document.getElementById("work-in-progress-text").innerHTML=""},K.prototype.processWorkEarnings=function(e=1){const t=this.workHackExpGainRate*e,n=this.workStrExpGainRate*e,a=this.workDefExpGainRate*e,i=this.workDexExpGainRate*e,r=this.workAgiExpGainRate*e,o=this.workChaExpGainRate*e,s=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(t),this.gainStrengthExp(n),this.gainDefenseExp(a),this.gainDexterityExp(i),this.gainAgilityExp(r),this.gainCharismaExp(o),this.gainMoney(s),this.recordMoneySource(s,"work"),this.workHackExpGained+=t,this.workStrExpGained+=n,this.workDefExpGained+=a,this.workDexExpGained+=i,this.workAgiExpGained+=r,this.workChaExpGained+=o,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e,this.workMoneyGained-=this.workMoneyLossRate*e},K.prototype.startWork=function(e){this.resetWorkStatus(),this.isWorking=!0,this.companyName=e,this.workType=_.CONSTANTS.WorkTypeCompany,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=_.CONSTANTS.MillisecondsPer8Hours;var t=Object(j.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",function(){return $.finishWork(!0),!1}),E.Engine.loadWorkInProgressContent()},K.prototype.work=function(e){var t=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=_.CONSTANTS.MillisecondsPer8Hours)return this.finishWork(!1);var n=p.Companies[this.companyName],a="0";null!=n&&n instanceof u.Company?a=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`);const i=this.jobs[this.companyName];document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+i+" at "+this.companyName+" (Current Company Reputation: "+D.numeralWrapper.format(a,"0,0")+")<br><br>You have been working for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ($"+D.numeralWrapper.format(this.workMoneyGainRate*G,"0,0.00")+" / sec) <br><br>"+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workRepGainRate*G,"0,0.0000")+" / sec) reputation for this company <br><br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workHackExpGainRate*G,"0,0.0000")+" / sec) hacking exp <br><br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workStrExpGainRate*G,"0,0.0000")+" / sec) strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDefExpGainRate*G,"0,0.0000")+" / sec) defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDexExpGainRate*G,"0,0.0000")+" / sec) dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workAgiExpGainRate*G,"0,0.0000")+" / sec) agility exp <br><br> "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workChaExpGainRate*G,"0,0.0000")+" / sec) charisma exp <br><br>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."},K.prototype.finishWork=function(e,t=!1){e&&(this.workRepGained/=2),p.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();var n="You earned a total of: <br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation for the company <br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(n=e?"You worked a short shift of "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+" <br><br> Since you cancelled your work early, you only gained half of the reputation you earned. <br><br>"+n:"You worked a full shift of 8 hours! <br><br> "+n,t||Object(W.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(),t){var a="You worked a short shift of "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+", "+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation, "+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()},K.prototype.startWorkPartTime=function(e){this.resetWorkStatus(),this.isWorking=!0,this.companyName=e,this.workType=_.CONSTANTS.WorkTypeCompanyPartTime,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=_.CONSTANTS.MillisecondsPer8Hours;var t=Object(j.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",function(){return $.finishWorkPartTime(),!1}),E.Engine.loadWorkInProgressContent()},K.prototype.workPartTime=function(e){var t=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=_.CONSTANTS.MillisecondsPer8Hours)return this.finishWorkPartTime();var n=p.Companies[this.companyName],a="0";null!=n&&n instanceof u.Company?a=n.playerReputation:console.log("ERROR: Could not find Company: "+this.companyName);const i=this.jobs[this.companyName];document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+i+" at "+this.companyName+" (Current Company Reputation: "+D.numeralWrapper.format(a,"0,0")+")<br><br>You have been working for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ($"+D.numeralWrapper.format(this.workMoneyGainRate*G,"0,0.00")+" / sec) <br><br>"+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workRepGainRate*G,"0,0.0000")+" / sec) reputation for this company <br><br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workHackExpGainRate*G,"0,0.0000")+" / sec) hacking exp <br><br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workStrExpGainRate*G,"0,0.0000")+" / sec) strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDefExpGainRate*G,"0,0.0000")+" / sec) defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDexExpGainRate*G,"0,0.0000")+" / sec) dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workAgiExpGainRate*G,"0,0.0000")+" / sec) agility exp <br><br> "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workChaExpGainRate*G,"0,0.0000")+" / sec) charisma exp <br><br>You will automatically finish after working for 8 hours. You can cancel earlier if you wish, <br>and there will be no penalty because this is a part-time job."},K.prototype.finishWorkPartTime=function(e=!1){p.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();var t="You earned a total of: <br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation for the company <br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(t="You worked for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br> "+t,e||Object(W.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(),e){var n="You worked for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+", "+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation, "+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},K.prototype.startFactionWork=function(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=s.BitNodeMultipliers.FactionWorkRepGain,this.isWorking=!0,this.workType=_.CONSTANTS.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=_.CONSTANTS.MillisecondsPer20Hours;var n=Object(j.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",function(){return $.finishFactionWork(!0),!1}),E.Engine.loadWorkInProgressContent()},K.prototype.startFactionHackWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.workRepGainRate=(this.hacking_skill+this.intelligence)/_.CONSTANTS.MaxSkillLevel*this.faction_rep_mult,this.factionWorkType=_.CONSTANTS.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)},K.prototype.startFactionFieldWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.getFactionFieldWorkRepGain(),this.factionWorkType=_.CONSTANTS.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)},K.prototype.startFactionSecurityWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.getFactionSecurityWorkRepGain(),this.factionWorkType=_.CONSTANTS.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)},K.prototype.workForFaction=function(e){var t=C.Factions[this.currentWorkFactionName];switch(this.factionWorkType){case _.CONSTANTS.FactionWorkHacking:this.workRepGainRate=(this.hacking_skill+this.intelligence)/_.CONSTANTS.MaxSkillLevel*this.faction_rep_mult;break;case _.CONSTANTS.FactionWorkField:this.workRepGainRate=this.getFactionFieldWorkRepGain();break;case _.CONSTANTS.FactionWorkSecurity:this.workRepGainRate=this.getFactionSecurityWorkRepGain()}var n=1+t.favor/100;isNaN(n)&&(n=1),this.workRepGainRate*=n,this.workRepGainRate*=s.BitNodeMultipliers.FactionWorkRepGain;var a=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer20Hours&&(a=!0,e=Math.round((_.CONSTANTS.MillisecondsPer20Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.processWorkEarnings(e),a||this.timeWorked>=_.CONSTANTS.MillisecondsPer20Hours)return this.finishFactionWork(!1);document.getElementById("work-in-progress-text").innerHTML="You are currently "+this.currentWorkFactionDescription+" for your faction "+t.name+" (Current Faction Reputation: "+D.numeralWrapper.format(t.playerReputation,"0,0")+"). <br>You have been doing this for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ("+D.numeralWrapper.format(this.workMoneyGainRate*G,"0,0.00")+" / sec) <br><br>"+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workRepGainRate*G,"0,0.0000")+" / sec) reputation for this faction <br><br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workHackExpGainRate*G,"0,0.0000")+" / sec) hacking exp <br><br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workStrExpGainRate*G,"0,0.0000")+" / sec) strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDefExpGainRate*G,"0,0.0000")+" / sec) defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDexExpGainRate*G,"0,0.0000")+" / sec) dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workAgiExpGainRate*G,"0,0.0000")+" / sec) agility exp <br><br> "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workChaExpGainRate*G,"0,0.0000")+" / sec) charisma exp <br><br>You will automatically finish after working for 20 hours. You can cancel earlier if you wish.<br>There is no penalty for cancelling earlier."},K.prototype.finishFactionWork=function(e,t=!1){var n=C.Factions[this.currentWorkFactionName];n.playerReputation+=this.workRepGained,this.updateSkillLevels();var a="You worked for your faction "+n.name+" for a total of "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+" <br><br> You earned a total of: <br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation for the faction <br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(t||Object(W.dialogBoxCreate)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadFactionContent(),Object(T.a)(n.name),t){var i="You worked for your faction "+n.name+" for a total of "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+D.numeralWrapper.format(this.workRepGained,"0,0.0000")+" rep, "+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" str exp, "+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" def exp, "+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agi exp, and "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" cha exp.";return this.resetWorkStatus(),i}this.resetWorkStatus()},K.prototype.getWorkMoneyGain=function(){let e=1;const t=p.Companies[this.companyName];M.d&&(e=1+t.favor/100);const n=this.jobs[this.companyName],a=d.CompanyPositions[n];return null==a?(console.error(`Could not find CompanyPosition object for ${n}. Work salary will be 0`),0):a.baseSalary*t.salaryMultiplier*this.work_money_mult*s.BitNodeMultipliers.CompanyWorkMoney*e},K.prototype.getWorkHackExpGain=function(){const e=p.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work hack exp gain will be 0"].join(" ")),0):n.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain},K.prototype.getWorkStrExpGain=function(){const e=p.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work str exp gain will be 0"].join(" ")),0):n.strengthExpGain*e.expMultiplier*this.strength_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain},K.prototype.getWorkDefExpGain=function(){const e=p.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work def exp gain will be 0"].join(" ")),0):n.defenseExpGain*e.expMultiplier*this.defense_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain},K.prototype.getWorkDexExpGain=function(){const e=p.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work dex exp gain will be 0"].join(" ")),0):n.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain},K.prototype.getWorkAgiExpGain=function(){const e=p.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work agi exp gain will be 0"].join(" ")),0):n.agilityExpGain*e.expMultiplier*this.agility_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain},K.prototype.getWorkChaExpGain=function(){const e=p.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work cha exp gain will be 0"].join(" ")),0):n.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain},K.prototype.getWorkRepGain=function(){const e=p.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];if(null==e||null==n)return console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work rep gain will be 0"].join(" ")),0;var a=n.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);a+=this.intelligence/_.CONSTANTS.MaxSkillLevel;var i=1+e.favor/100;return isNaN(i)&&(i=1),a*this.company_rep_mult*i},K.prototype.getFactionSecurityWorkRepGain=function(){return.9*(this.hacking_skill/_.CONSTANTS.MaxSkillLevel+this.strength/_.CONSTANTS.MaxSkillLevel+this.defense/_.CONSTANTS.MaxSkillLevel+this.dexterity/_.CONSTANTS.MaxSkillLevel+this.agility/_.CONSTANTS.MaxSkillLevel)/4.5*this.faction_rep_mult},K.prototype.getFactionFieldWorkRepGain=function(){return.9*(this.hacking_skill/_.CONSTANTS.MaxSkillLevel+this.strength/_.CONSTANTS.MaxSkillLevel+this.defense/_.CONSTANTS.MaxSkillLevel+this.dexterity/_.CONSTANTS.MaxSkillLevel+this.agility/_.CONSTANTS.MaxSkillLevel+this.charisma/_.CONSTANTS.MaxSkillLevel+this.intelligence/_.CONSTANTS.MaxSkillLevel)/5.5*this.faction_rep_mult},K.prototype.startCreateProgramWork=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=_.CONSTANTS.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a<this.getHomeComputer().programs.length;++a){var i=this.getHomeComputer().programs[a];if(i.startsWith(e)&&i.endsWith("%-INC")){var r=i.split("-");if(3!=r.length)break;var o=Number(r[1].slice(0,-1));if(isNaN(o)||o<0||o>=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var s=Object(j.clearEventListeners)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",function(){return $.finishCreateProgramWork(!0),!1}),E.Engine.loadWorkInProgressContent()},K.prototype.createProgramWork=function(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t;n=1+(n-1)/5,this.timeWorked+=E.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=E.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+".<br><br> You have been working for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>The program is "+(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2)+"% complete. <br>If you cancel, your work will be saved and you can come back to complete the program later."},K.prototype.finishCreateProgramWork=function(e,t=!1){var n=this.createProgramName;if(!1===e)Object(W.dialogBoxCreate)("You've finished creating "+n+"!<br>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/_.CONSTANTS.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadTerminalContent(),this.resetWorkStatus()},K.prototype.startClass=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=_.CONSTANTS.WorkTypeStudyClass,this.className=n;var a=1e3/E.Engine._idleSpeed,i=0,r=0,o=0,l=0,c=0,u=0,p=0;switch(n){case _.CONSTANTS.ClassStudyComputerScience:r=.5*t/a;break;case _.CONSTANTS.ClassDataStructures:i=_.CONSTANTS.ClassDataStructuresBaseCost*e/a,r=1*t/a;break;case _.CONSTANTS.ClassNetworks:i=_.CONSTANTS.ClassNetworksBaseCost*e/a,r=2*t/a;break;case _.CONSTANTS.ClassAlgorithms:i=_.CONSTANTS.ClassAlgorithmsBaseCost*e/a,r=4*t/a;break;case _.CONSTANTS.ClassManagement:i=_.CONSTANTS.ClassManagementBaseCost*e/a,p=2*t/a;break;case _.CONSTANTS.ClassLeadership:i=_.CONSTANTS.ClassLeadershipBaseCost*e/a,p=4*t/a;break;case _.CONSTANTS.ClassGymStrength:i=_.CONSTANTS.ClassGymBaseCost*e/a,o=1*t/a;break;case _.CONSTANTS.ClassGymDefense:i=_.CONSTANTS.ClassGymBaseCost*e/a,l=1*t/a;break;case _.CONSTANTS.ClassGymDexterity:i=_.CONSTANTS.ClassGymBaseCost*e/a,c=1*t/a;break;case _.CONSTANTS.ClassGymAgility:i=_.CONSTANTS.ClassGymBaseCost*e/a,u=1*t/a;break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=i,this.workHackExpGainRate=r*this.hacking_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workStrExpGainRate=o*this.strength_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workChaExpGainRate=p*this.charisma_exp_mult*s.BitNodeMultipliers.ClassGymExpGain;var m=Object(j.clearEventListeners)("work-in-progress-cancel-button");n==_.CONSTANTS.ClassGymStrength||n==_.CONSTANTS.ClassGymDefense||n==_.CONSTANTS.ClassGymDexterity||n==_.CONSTANTS.ClassGymAgility?m.innerHTML="Stop training at gym":m.innerHTML="Stop taking course",m.addEventListener("click",function(){return $.finishClass(),!1}),E.Engine.loadWorkInProgressContent()},K.prototype.takeClass=function(e){this.timeWorked+=E.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e),document.getElementById("work-in-progress-text").innerHTML="You have been "+t+" for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>This has cost you: <br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ($"+D.numeralWrapper.format(this.workMoneyLossRate*G,"0,0.00")+" / sec) <br><br>You have gained: <br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workHackExpGainRate*G,"0,0.0000")+" / sec) hacking exp <br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workStrExpGainRate*G,"0,0.0000")+" / sec) strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDefExpGainRate*G,"0,0.0000")+" / sec) defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workDexExpGainRate*G,"0,0.0000")+" / sec) dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workAgiExpGainRate*G,"0,0.0000")+" / sec) agility exp <br>"+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+D.numeralWrapper.format(this.workChaExpGainRate*G,"0,0.0000")+" / sec) charisma exp <br>You may cancel at any time"},K.prototype.finishClass=function(e=!1){if(this.gainIntelligenceExp(_.CONSTANTS.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");this.updateSkillLevels();var t="After "+this.className+" for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+", <br>you spent a total of $"+D.numeralWrapper.format(-1*this.workMoneyGained,"0,0.00")+". <br><br>You earned a total of: <br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(e||Object(W.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(),e){var n="After "+this.className+" for "+Object(H.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of $"+D.numeralWrapper.format(-1*this.workMoneyGained,"0,0.00")+". You earned a total of: "+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},K.prototype.startCrime=function(e,t,n,a,i,r,o,l,c,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.workType=_.CONSTANTS.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=t*this.hacking_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workStrExpGained=n*this.strength_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDefExpGained=a*this.defense_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDexExpGained=i*this.dexterity_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workAgiExpGained=r*this.agility_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*s.BitNodeMultipliers.CrimeMoney,this.timeNeededToCompleteWork=c;var p=Object(j.clearEventListeners)("work-in-progress-cancel-button");p.innerHTML="Cancel crime",p.addEventListener("click",function(){return $.finishCrime(!0),!1}),E.Engine.loadWorkInProgressContent()},K.prototype.commitCrime=function(e){if(this.timeWorked+=E.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),n=Math.round(t/5);n<0&&(n=0),n>20&&(n=20);var a="["+Array(n+1).join("|")+Array(20-n+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".<br>Time remaining: "+Object(H.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"<br>"+a.replace(/ /g," ")}},K.prototype.finishCrime=function(e){if(!e){if(Object(b.determineCrimeSuccess)($,this.crimeType)){let e=null;for(const t in v.Crimes)if(v.Crimes[t].type==this.crimeType){e=v.Crimes[t];break}null==e&&(console.log(this.crimeType),Object(W.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer")),$.gainMoney(this.workMoneyGained),$.recordMoneySource(this.workMoneyGained,"crime"),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+D.numeralWrapper.format(this.workMoneyGained,"$0.000a")+", "+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" str exp, "+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" def exp, "+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(W.dialogBoxCreate)("Crime successful! <br><br>You gained:<br>$"+D.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking experience <br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength experience<br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense experience<br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity experience<br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility experience<br>"+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" 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 "+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" str exp, "+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" def exp, "+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(W.dialogBoxCreate)("Crime failed! <br><br>You gained:<br>"+D.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking experience <br>"+D.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength experience<br>"+D.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense experience<br>"+D.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity experience<br>"+D.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility experience<br>"+D.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma experience");this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),E.Engine.loadLocationContent()},K.prototype.singularityStopWork=function(){if(!this.isWorking)return"";var e;switch(this.workType){case _.CONSTANTS.WorkTypeStudyClass:e=this.finishClass(!0);break;case _.CONSTANTS.WorkTypeCompany:e=this.finishWork(!0,!0);break;case _.CONSTANTS.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case _.CONSTANTS.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case _.CONSTANTS.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0,!0);break;case _.CONSTANTS.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.log("ERROR: Unrecognized work type"),""}return e},K.prototype.takeDamage=function(e){if("number"==typeof e)return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0);console.warn(`Player.takeDamage() called without a numeric argument: ${e}`)},K.prototype.regenerateHp=function(e){"number"==typeof e?(this.hp+=e,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn(`Player.regenerateHp() called without a numeric argument: ${e}`)},K.prototype.hospitalize=function(){!1===x.Settings.SuppressHospitalizationPopup&&Object(W.dialogBoxCreate)("You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged "+D.numeralWrapper.format(this.max_hp*_.CONSTANTS.HospitalCostPerHp,"$0.000a")),this.loseMoney(this.max_hp*_.CONSTANTS.HospitalCostPerHp),this.hp=this.max_hp},K.prototype.applyForJob=function(e,t=!1){let n=null;""!==this.companyName&&(n=p.Companies[this.companyName]);const a=this.jobs[this.companyName],i=p.Companies[this.location];if(!(i instanceof u.Company))return t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let r=e;if(!this.isQualified(i,r)){var o=Object(h.getJobRequirementText)(i,r);return!t&&void Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position<br>"+o)}for(;;){let e=Object(m.getNextCompanyPosition)(r);if(null==e)break;if(!i.hasPosition(e))break;if(!this.isQualified(i,e))break;r=e}if(null==n||n.name!=i.name||r.name!=a){if(this.companyName=i.name,this.jobs[i.name]=r.name,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),t)return!0;Object(W.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+r.name+"!"),E.Engine.loadLocationContent()}else{var s=Object(m.getNextCompanyPosition)(r);if(null==s){if(t)return!1;Object(W.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(i.hasPosition(s)){if(t)return!1;o=Object(h.getJobRequirementText)(i,s);Object(W.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion<br>"+o)}else{if(t)return!1;Object(W.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}},K.prototype.getNextCompanyPosition=function(e,t){var n=null;if(""!==this.companyName&&(n=p.Companies[this.companyName]),null==n||n.name!=e.name)return t;const a=this.jobs[this.companyName],i=d.CompanyPositions[a];return i.isSoftwareJob()&&t.isSoftwareJob()||i.isITJob()&&t.isITJob()||i.isBusinessJob()&&t.isBusinessJob()||i.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||i.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||i.isSecurityJob()&&t.isSecurityJob()||i.isAgentJob()&&t.isAgentJob()||i.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||i.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||i.isPartTimeJob()&&t.isPartTimeJob()?Object(m.getNextCompanyPosition)(i):t},K.prototype.applyForSoftwareJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.SoftwareCompanyPositions[0]],e)},K.prototype.applyForSoftwareConsultantJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.SoftwareConsultantCompanyPositions[0]],e)},K.prototype.applyForItJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.ITCompanyPositions[0]],e)},K.prototype.applyForSecurityEngineerJob=function(e=!1){var t=p.Companies[this.location];return this.isQualified(t,d.CompanyPositions[g.SecurityEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[g.SecurityEngineerCompanyPositions[0]],e):!e&&void Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position")},K.prototype.applyForNetworkEngineerJob=function(e=!1){var t=p.Companies[this.location];return this.isQualified(t,d.CompanyPositions[g.NetworkEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[g.NetworkEngineerCompanyPositions[0]],e):!e&&void Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position")},K.prototype.applyForBusinessJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.BusinessCompanyPositions[0]],e)},K.prototype.applyForBusinessConsultantJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.BusinessConsultantCompanyPositions[0]],e)},K.prototype.applyForSecurityJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.SecurityCompanyPositions[2]],e)},K.prototype.applyForAgentJob=function(e=!1){var t=p.Companies[this.location];return this.isQualified(t,d.CompanyPositions[g.AgentCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[g.AgentCompanyPositions[0]],e):!e&&void Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position")},K.prototype.applyForEmployeeJob=function(e=!1){var t=p.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[g.MiscCompanyPositions[1]])){if(this.companyName=t.name,this.jobs[t.name]=g.MiscCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(W.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName),E.Engine.loadLocationContent()}else{if(e)return!1;Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},K.prototype.applyForPartTimeEmployeeJob=function(e=!1){var t=p.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[g.PartTimeCompanyPositions[1]])){if(this.companyName=t.name,this.jobs[t.name]=g.PartTimeCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(W.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName),E.Engine.loadLocationContent()}else{if(e)return!1;Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},K.prototype.applyForWaiterJob=function(e=!1){var t=p.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[g.MiscCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=g.MiscCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(W.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName),E.Engine.loadLocationContent()}else{if(e)return!1;Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},K.prototype.applyForPartTimeWaiterJob=function(e=!1){var t=p.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[g.PartTimeCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=g.PartTimeCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(W.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName),E.Engine.loadLocationContent()}else{if(e)return!1;Object(W.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},K.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},K.prototype.reapplyAllAugmentations=function(e=!0){console.log("Re-applying augmentations"),e&&this.resetMultipliers();for(let e=0;e<this.augmentations.length;++e){"HacknetNode NIC Architecture Neural-Upload"===this.augmentations[e].name&&(this.augmentations[e].name="Hacknet Node NIC Architecture Neural-Upload");const n=this.augmentations[e].name;var t=a.Augmentations[n];if(null!=t)if(t.owned=!0,t.name!=o.AugmentationNames.NeuroFluxGovernor)Object(i.a)(this.augmentations[e],!0);else for(let n=0;n<t.level;++n)Object(i.a)(this.augmentations[e],!0);else console.log(`WARNING: Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${n} will be skipped`)}},K.prototype.reapplyAllSourceFiles=function(){console.log("Re-applying source files");for(let t=0;t<this.sourceFiles.length;++t){var e="SourceFile"+this.sourceFiles[t].n;null!=N.a[e]?Object(N.b)(this.sourceFiles[t]):console.log("ERROR: Invalid source file number: "+this.sourceFiles[t].n)}},K.prototype.checkForFactionInvitations=function(){let e=[];var t=this.augmentations.length;const n=Object.keys(this.jobs),a=Object.values(this.jobs);function i(e,t=_.CONSTANTS.CorpFactionRepRequirement){return n.includes(e)&&function(e){const t=p.Companies[e];return null==t?0:t.playerReputation}(e)>t}var r=C.Factions.Illuminati;!r.isBanned&&!r.isMember&&!r.alreadyInvited&&t>=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(r);var o=C.Factions.Daedalus;!o.isBanned&&!o.isMember&&!o.alreadyInvited&&t>=Math.round(30*s.BitNodeMultipliers.DaedalusAugsRequirement)&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(o);var l=C.Factions["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=20&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=C.Factions.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!i(S.Locations.AevumECorp)||e.push(c);var u=C.Factions.MegaCorp;u.isBanned||u.isMember||u.alreadyInvited||!i(S.Locations.Sector12MegaCorp)||e.push(u);var m=C.Factions["Bachman & Associates"];m.isBanned||m.isMember||m.alreadyInvited||!i(S.Locations.AevumBachmanAndAssociates)||e.push(m);var h=C.Factions["Blade Industries"];h.isBanned||h.isMember||h.alreadyInvited||!i(S.Locations.Sector12BladeIndustries)||e.push(h);var d=C.Factions.NWO;d.isBanned||d.isMember||d.alreadyInvited||!i(S.Locations.VolhavenNWO)||e.push(d);var g=C.Factions["Clarke Incorporated"];g.isBanned||g.isMember||g.alreadyInvited||!i(S.Locations.AevumClarkeIncorporated)||e.push(g);var f=C.Factions["OmniTek Incorporated"];f.isBanned||f.isMember||f.alreadyInvited||!i(S.Locations.VolhavenOmniTekIncorporated)||e.push(f);var y=C.Factions["Four Sigma"];y.isBanned||y.isMember||y.alreadyInvited||!i(S.Locations.Sector12FourSigma)||e.push(y);var b=C.Factions["KuaiGong International"];b.isBanned||b.isMember||b.alreadyInvited||!i(S.Locations.ChongqingKuaiGongInternational)||e.push(b);var v=C.Factions["Fulcrum Secret Technologies"],E=A.AllServers[R.SpecialServerIps[R.SpecialServerNames.FulcrumSecretTechnologies]];null==E?console.log("ERROR: Could not find Fulcrum Secret Technologies Server"):v.isBanned||v.isMember||v.alreadyInvited||!E.manuallyHacked||!i(S.Locations.AevumFulcrumTechnologies,25e4)||e.push(v);var k=C.Factions.BitRunners,T=this.getHomeComputer(),O=A.AllServers[R.SpecialServerIps[R.SpecialServerNames.BitRunnersServer]];null==O?console.log("ERROR: Could not find BitRunners Server"):!k.isBanned&&!k.isMember&&O.manuallyHacked&&!k.alreadyInvited&&this.hacking_skill>=500&&T.maxRam>=128&&e.push(k);var M=C.Factions["The Black Hand"],P=A.AllServers[R.SpecialServerIps[R.SpecialServerNames.TheBlackHandServer]];null==P?console.log("ERROR: Could not find The Black Hand Server"):!M.isBanned&&!M.isMember&&P.manuallyHacked&&!M.alreadyInvited&&this.hacking_skill>=350&&T.maxRam>=64&&e.push(M);var w=C.Factions.NiteSec,x=A.AllServers[R.SpecialServerIps[R.SpecialServerNames.NiteSecServer]];null==x?console.log("ERROR: Could not find NiteSec Server"):!w.isBanned&&!w.isMember&&x.manuallyHacked&&!w.alreadyInvited&&this.hacking_skill>=200&&T.maxRam>=32&&e.push(w);var N=C.Factions.Chongqing;N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(2e7)||this.city!=S.Locations.Chongqing||e.push(N);var I=C.Factions["Sector-12"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(15e6)||this.city!=S.Locations.Sector12||e.push(I);var L=C.Factions["New Tokyo"];L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(2e7)||this.city!=S.Locations.NewTokyo||e.push(L);var D=C.Factions.Aevum;D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(4e7)||this.city!=S.Locations.Aevum||e.push(D);var B=C.Factions.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=S.Locations.Ishima||e.push(B);var W=C.Factions.Volhaven;W.isBanned||W.isMember||W.alreadyInvited||!this.money.gte(5e7)||this.city!=S.Locations.Volhaven||e.push(W);var j=C.Factions["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&&!n.includes(S.Locations.Sector12CIA)&&!n.includes(S.Locations.Sector12NSA)&&e.push(j);var F=C.Factions["The Dark Army"];!F.isBanned&&!F.isMember&&!F.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==S.Locations.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!n.includes(S.Locations.Sector12CIA)&&!n.includes(S.Locations.Sector12NSA)&&e.push(F);var U=C.Factions["The Syndicate"];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==S.Locations.Aevum||this.city==S.Locations.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!n.includes(S.Locations.Sector12CIA)&&!n.includes(S.Locations.Sector12NSA)&&e.push(U);var H=C.Factions.Silhouette;!H.isBanned&&!H.isMember&&!H.alreadyInvited&&(a.includes("Chief Technology Officer")||a.includes("Chief Financial Officer")||a.includes("Chief Executive Officer"))&&this.money.gte(15e6)&&this.karma<=-22&&e.push(H);var G=C.Factions.Tetrads;!G.isBanned&&!G.isMember&&!G.alreadyInvited&&(this.city==S.Locations.Chongqing||this.city==S.Locations.NewTokyo||this.city==S.Locations.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(G);var K=C.Factions["Slum Snakes"];!K.isBanned&&!K.isMember&&!K.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(K);for(var q=C.Factions.Netburners,$=0,Y=0,z=0,V=0;V<this.hacknetNodes.length;++V)z+=this.hacknetNodes[V].level,$+=this.hacknetNodes[V].ram,Y+=this.hacknetNodes[V].cores;!q.isBanned&&!q.isMember&&!q.alreadyInvited&&this.hacking_skill>=80&&$>=8&&Y>=4&&z>=100&&e.push(q);var J=C.Factions["Tian Di Hui"];J.isBanned||J.isMember||J.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=S.Locations.Chongqing&&this.city!=S.Locations.NewTokyo&&this.city!=S.Locations.Ishima||e.push(J);var X=C.Factions.CyberSec,Q=A.AllServers[R.SpecialServerIps[R.SpecialServerNames.CyberSecServer]];return null==Q?console.log("ERROR: Could not find CyberSec Server"):!X.isBanned&&!X.isMember&&Q.manuallyHacked&&!X.alreadyInvited&&this.hacking_skill>=50&&e.push(X),e},K.prototype.inGang=function(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof O.b},K.prototype.startGang=function(e,t){this.gang=new O.b(e,t)},K.prototype.hasCorporation=function(){return null!=this.corporation&&this.corporation instanceof f.c},K.prototype.inBladeburner=function(){return null!=this.bladeburner&&this.bladeburner instanceof l.a},K.prototype.setBitNodeNumber=function(e){this.bitNodeN=e},K.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 r.PlayerOwnedAugmentation(e))},K.prototype.gainCodingContractReward=function(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case c.CodingContractRewardType.FactionReputation:if(null==e.name||!(C.Factions[e.name]instanceof k.Faction))return e.type=c.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);var n=_.CONSTANTS.CodingContractBaseFactionRepGain*t;return C.Factions[e.name].playerReputation+=n,`Gained ${n} faction reputation for ${e.name}`;case c.CodingContractRewardType.FactionReputationAll:const r=_.CONSTANTS.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var a=this.factions.slice();if(0==(a=a.filter(e=>!o.includes(e))).length)return e.type=c.CodingContractRewardType.Money,this.gainCodingContractReward(e,t);const l=Math.floor(r/a.length);for(const e of a)C.Factions[e]instanceof k.Faction&&(C.Factions[e].playerReputation+=l);return`Gained ${l} reputation for each of the following factions: ${a.toString()}`;case c.CodingContractRewardType.CompanyReputation:if(null==e.name||!(p.Companies[e.name]instanceof u.Company))return e.type=c.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);n=_.CONSTANTS.CodingContractBaseCompanyRepGain*t;return p.Companies[e.name].playerReputation+=n,`Gained ${n} company reputation for ${e.name}`;case c.CodingContractRewardType.Money:default:var i=_.CONSTANTS.CodingContractBaseMoneyGain*t*s.BitNodeMultipliers.CodingContractMoney;return this.gainMoney(i),this.recordMoneySource(i,"codingcontract"),`Gained ${D.numeralWrapper.format(i,"$0.000a")}`}},K.prototype.toJSON=function(){return Object(U.Generic_toJSON)("PlayerObject",this)},K.fromJSON=function(e){return Object(U.Generic_fromJSON)(K,e.data)},U.Reviver.constructors.PlayerObject=K;let $=new K},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS={Version:"0.45.1",MaxSkillLevel:975,MilliPerCycle:200,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,DonateMoneyToRepDivisor:1e6,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptWhileRamCost:0,ScriptForRamCost:0,ScriptIfRamCost:0,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,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,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:1,ScriptSingularityFn2RamCost:2,ScriptSingularityFn3RamCost:3,ScriptSingularityFnRamMult:2,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4,NumNetscriptPorts:20,HomeComputerMaxRam:1073741824,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,MarketData4SCost:1e9,MarketDataTixApi4SCost:25e9,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.<br><br>In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.<br><br>Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:<br><br> Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.<br><br>To capture a Node, you must lower its HP down to 0.<br><br>There are six different types of Nodes:<br><br>CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions<br><br>Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions<br><br>Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action<br><br>Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.<br><br>For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.<br><br>Other Notes:<br><br>-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.<br><br>-Whenever a Node is conquered, its stats are significantly reduced<br><br>-Miscellaneous Nodes slowly raise their defense over time<br><br>-Nodes slowly regenerate health over time.",MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:75e6,TotalNumBitNodes:24,LatestUpdate:"\n v0.45.1\n * Added two new Corporation Researches\n * General UI improvements (by hydroflame and koriar)\n * Bug Fix: Sleeve Netscript API should no longer cause Dynamic RAM errors\n * Bug Fix: sleeve.getSleeveStats() should now work properly\n\n v0.45.0\n * Corporation changes:\n ** Decreased the time of a full market cycle from 15 seconds to 10 seconds.\n ** This means that each Corporation 'state' will now only take 2 seconds, rather than 3\n ** Increased initial salaries for newly-hired employees\n ** Increased the cost multiplier for upgrading office size (the cost will increase faster)\n ** The stats of your employees now has a slightly larger effect on production & sales\n ** Added several new Research upgrades\n ** Market-TA research now allows you to automatically set sale price at optimal values\n ** Market-TA research now works for Products (not just Materials)\n ** Reduced the amount of Scientific Research needed to unlock the Hi-Tech R&D Laboratory from 10k to 5k\n ** Energy Material requirement of the Software industry reduced from 1 to 0.5\n ** It is now slightly easier to increase the Software industry's production multiplier\n ** Industries now have a maximum number of allowed products, starting at 3. This can be increased through research.\n ** You can now see an approximation of how each material affects an industry's production multiplier by clicking the \"?\" help tip next to it\n ** Significantly changed the effects of the different employee positions. See updated descriptions\n ** Reduced the amount of money you gain from private investors\n ** Training employees is now 3x more effective\n ** Bug Fix: An industry's products are now properly separated between different cities\n * The QLink Augemntation is now significantly stronger, but also significantly more expensive (by hydroflame)\n * Added a Netscript API for Duplicate Sleeves (by hydroflame)\n * Modified the multipliers of BitNode-3 and BitNode-8 to make them slightly harder\n * After installing Augmentations, Duplicate Sleeves will now default to Synchronize if their Shock is 0\n * Bug Fix: Bladeburner's Hyperbolic Regeneration Chamber should no longer instantly refill all stamina\n * Bug Fix: growthAnalyze() function now properly accounts for BitNode multipliers\n * Bug Fix: The cost of purchasing Augmentations for Duplicate Sleeves no longer scales with how many Augs you've purchased for yourself\n "}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(105);n(446),n(445),n(444),n(443),n(442),n(441),n(440),n(439),n(438),n(437),n(436),n(435),n(434),n(433);t.numeralWrapper=new class{constructor(){this.defaultLocale="en",this.defaultLocale="en"}updateLocale(e){return null!=a.locale(e)||(console.warn(`Invalid locale for numeral: ${e}`),a.locale(this.defaultLocale),!1)}format(e,t){return Math.abs(e)<1e-6&&(e=0),a(e).format(t)}formatBigNumber(e){return this.format(e,"0.000a")}formatMoney(e){return this.format(e,"$0.000a")}formatPercentage(e,t=2){const n="0."+"0".repeat(t)+"%";return this.format(e,n)}}},function(e,t,n){"use strict";function a(e,t={}){const n=document.createElement(e);return void 0!==t.id&&(n.id=t.id),void 0!==t.class&&(n.className=t.class),void 0!==t.innerHTML&&(n.innerHTML=t.innerHTML),void 0!==t.innerText&&(n.innerText=t.innerText),void 0!==t.tabIndex&&(n.tabIndex=t.tabIndex),function(e,t){void 0!==t.text&&(e.text=t.text),void 0!==t.href&&(e.href=t.href),void 0!==t.target&&(e.target=t.target)}(n,t),function(e,t){void 0!==t.name&&(e.name=t.name),void 0!==t.value&&(e.value=t.value),void 0!==t.type&&(e.type=t.type),void 0!==t.checked&&(e.checked=t.checked),void 0!==t.pattern&&(e.pattern=t.pattern),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.placeholder&&(e.placeholder=t.placeholder),void 0!==t.max&&(e.max=t.max),void 0!==t.min&&(e.min=t.min),void 0!==t.step&&(e.step=t.step)}(n,t),function(e,t){void 0!==t.for&&(e.htmlFor=t.for)}(n,t),function(e,t){void 0!==t.clickListener&&e.addEventListener("click",t.clickListener),void 0!==t.inputListener&&e.addEventListener("input",t.inputListener),void 0!==t.changeListener&&e.addEventListener("change",t.changeListener),void 0!==t.onkeyup&&e.addEventListener("keyup",t.onkeyup),void 0!==t.onkeydown&&e.addEventListener("keydown",t.onkeydown),void 0!==t.onfocus&&e.addEventListener("focus",t.onfocus)}(n,t),function(e,t){void 0!==t.display&&(e.style.display=t.display),void 0!==t.visibility&&(e.style.visibility=t.visibility),void 0!==t.margin&&(e.style.margin=t.margin),void 0!==t.marginLeft&&(e.style.marginLeft=t.marginLeft),void 0!==t.marginTop&&(e.style.marginTop=t.marginTop),void 0!==t.padding&&(e.style.padding=t.padding),void 0!==t.color&&(e.style.color=t.color),void 0!==t.border&&(e.style.border=t.border),void 0!==t.float&&(e.style.cssFloat=t.float),void 0!==t.fontSize&&(e.style.fontSize=t.fontSize),void 0!==t.whiteSpace&&(e.style.whiteSpace=t.whiteSpace),void 0!==t.width&&(e.style.width=t.width),void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.position&&(e.style.position=t.position),void 0!==t.overflow&&(e.style.overflow=t.overflow)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(a("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationNames={Targeting1:"Augmented Targeting I",Targeting2:"Augmented Targeting II",Targeting3:"Augmented Targeting III",SyntheticHeart:"Synthetic Heart",SynfibrilMuscle:"Synfibril Muscle",CombatRib1:"Combat Rib I",CombatRib2:"Combat Rib II",CombatRib3:"Combat Rib III",NanofiberWeave:"Nanofiber Weave",SubdermalArmor:"NEMEAN Subdermal Weave",WiredReflexes:"Wired Reflexes",GrapheneBoneLacings:"Graphene Bone Lacings",BionicSpine:"Bionic Spine",GrapheneBionicSpine:"Graphene Bionic Spine Upgrade",BionicLegs:"Bionic Legs",GrapheneBionicLegs:"Graphene Bionic Legs Upgrade",SpeechProcessor:"Speech Processor Implant",TITN41Injection:"TITN-41 Gene-Modification Injection",EnhancedSocialInteractionImplant:"Enhanced Social Interaction Implant",BitWire:"BitWire",ArtificialBioNeuralNetwork:"Artificial Bio-neural Network Implant",ArtificialSynapticPotentiation:"Artificial Synaptic Potentiation",EnhancedMyelinSheathing:"Enhanced Myelin Sheathing",SynapticEnhancement:"Synaptic Enhancement Implant",NeuralRetentionEnhancement:"Neural-Retention Enhancement",DataJack:"DataJack",ENM:"Embedded Netburner Module",ENMCore:"Embedded Netburner Module Core Implant",ENMCoreV2:"Embedded Netburner Module Core V2 Upgrade",ENMCoreV3:"Embedded Netburner Module Core V3 Upgrade",ENMAnalyzeEngine:"Embedded Netburner Module Analyze Engine",ENMDMA:"Embedded Netburner Module Direct Memory Access Upgrade",Neuralstimulator:"Neuralstimulator",NeuralAccelerator:"Neural Accelerator",CranialSignalProcessorsG1:"Cranial Signal Processors - Gen I",CranialSignalProcessorsG2:"Cranial Signal Processors - Gen II",CranialSignalProcessorsG3:"Cranial Signal Processors - Gen III",CranialSignalProcessorsG4:"Cranial Signal Processors - Gen IV",CranialSignalProcessorsG5:"Cranial Signal Processors - Gen V",NeuronalDensification:"Neuronal Densification",NuoptimalInjectorImplant:"Nuoptimal Nootropic Injector Implant",SpeechEnhancement:"Speech Enhancement",FocusWire:"FocusWire",PCDNI:"PC Direct-Neural Interface",PCDNIOptimizer:"PC Direct-Neural Interface Optimization Submodule",PCDNINeuralNetwork:"PC Direct-Neural Interface NeuroNet Injector",ADRPheromone1:"ADR-V1 Pheromone Gene",ADRPheromone2:"ADR-V2 Pheromone Gene",HacknetNodeCPUUpload:"Hacknet Node CPU Architecture Neural-Upload",HacknetNodeCacheUpload:"Hacknet Node Cache Architecture Neural-Upload",HacknetNodeNICUpload:"Hacknet Node NIC Architecture Neural-Upload",HacknetNodeKernelDNI:"Hacknet Node Kernel Direct-Neural Interface",HacknetNodeCoreDNI:"Hacknet Node Core Direct-Neural Interface",NeuroFluxGovernor:"NeuroFlux Governor",Neurotrainer1:"Neurotrainer I",Neurotrainer2:"Neurotrainer II",Neurotrainer3:"Neurotrainer III",Hypersight:"HyperSight Corneal Implant",LuminCloaking1:"LuminCloaking-V1 Skin Implant",LuminCloaking2:"LuminCloaking-V2 Skin Implant",HemoRecirculator:"HemoRecirculator",SmartSonar:"SmartSonar Implant",PowerRecirculator:"Power Recirculation Core",QLink:"QLink",TheRedPill:"The Red Pill",SPTN97:"SPTN-97 Gene Modification",HiveMind:"ECorp HVMind Implant",CordiARCReactor:"CordiARC Fusion Reactor",SmartJaw:"SmartJaw",Neotra:"Neotra",Xanipher:"Xanipher",nextSENS:"nextSENS Gene Modification",OmniTekInfoLoad:"OmniTek InfoLoad",PhotosyntheticCells:"Photosynthetic Cells",Neurolink:"BitRunners Neurolink",TheBlackHand:"The Black Hand",CRTX42AA:"CRTX42-AA Gene Modification",Neuregen:"Neuregen Gene Modification",CashRoot:"CashRoot Starter Kit",NutriGen:"NutriGen Implant",INFRARet:"INFRARET Enhancement",DermaForce:"DermaForce Particle Barrier",GrapheneBrachiBlades:"Graphene BranchiBlades Upgrade",GrapheneBionicArms:"Graphene Bionic Arms Upgrade",BrachiBlades:"BrachiBlades",BionicArms:"Bionic Arms",SNA:"Social Negotiation Assistant (S.N.A)",EsperEyewear:"EsperTech Bladeburner Eyewear",EMS4Recombination:"EMS-4 Recombination",OrionShoulder:"ORION-MKIV Shoulder",HyperionV1:"Hyperion Plasma Cannon V1",HyperionV2:"Hyperion Plasma Cannon V2",GolemSerum:"GOLEM Serum",VangelisVirus:"Vangelis Virus",VangelisVirus3:"Vangelis Virus 3.0",INTERLINKED:"I.N.T.E.R.L.I.N.K.E.D",BladeRunner:"Blade's Runners",BladeArmor:"BLADE-51b Tesla Armor",BladeArmorPowerCells:"BLADE-51b Tesla Armor: Power Cells Upgrade",BladeArmorEnergyShielding:"BLADE-51b Tesla Armor: Energy Shielding Upgrade",BladeArmorUnibeam:"BLADE-51b Tesla Armor: Unibeam Upgrade",BladeArmorOmnibeam:"BLADE-51b Tesla Armor: Omnibeam Upgrade",BladeArmorIPU:"BLADE-51b Tesla Armor: IPU Upgrade",BladesSimulacrum:"The Blade's Simulacrum"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Locations={Aevum:"Aevum",Chongqing:"Chongqing",Ishima:"Ishima",NewTokyo:"New Tokyo",Sector12:"Sector-12",Volhaven:"Volhaven",AevumAeroCorp:"AeroCorp",AevumBachmanAndAssociates:"Bachman & Associates",AevumClarkeIncorporated:"Clarke Incorporated",AevumCrushFitnessGym:"Crush Fitness Gym",AevumECorp:"ECorp",AevumFulcrumTechnologies:"Fulcrum Technologies",AevumGalacticCybersystems:"Galactic Cybersystems",AevumNetLinkTechnologies:"NetLink Technologies",AevumPolice:"Aevum Police Headquarters",AevumRhoConstruction:"Rho Construction",AevumSlums:"Aevum Slums",AevumSnapFitnessGym:"Snap Fitness Gym",AevumSummitUniversity:"Summit University",AevumTravelAgency:"Aevum Travel Agency",AevumWatchdogSecurity:"Watchdog Security",ChongqingKuaiGongInternational:"KuaiGong International",ChongqingSlums:"Chongqing Slums",ChongqingSolarisSpaceSystems:"Solaris Space Systems",ChongqingTravelAgency:"Chongqing Travel Agency",Sector12AlphaEnterprises:"Alpha Enterprises",Sector12BladeIndustries:"Blade Industries",Sector12CIA:"Central Intelligence Agency",Sector12CarmichaelSecurity:"Carmichael Security",Sector12CityHall:"Sector-12 City Hall",Sector12DeltaOne:"DeltaOne",Sector12FoodNStuff:"FoodNStuff",Sector12FourSigma:"Four Sigma",Sector12IcarusMicrosystems:"Icarus Microsystems",Sector12IronGym:"Iron Gym",Sector12JoesGuns:"Joe's Guns",Sector12MegaCorp:"MegaCorp",Sector12NSA:"National Security Agency",Sector12PowerhouseGym:"Powerhouse Gym",Sector12RothmanUniversity:"Rothman University",Sector12Slums:"Sector-12 Slums",Sector12TravelAgency:"Sector-12 Travel Agency",Sector12UniversalEnergy:"Universal Energy",NewTokyoDefComm:"DefComm",NewTokyoGlobalPharmaceuticals:"Global Pharmaceuticals",NewTokyoNoodleBar:"Noodle Bar",NewTokyoSlums:"New Tokyo Slums",NewTokyoTravelAgency:"New Tokyo Travel Agency",NewTokyoVitaLife:"VitaLife",IshimaNovaMedical:"Nova Medical",IshimaOmegaSoftware:"Omega Software",IshimaSlums:"Ishima Slums",IshimaStormTechnologies:"Storm Technologies",IshimaTravelAgency:"Ishima Travel Agency",VolhavenCompuTek:"CompuTek",VolhavenHeliosLabs:"Helios Labs",VolhavenLexoCorp:"LexoCorp",VolhavenMilleniumFitnessGym:"Millenium Fitness Gym",VolhavenNWO:"NWO",VolhavenOmniTekIncorporated:"OmniTek Incorporated",VolhavenOmniaCybersystems:"Omnia Cybersystems",VolhavenSlums:"Volhaven Slums",VolhavenSysCoreSecurities:"SysCore Securities",VolhavenTravelAgency:"Volhaven Travel Agency",VolhavenZBInstituteOfTechnology:"ZB Institute of Technology",Hospital:"Hospital",WorldStockExchange:"World Stock Exchange"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(44);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<r&&s(n.charAt(o),a.charAt(o));)o++;return n.substring(0,o)},t.containsAllStrings=i,t.formatNumber=function(e,t){return e.toLocaleString(void 0,{maximumFractionDigits:t,minimumFractionDigits:t})},t.isHTML=function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.childNodes;for(let e=n.length-1;e>=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;a<e;a++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}},function(e,t,n){"use strict";n.d(t,"a",function(){return m}),n.d(t,"c",function(){return h}),n.d(t,"e",function(){return d}),n.d(t,"d",function(){return g}),n.d(t,"f",function(){return _}),n.d(t,"b",function(){return f});n(20),n(1),n(0),n(152);var a=n(39),i=(n(74),n(21)),r=(n(19),n(118)),o=(n(98),n(59)),s=n(64),l=n(61),c=n(70),u=n(123),p=n(44);function m(e,t,n=!1){var a=[],r=t.env;if(r.stopFlag)return n?a:Promise.reject(t);var o,s,c=e.source.value,u=!1,p=[];if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type)u=!0,o=e.specifiers[0].local.name;else for(var m=0;m<e.specifiers.length;++m)p.push(e.specifiers[m].local.name);var h=Object(i.getServer)(t.serverIp),d="";if(null==h)return n?a:Promise.reject(g(t,"Failed to identify server. This is a bug please report to dev",e));for(m=0;m<h.scripts.length;++m)if(h.scripts[m].filename===c){d=h.scripts[m].code;break}if(""===d)return n?a:Promise.reject(g(t,"Could not find script "+c+" to import",e));try{var _=Object(l.parse)(d,{sourceType:"module"})}catch(i){return console.log("Failed to parse import script"),n?a:Promise.reject(g(t,"Failed to import functions from "+c+" This is most likely due to a syntax error in the imported script",e))}u&&(r.set(o,{}),s=r.get(o));for(var f=[_];0!=f.length;){var y=f.shift();switch(y.type){case"BlockStatement":case"Program":for(m=0;m<y.body.length;++m)y.body[m]instanceof l.Node&&f.push(y.body[m]);break;case"FunctionDeclaration":if(!y.id||!y.id.name)return n?a:Promise.reject(g(t,"Invalid function declaration in imported script "+c,e));u?n?a.push(y):s[y.id.name]=y:p.includes(y.id.name)&&(n?a.push(y):r.set(y.id.name,y))}for(var b in y)y.hasOwnProperty(b)&&y[b]instanceof l.Node&&f.push(y[b])}return n||t.scriptRef.log("Imported functions from "+c),n?a:Promise.resolve(!0)}function h(e){e instanceof a.b&&e.delay&&(clearTimeout(e.delay),e.delayResolve())}function d(e,t){return new Promise(function(n,a){t.delay=Object(s.setTimeoutRef)(()=>{t.delay=null,n()},e),t.delayResolve=n})}function g(e,t,n=null){var a="";null!=n&&(a=" (Line "+function(e,t){var n=t.scriptRef.codeCode();try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(n,e)+")");return"|"+e.serverIp+"|"+e.name+"|"+t+a}function _(e,t,n,i,s=1){if(null!=(m=Object(o.a)(t,n,e)))return i.scriptRef.log(t+" is already running on "+e.hostname),Promise.resolve(!1);for(var l=0;l<n.length;++l)if(null==n[l])return i.scriptRef.log("ERROR: Cannot execute a script with null/undefined as an argument"),Promise.resolve(!1);for(l=0;l<e.scripts.length;++l)if(e.scripts[l].filename==t){var u=e.scripts[l],p=u.ramUsage;if(0===(s=Math.round(Number(s))))return Promise.resolve(!1);p*=s;var m,h=e.maxRam-e.ramUsed;return 0==e.hasAdminRights?(i.scriptRef.log("Cannot run script "+t+" on "+e.hostname+" because you do not have root access!"),Promise.resolve(!1)):p>h?(i.scriptRef.log("Cannot run script "+t+"(t="+s+") on "+e.hostname+" because there is not enough available RAM!"),Promise.resolve(!1)):(null==i.disableLogs.ALL&&null==i.disableLogs.exec&&null==i.disableLogs.run&&null==i.disableLogs.spawn&&i.scriptRef.log("Running script: "+t+" on "+e.hostname+" with "+s+" threads and args: "+Object(c.arrayToString)(n)+". May take a few seconds to start up..."),(m=new r.RunningScript(u,n)).threads=s,e.runningScripts.push(m),Object(a.c)(m,e),Promise.resolve(!0))}return i.scriptRef.log("Could not find script "+t+" on "+e.hostname),Promise.resolve(!1)}function f(e){if(!Object(p.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,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,"<br>"),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(79))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(68);function i(e,t={}){const n=`color: ${null!=t.color?t.color:"var(--my-font-color)"}; background-color:var(--my-background-color);${void 0===t.id?" white-space:pre-wrap;":""}`,i=`<tr class="posted"><td ${void 0===t.id?'class="terminal-line"':`id="${t.id}"`} style="${n}">${e}</td></tr>`;a.getElementById("terminal-input").insertAdjacentHTML("beforebegin",i),function(){const e=a.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){i(e)},t.postError=function(e){i(`ERROR: ${e}`,{color:"#ff2929"})},t.hackProgressBarPost=function(e){i(e,{id:"hack-progress-bar"})},t.hackProgressPost=function(e){i(e,{id:"hack-progress"})}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return ue});var a=n(7),i=n(102),r=n(85),o=n(13),s=n(73),l=n(5),c=n(78),u=n(36),p=n(173),m=n(135),h=n(119),d=(n(38),n(18)),g=n(28),_=n(1),f=n(158),y=n(14),b=n(53),v=n(34),E=n(125),k=n(6),C=n(84),T=n(41),O=n(108),S=n(65),M=n(72),P=n(50),A=n(39),w=n(0),x=n(115),R=(n(30),n(130)),N=n(77),I=n(94),L=n(59),D=n(23),B=(n(74),n(19)),W=n(95),j=n(57),F=n(40),U=n(29),H=n(71),G=n(106),K=n(139),q=n(157),$=n(97),Y=n(172),z=n(12),V=n(3),J=n(171),X=n(170),Q=n(32),Z=n(9),ee=n(110),te=(n(15),n(33)),ne=(n(22),n(4)),ae=n(43),ie=n(156),re=n(31),oe=n(2),se=n.n(oe),le=n(113),ce=n.n(le);n(303),n(258),n(256),n(254),n(252),n(250),n(248),n(246),n(244),n(242),n(240),n(238),n(236),n(234),n(232),n(230),n(228),n(226),n(224),n(222),n(220),n(218),n(216),n(214),n(212);e(document).keydown(function(e){if(!0!==B.Settings.DisableHotkeys){try{if(Object(L.b)().isFocused())return}catch(e){}if(!(w.a.isWorking||N.b||M.c||m.a))if(84==e.keyCode&&e.altKey)e.preventDefault(),ue.loadTerminalContent();else if(e.keyCode===re.KEY.C&&e.altKey)e.preventDefault(),ue.loadCharacterContent();else if(e.keyCode===re.KEY.E&&e.altKey)e.preventDefault(),ue.loadScriptEditorContent();else if(e.keyCode===re.KEY.S&&e.altKey)e.preventDefault(),ue.loadActiveScriptsContent();else if(e.keyCode===re.KEY.H&&e.altKey)e.preventDefault(),ue.loadHacknetNodesContent();else if(e.keyCode===re.KEY.W&&e.altKey)e.preventDefault(),ue.loadWorldContent();else if(e.keyCode===re.KEY.J&&e.altKey)e.preventDefault(),ue.loadJobContent();else if(e.keyCode===re.KEY.R&&e.altKey)e.preventDefault(),ue.loadTravelContent();else if(e.keyCode===re.KEY.P&&e.altKey)e.preventDefault(),ue.loadCreateProgramContent();else if(e.keyCode===re.KEY.F&&e.altKey){if(z.routing.isOn(z.Page.Terminal)&&v.FconfSettings.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),ue.loadFactionsContent()}else e.keyCode===re.KEY.A&&e.altKey?(e.preventDefault(),ue.loadAugmentationsContent()):e.keyCode===re.KEY.U&&e.altKey&&(e.preventDefault(),ue.loadTutorialContent());e.keyCode===re.KEY.O&&e.altKey&&(e.preventDefault(),Object(ee.b)())}});const ue={version:"",Debug:!0,Clickables:{saveMainMenuButton:null,deleteMainMenuButton: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,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){ue.hideAllContent(),ue.Display.terminalContent.style.display="block",z.routing.navigateTo(z.Page.Terminal),Q.MainMenuLinks.Terminal.classList.add("active")},loadCharacterContent:function(){ue.hideAllContent(),ue.Display.characterContent.style.display="block",ue.updateCharacterInfo(),z.routing.navigateTo(z.Page.CharacterInfo),Q.MainMenuLinks.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){ue.hideAllContent(),ue.Display.scriptEditorContent.style.display="block";try{Object(L.b)().openScript(e,t)}catch(e){Object(ae.exceptionAlert)(e)}Object(L.e)(),z.routing.navigateTo(z.Page.ScriptEditor),Q.MainMenuLinks.ScriptEditor.classList.add("active")},loadActiveScriptsContent:function(){ue.hideAllContent(),ue.Display.activeScriptsContent.style.display="block",Object(r.c)(),z.routing.navigateTo(z.Page.ActiveScripts),Q.MainMenuLinks.ActiveScripts.classList.add("active")},loadHacknetNodesContent:function(){ue.hideAllContent(),ue.Display.hacknetNodesContent.style.display="block",Object(C.b)(),z.routing.navigateTo(z.Page.HacknetNodes),Q.MainMenuLinks.HacknetNodes.classList.add("active")},loadWorldContent:function(){ue.hideAllContent(),ue.Display.worldContent.style.display="block",ue.displayWorldInfo(),z.routing.navigateTo(z.Page.World),Q.MainMenuLinks.City.classList.add("active")},loadCreateProgramContent:function(){ue.hideAllContent(),ue.Display.createProgramContent.style.display="block",Object(R.a)(),z.routing.navigateTo(z.Page.CreateProgram),Q.MainMenuLinks.CreateProgram.classList.add("active")},loadFactionsContent:function(){ue.hideAllContent(),ue.Display.factionsContent.style.display="block",ue.displayFactionsInfo(),z.routing.navigateTo(z.Page.Factions),Q.MainMenuLinks.Factions.classList.add("active")},loadFactionContent:function(){ue.hideAllContent(),ue.Display.factionContent.style.display="block",z.routing.navigateTo(z.Page.Faction)},loadAugmentationsContent:function(){ue.hideAllContent(),ue.Display.augmentationsContent.style.display="block",Object(s.c)(ue.Display.augmentationsContent),z.routing.navigateTo(z.Page.Augmentations),Q.MainMenuLinks.Augmentations.classList.add("active")},loadTutorialContent:function(){ue.hideAllContent(),ue.Display.tutorialContent.style.display="block",z.routing.navigateTo(z.Page.Tutorial),Q.MainMenuLinks.Tutorial.classList.add("active")},loadDevMenuContent:function(){ue.hideAllContent(),Object(f.b)(),z.routing.navigateTo(z.Page.DevMenu),Q.MainMenuLinks.DevMenu.classList.add("active")},loadLocationContent:function(){ue.hideAllContent(),ue.Display.locationContent.style.display="block";try{Object(E.a)()}catch(e){Object(ae.exceptionAlert)(e),console.error(e)}z.routing.navigateTo(z.Page.Location)},loadTravelContent:function(){switch(w.a.city){case k.Locations.Aevum:w.a.location=k.Locations.AevumTravelAgency;break;case k.Locations.Chongqing:w.a.location=k.Locations.ChongqingTravelAgency;break;case k.Locations.Sector12:w.a.location=k.Locations.Sector12TravelAgency;break;case k.Locations.NewTokyo:w.a.location=k.Locations.NewTokyoTravelAgency;break;case k.Locations.Ishima:w.a.location=k.Locations.IshimaTravelAgency;break;case k.Locations.Volhaven:w.a.location=k.Locations.VolhavenTravelAgency;break;default:Object(Z.dialogBoxCreate)("ERROR: Invalid city. This is a bug please contact game dev")}ue.loadLocationContent()},loadJobContent:function(){""!=w.a.companyName?(w.a.location=w.a.companyName,ue.loadLocationContent()):Object(Z.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.")},loadWorkInProgressContent:function(){ue.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",ue.Display.workInProgressContent.style.display="block",z.routing.navigateTo(z.Page.WorkInProgress)},loadRedPillContent:function(){ue.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",ue.Display.redPillContent.style.display="block",z.routing.navigateTo(z.Page.RedPill)},loadCinematicTextContent:function(){ue.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",ue.Display.cinematicTextContent.style.display="block",z.routing.navigateTo(z.Page.CinematicText)},loadInfiltrationContent:function(){ue.hideAllContent(),ue.Display.infiltrationContent.style.display="block",z.routing.navigateTo(z.Page.Infiltration)},loadStockMarketContent:function(){ue.hideAllContent(),ue.Display.stockMarketContent.style.display="block",z.routing.navigateTo(z.Page.StockMarket),Object(U.g)()},loadGangContent:function(){ue.hideAllContent(),document.getElementById("gang-container")||w.a.inGang()?(w.a.gang.displayGangContent(w.a),z.routing.navigateTo(z.Page.Gang)):(ue.loadTerminalContent(),z.routing.navigateTo(z.Page.Terminal))},loadMissionContent:function(){ue.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",ue.Display.missionContent.style.display="block",z.routing.navigateTo(z.Page.Mission)},loadCorporationContent:function(){w.a.corporation instanceof g.c&&(ue.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",z.routing.navigateTo(z.Page.Corporation),w.a.corporation.createUI())},loadBladeburnerContent:function(){if(w.a.bladeburner instanceof u.a)try{ue.hideAllContent(),z.routing.navigateTo(z.Page.Bladeburner),w.a.bladeburner.createContent()}catch(e){Object(ae.exceptionAlert)(e)}},loadSleevesContent:function(){try{ue.hideAllContent(),z.routing.navigateTo(z.Page.Sleeves),Object(K.createSleevesPage)(w.a)}catch(e){Object(ae.exceptionAlert)(e)}},loadResleevingContent:function(){try{ue.hideAllContent(),z.routing.navigateTo(z.Page.Resleeves),Object(q.createResleevesPage)(w.a)}catch(e){Object(ae.exceptionAlert)(e)}},hideAllContent:function(){ue.Display.terminalContent.style.display="none",ue.Display.characterContent.style.display="none",ue.Display.scriptEditorContent.style.display="none",ue.Display.activeScriptsContent.style.display="none",ue.Display.hacknetNodesContent.style.display="none",ue.Display.worldContent.style.display="none",ue.Display.createProgramContent.style.display="none",ue.Display.factionsContent.style.display="none",ue.Display.factionContent.style.display="none",ue.Display.factionAugmentationsContent.style.display="none",ue.Display.augmentationsContent.style.display="none",ue.Display.tutorialContent.style.display="none",ue.Display.locationContent.style.display="none",ue.Display.workInProgressContent.style.display="none",ue.Display.redPillContent.style.display="none",ue.Display.cinematicTextContent.style.display="none",ue.Display.infiltrationContent.style.display="none",ue.Display.stockMarketContent.style.display="none",ue.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),w.a.inGang()&&w.a.gang.clearUI(),w.a.corporation instanceof g.c&&w.a.corporation.clearUI(),w.a.bladeburner instanceof u.a&&w.a.bladeburner.clearContent(),Object(q.clearResleevesPage)(),Object(K.clearSleevesPage)(),ue.aevumLocationsList.style.display="none",ue.chongqingLocationsList.style.display="none",ue.sector12LocationsList.style.display="none",ue.newTokyoLocationsList.style.display="none",ue.ishimaLocationsList.style.display="none",ue.volhavenLocationsList.style.display="none",Q.MainMenuLinks.Terminal.classList.remove("active"),Q.MainMenuLinks.ScriptEditor.classList.remove("active"),Q.MainMenuLinks.ActiveScripts.classList.remove("active"),Q.MainMenuLinks.CreateProgram.classList.remove("active"),Q.MainMenuLinks.Stats.classList.remove("active"),Q.MainMenuLinks.Factions.classList.remove("active"),Q.MainMenuLinks.Augmentations.classList.remove("active"),Q.MainMenuLinks.HacknetNodes.classList.remove("active"),Q.MainMenuLinks.Sleeves.classList.remove("active"),Q.MainMenuLinks.City.classList.remove("active"),Q.MainMenuLinks.Travel.classList.remove("active"),Q.MainMenuLinks.Job.classList.remove("active"),Q.MainMenuLinks.StockMarket.classList.remove("active"),Q.MainMenuLinks.Bladeburner.classList.remove("active"),Q.MainMenuLinks.Corporation.classList.remove("active"),Q.MainMenuLinks.Gang.classList.remove("active"),Q.MainMenuLinks.Tutorial.classList.remove("active"),Q.MainMenuLinks.Options.classList.remove("active"),Q.MainMenuLinks.DevMenu.classList.remove("active"),Object(f.a)()},displayCharacterOverviewInfo:function(){ce.a.render(se.a.createElement(p.a,null),document.getElementById("character-overview-text"));const e=document.getElementById("character-overview-save-button");B.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},updateCharacterInfo:function(){Object(Y.displayCharacterInfo)(ue.Display.characterInfo,w.a)},aevumLocationsList:null,chongqingLocationsList:null,sector12LocationsList:null,newTokyoLocationsList:null,ishimaLocationsList:null,volhavenLocationsList:null,displayWorldInfo:function(){ue.aevumLocationsList.style.display="none",ue.chongqingLocationsList.style.display="none",ue.sector12LocationsList.style.display="none",ue.newTokyoLocationsList.style.display="none",ue.ishimaLocationsList.style.display="none",ue.volhavenLocationsList.style.display="none",document.getElementById("world-city-name").innerHTML=w.a.city;document.getElementById("world-city-desc");switch(w.a.city){case k.Locations.Aevum:ue.aevumLocationsList.style.display="inline";break;case k.Locations.Chongqing:ue.chongqingLocationsList.style.display="inline";break;case k.Locations.Sector12:ue.sector12LocationsList.style.display="inline",3!==w.a.bitNodeN&&!P.e||8===w.a.bitNodeN?document.getElementById("sector12-cityhall-li").style.display="none":document.getElementById("sector12-cityhall-li").style.display="block";break;case k.Locations.NewTokyo:ue.newTokyoLocationsList.style.display="inline";break;case k.Locations.Ishima:ue.ishimaLocationsList.style.display="inline";break;case k.Locations.Volhaven:ue.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(te.removeChildrenFromElement)(t),(e=Object(ne.createElement)("li")).appendChild(Object(ne.createElement)("a",{innerText:"World Stock Exchange",class:"a-link-button",clickListener:()=>(w.a.location=k.Locations.WorldStockExchange,ue.loadStockMarketContent(),!1)})),t.appendChild(e),w.a.corporation instanceof g.c&&null==document.getElementById("location-corporation-button"))&&((e=Object(ne.createElement)("li")).appendChild(Object(ne.createElement)("a",{innerText:w.a.corporation.name,id:"location-corporation-button",class:"a-link-button",clickListener:()=>(ue.loadCorporationContent(),!1)})),t.appendChild(e));w.a.bladeburner instanceof u.a&&((e=Object(ne.createElement)("li")).appendChild(Object(ne.createElement)("a",{innerText:"Bladeburner Headquarters",class:"a-link-button",clickListener:()=>(ue.loadBladeburnerContent(),!1)})),t.appendChild(e))},displayFactionsInfo:function(){Object(te.removeChildrenFromElement)(ue.Display.factionsContent),ue.Display.factionsContent.appendChild(Object(ne.createElement)("h1",{innerText:"Factions"})),ue.Display.factionsContent.appendChild(Object(ne.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(ne.createElement)("ul");ue.Display.factionsContent.appendChild(Object(ne.createElement)("br"));for(var t=0;t<w.a.factions.length;++t)!function(){var n=w.a.factions[t];e.appendChild(Object(ne.createElement)("a",{class:"a-link-button",innerText:n,padding:"4px",margin:"4px",display:"inline-block",clickListener:()=>(ue.loadFactionContent(),Object(b.a)(n),!1)})),e.appendChild(Object(ne.createElement)("br"))}();ue.Display.factionsContent.appendChild(e),ue.Display.factionsContent.appendChild(Object(ne.createElement)("br")),ue.Display.factionsContent.appendChild(Object(ne.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),ue.Display.factionsContent.appendChild(Object(ne.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(ne.createElement)("ul");for(t=0;t<w.a.factionInvitations.length;++t)!function(){var e=w.a.factionInvitations[t],a=Object(ne.createElement)("li",{padding:"6px",margin:"6px"});a.appendChild(Object(ne.createElement)("p",{innerText:e,display:"inline",margin:"4px",padding:"4px"})),a.appendChild(Object(ne.createElement)("a",{innerText:"Accept Faction Invitation",class:"a-link-button",display:"inline",margin:"4px",padding:"4px",clickListener:t=>{if(!t.isTrusted)return!1;Object(b.c)(y.Factions[e]);for(var n=0;n<w.a.factionInvitations.length;++n)(w.a.factionInvitations[n]==e||y.Factions[w.a.factionInvitations[n]].isBanned)&&(w.a.factionInvitations.splice(n,1),n--);return ue.displayFactionsInfo(),!1}})),n.appendChild(a)}();ue.Display.factionsContent.appendChild(n)},idleTimer:function(){var e=(new Date).getTime(),t=e-ue._lastUpdate,n=t%ue._idleSpeed;(t=Math.floor(t/ue._idleSpeed))>0&&(ue._lastUpdate=e-n,w.a.lastUpdate=e-n,ue.updateGame(t)),window.requestAnimationFrame(ue.idleTimer)},updateGame:function(e=1){var t=e*ue._idleSpeed;null==w.a.totalPlaytime&&(w.a.totalPlaytime=0),null==w.a.playtimeSinceLastAug&&(w.a.playtimeSinceLastAug=0),null==w.a.playtimeSinceLastBitnode&&(w.a.playtimeSinceLastBitnode=0),w.a.totalPlaytime+=t,w.a.playtimeSinceLastAug+=t,w.a.playtimeSinceLastBitnode+=t,!0===H.a.actionStarted&&(ue._totalActionTime=H.a.actionTime,ue._actionTimeLeft=H.a.actionTime,ue._actionInProgress=!0,ue._actionProgressBarCount=1,ue._actionProgressStr="[ ]",ue._actionTimeStr="Time left: ",H.a.actionStarted=!1),w.a.isWorking&&(w.a.workType==_.CONSTANTS.WorkTypeFaction?w.a.workForFaction(e):w.a.workType==_.CONSTANTS.WorkTypeCreateProgram?w.a.createProgramWork(e):w.a.workType==_.CONSTANTS.WorkTypeStudyClass?w.a.takeClass(e):w.a.workType==_.CONSTANTS.WorkTypeCrime?w.a.commitCrime(e):w.a.workType==_.CONSTANTS.WorkTypeCompanyPartTime?w.a.workPartTime(e):w.a.work(e)),w.a.hasWseAccount&&Object(U.m)(e),2==w.a.bitNodeN&&w.a.inGang()&&w.a.gang.process(e,w.a),M.c&&M.b&&M.b.process(e),w.a.corporation instanceof g.c&&w.a.corporation.storeCycles(e),w.a.bladeburner instanceof u.a&&w.a.bladeburner.storeCycles(e);for(let t=0;t<w.a.sleeves.length;++t)if(w.a.sleeves[t]instanceof G.Sleeve){const n=w.a.sleeves[t].process(w.a,e);if(null==n)continue;for(let a=0;a<w.a.sleeves.length;++a)a!==t&&w.a.sleeves[a].gainExperience(w.a,n,e,!0)}ue.decrementAllCounters(e),ue.checkCounters(),1==ue._actionInProgress&&ue.updateHackProgress(e),Object(A.g)(e),Object(C.d)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:600,messages:150,sCr:1500,mechanicProcess:5,contractGeneration:3e3},decrementAllCounters:function(e=1){for(var t in ue.Counters)ue.Counters.hasOwnProperty(t)&&(ue.Counters[t]=ue.Counters[t]-e)},checkCounters:function(){if(ue.Counters.autoSaveCounter<=0&&(null==B.Settings.AutosaveInterval&&(B.Settings.AutosaveInterval=60),0===B.Settings.AutosaveInterval?ue.Counters.autoSaveCounter=1/0:(ue.Counters.autoSaveCounter=5*B.Settings.AutosaveInterval,I.b.saveGame(pe))),ue.Counters.updateSkillLevelsCounter<=0&&(w.a.updateSkillLevels(),ue.Counters.updateSkillLevelsCounter=10),ue.Counters.updateActiveScriptsDisplay<=0&&(Object(r.c)(),z.routing.isOn(z.Page.ActiveScripts)?ue.Counters.updateActiveScriptsDisplay=5:ue.Counters.updateActiveScriptsDisplay=10),ue.Counters.updateDisplays<=0&&(ue.displayCharacterOverviewInfo(),z.routing.isOn(z.Page.HacknetNodes)?Object(C.f)():z.routing.isOn(z.Page.CreateProgram)?Object(R.a)():z.routing.isOn(z.Page.Sleeves)&&Object(K.updateSleevesPage)(),i.b&&Object(i.c)(),ue.Counters.updateDisplays=3),ue.Counters.updateDisplaysMed<=0&&(z.routing.isOn(z.Page.CharacterInfo)&&ue.updateCharacterInfo(),ue.Counters.updateDisplaysMed=9),ue.Counters.updateDisplaysLong<=0&&(z.routing.isOn(z.Page.Gang)&&w.a.inGang()?w.a.gang.updateGangContent():z.routing.isOn(z.Page.ScriptEditor)&&Object(L.e)(),ue.Counters.updateDisplaysLong=15),ue.Counters.createProgramNotifications<=0){var e=Object(R.b)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),ue.Counters.createProgramNotifications=10}if(ue.Counters.checkFactionInvitations<=0){var n=w.a.checkForFactionInvitations();if(n.length>0){!1===w.a.firstFacInvRecvd&&(w.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(b.b)(a)}ue.Counters.checkFactionInvitations=100}if(ue.Counters.passiveFactionGrowth<=0){var s=Math.floor(600-ue.Counters.passiveFactionGrowth);Object(b.d)(s),ue.Counters.passiveFactionGrowth=600}if(ue.Counters.messages<=0&&(Object(S.b)(),o.Augmentations[l.AugmentationNames.TheRedPill].owned?ue.Counters.messages=4500:ue.Counters.messages=150),ue.Counters.sCr<=0&&(w.a.hasWseAccount&&Object(U.q)(),ue.Counters.sCr=1500),ue.Counters.mechanicProcess<=0){if(w.a.corporation instanceof g.c&&w.a.corporation.process(),w.a.bladeburner instanceof u.a)try{w.a.bladeburner.process()}catch(e){Object(ae.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}ue.Counters.mechanicProcess=5}ue.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(h.b)(),ue.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*ue._idleSpeed;ue._actionTimeLeft-=t/1e3,ue._actionTimeLeft=Math.max(ue._actionTimeLeft,0);for(var n=Math.round(100*(1-ue._actionTimeLeft/ue._totalActionTime));2*ue._actionProgressBarCount<=n;)ue._actionProgressStr=Object(a.replaceAt)(ue._actionProgressStr,ue._actionProgressBarCount,"|"),ue._actionProgressBarCount+=1;ue._actionTimeStr="Time left: "+Math.max(0,Math.round(ue._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=ue._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=ue._actionProgressStr.replace(/ /g," "),n>=100&&(ue._actionInProgress=!1,H.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=null,e[t].style.opacity=0,e[t].style.pointerEvents="none"},openMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=e[t].scrollHeight+"px",e[t].style.display="block"},toggleMainMenuHeader:function(e,t,n){for(var a=0;a<t.length;++a)e?(t[a].style.opacity=1,t[a].style.maxHeight=t[a].scrollHeight+"px"):(t[a].style.opacity=0,t[a].style.maxHeight=null);for(a=0;a<n.length;++a)e?(n[a].style.opacity=1,n[a].style.maxHeight=n[a].scrollHeight+"px",n[a].style.pointerEvents="auto"):(n[a].style.opacity=0,n[a].style.maxHeight=null,n[a].style.pointerEvents="none")},load:function(e){var t=document.getElementById("terminal-tab"),n=document.getElementById("create-script-tab"),i=document.getElementById("active-scripts-tab"),r=document.getElementById("create-program-tab"),o=document.getElementById("stats-tab"),l=document.getElementById("factions-tab"),p=document.getElementById("augmentations-tab"),m=document.getElementById("hacknet-nodes-tab"),h=document.getElementById("city-tab"),f=document.getElementById("travel-tab"),v=document.getElementById("job-tab"),E=document.getElementById("stock-market-tab"),k=document.getElementById("bladeburner-tab"),M=document.getElementById("corporation-tab"),A=document.getElementById("gang-tab"),x=document.getElementById("tutorial-tab"),R=document.getElementById("options-tab"),N=document.getElementById("dev-tab");if(Object(I.a)(e)){console.log("Loaded game from save"),Object(c.initBitNodes)(),Object(c.initBitNodeMultipliers)(w.a),Object(W.c)(),ue.setDisplayElements(),ue.init(),Object(s.d)(),w.a.reapplyAllSourceFiles(),Object(U.i)(),w.a.hasWseAccount&&Object(U.j)(),Object(O.a)(),Object(P.g)(),Object(j.updateSourceFileFlags)(w.a),ue._lastUpdate=(new Date).getTime();var B=w.a.lastUpdate,K=Math.floor((ue._lastUpdate-B)/ue._idleSpeed),q=Object(L.c)();w.a.isWorking&&(console.log("work() called in load() for "+K*ue._idleSpeed+" milliseconds"),w.a.workType==_.CONSTANTS.WorkTypeFaction?w.a.workForFaction(K):w.a.workType==_.CONSTANTS.WorkTypeCreateProgram?w.a.createProgramWork(K):w.a.workType==_.CONSTANTS.WorkTypeStudyClass?w.a.takeClass(K):w.a.workType==_.CONSTANTS.WorkTypeCrime?w.a.commitCrime(K):w.a.workType==_.CONSTANTS.WorkTypeCompanyPartTime?w.a.workPartTime(K):w.a.work(K));var $=Object(C.d)(K);Object(b.d)(K),w.a.hasWseAccount&&Object(U.m)(K),null!=w.a.bitNodeN&&2===w.a.bitNodeN&&w.a.inGang()&&w.a.gang.process(K,w.a),w.a.corporation instanceof g.c&&w.a.corporation.storeCycles(K),w.a.bladeburner instanceof u.a&&w.a.bladeburner.storeCycles(K);for(let e=0;e<w.a.sleeves.length;++e)if(w.a.sleeves[e]instanceof G.Sleeve){const t=w.a.sleeves[e].process(w.a,K);if(null==t)continue;for(let n=0;n<w.a.sleeves.length;++n)n!==e&&w.a.sleeves[n].gainExperience(w.a,t,K,!0)}var Y=K*ue._idleSpeed;null==w.a.totalPlaytime&&(w.a.totalPlaytime=0),null==w.a.playtimeSinceLastAug&&(w.a.playtimeSinceLastAug=0),null==w.a.playtimeSinceLastBitnode&&(w.a.playtimeSinceLastBitnode=0),w.a.totalPlaytime+=Y,w.a.playtimeSinceLastAug+=Y,w.a.playtimeSinceLastBitnode+=Y,w.a.lastUpdate=ue._lastUpdate,ue.start(),Object(ie.removeLoadingScreen)();const e=Object(a.convertTimeMsToTimeElapsedString)(Y);Object(Z.dialogBoxCreate)(`Offline for ${e}. While you were offline, your scripts `+"generated <span class='money-gold'>"+V.numeralWrapper.formatMoney(q)+"</span> and your Hacknet Nodes generated <span class='money-gold'>"+V.numeralWrapper.formatMoney($)+"</span>");var z=[t,n,i,o,m,h,x,R,N];w.a.firstFacInvRecvd?z.push(l):l.style.display="none",w.a.firstAugPurchased?z.push(p):p.style.display="none",""!==w.a.companyName?z.push(v):v.style.display="none",w.a.firstTimeTraveled?z.push(f):f.style.display="none",w.a.firstProgramAvailable?z.push(r):r.style.display="none",w.a.hasWseAccount?z.push(E):E.style.display="none",w.a.bladeburner instanceof u.a?z.push(k):k.style.display="none",w.a.corporation instanceof g.c?z.push(M):M.style.display="none",w.a.inGang()?z.push(A):A.style.display="none",ue.closeMainMenuHeader(z)}else{console.log("Initializing new game"),Object(c.initBitNodes)(),Object(c.initBitNodeMultipliers)(w.a),Object(W.c)(),Object(F.initSpecialServerIps)(),ue.setDisplayElements(),ue.start(),w.a.init(),Object(D.initForeignServers)(w.a.getHomeComputer()),Object(d.initCompanies)(),Object(y.initFactions)(),Object(s.d)(),Object(S.c)(),Object(U.i)(),Object(O.a)(),Object(P.g)(),document.getElementById("hacking-menu-header").classList.toggle("opened"),document.getElementById("character-menu-header").classList.toggle("opened"),document.getElementById("world-menu-header").classList.toggle("opened"),document.getElementById("help-menu-header").classList.toggle("opened"),l.style.display="none",p.style.display="none",v.style.display="none",E.style.display="none",f.style.display="none",r.style.display="none",k.style.display="none",M.style.display="none",A.style.display="none",N.style.display="none",ue.openMainMenuHeader([t,n,i,o,m,h,x,R]),Object(T.c)(),Object(ie.removeLoadingScreen)()}Object(J.a)(),Object(L.d)(),H.a.resetTerminalInput()},setDisplayElements:function(){if(ue.Display.terminalContent=document.getElementById("terminal-container"),z.routing.navigateTo(z.Page.Terminal),ue.Display.characterContent=document.getElementById("character-container"),ue.Display.characterContent.style.display="none",ue.Display.scriptEditorContent=document.getElementById("script-editor-container"),ue.Display.scriptEditorContent.style.display="none",ue.Display.activeScriptsContent=document.getElementById("active-scripts-container"),ue.Display.activeScriptsContent.style.display="none",ue.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),ue.Display.hacknetNodesContent.style.display="none",ue.Display.worldContent=document.getElementById("world-container"),ue.Display.worldContent.style.display="none",ue.Display.createProgramContent=document.getElementById("create-program-container"),ue.Display.createProgramContent.style.display="none",ue.Display.factionsContent=document.getElementById("factions-container"),ue.Display.factionsContent.style.display="none",ue.Display.factionContent=document.getElementById("faction-container"),ue.Display.factionContent.style.display="none",ue.Display.factionAugmentationsContent=document.getElementById("faction-augmentations-container"),ue.Display.factionAugmentationsContent.style.display="none",ue.Display.augmentationsContent=document.getElementById("augmentations-container"),ue.Display.augmentationsContent.style.display="none",ue.Display.tutorialContent=document.getElementById("tutorial-container"),ue.Display.tutorialContent.style.display="none",ue.Display.infiltrationContent=document.getElementById("infiltration-container"),ue.Display.infiltrationContent.style.display="none",ue.Display.stockMarketContent=document.getElementById("stock-market-container"),ue.Display.stockMarketContent.style.display="none",ue.Display.missionContent=document.getElementById("mission-container"),ue.Display.missionContent.style.display="none",ue.Display.characterInfo=document.getElementById("character-content"),ue.aevumLocationsList=document.getElementById("aevum-locations-list"),ue.chongqingLocationsList=document.getElementById("chongqing-locations-list"),ue.sector12LocationsList=document.getElementById("sector12-locations-list"),ue.newTokyoLocationsList=document.getElementById("newtokyo-locations-list"),ue.ishimaLocationsList=document.getElementById("ishima-locations-list"),ue.volhavenLocationsList=document.getElementById("volhaven-locations-list"),ue.Display.locationContent=document.getElementById("location-container"),ue.Display.locationContent.style.display="none",ue.Display.workInProgressContent=document.getElementById("work-in-progress-container"),ue.Display.workInProgressContent.style.display="none",ue.Display.redPillContent=document.getElementById("red-pill-container"),ue.Display.redPillContent.style.display="none",ue.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),ue.Display.cinematicTextContent.style.display="none",Object(E.b)(),!Object(Q.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ae.exceptionAlert)(new Error(e)),void console.error(e)}},init:function(){if(document.getElementById("import-game-link").onclick=function(){I.b.importGame()},!Object(X.initializeMainMenuHeaders)(w.a,!1)){const e="Failed to initialize Main Menu Headers. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ae.exceptionAlert)(new Error(e)),void console.error(e)}(Q.MainMenuLinks.Terminal.addEventListener("click",function(){return ue.loadTerminalContent(),!1}),Q.MainMenuLinks.ScriptEditor.addEventListener("click",function(){return ue.loadScriptEditorContent(),!1}),Q.MainMenuLinks.ActiveScripts.addEventListener("click",function(){return ue.loadActiveScriptsContent(),!1}),Q.MainMenuLinks.CreateProgram.addEventListener("click",function(){return ue.loadCreateProgramContent(),!1}),Q.MainMenuLinks.Stats.addEventListener("click",function(){return ue.loadCharacterContent(),!1}),Q.MainMenuLinks.Factions.addEventListener("click",function(){return ue.loadFactionsContent(),!1}),Q.MainMenuLinks.Augmentations.addEventListener("click",function(){return ue.loadAugmentationsContent(),!1}),Q.MainMenuLinks.HacknetNodes.addEventListener("click",function(){return ue.loadHacknetNodesContent(),!1}),Q.MainMenuLinks.Sleeves.addEventListener("click",function(){return ue.loadSleevesContent(),Q.MainMenuLinks.Sleeves.classList.add("active"),!1}),Q.MainMenuLinks.City.addEventListener("click",function(){return ue.loadWorldContent(),!1}),Q.MainMenuLinks.Travel.addEventListener("click",function(){return ue.loadTravelContent(),Q.MainMenuLinks.Travel.classList.add("active"),!1}),Q.MainMenuLinks.Job.addEventListener("click",function(){return ue.loadJobContent(),Q.MainMenuLinks.Job.classList.add("active"),!1}),Q.MainMenuLinks.StockMarket.addEventListener("click",function(){return ue.loadStockMarketContent(),Q.MainMenuLinks.StockMarket.classList.add("active"),!1}),Q.MainMenuLinks.Bladeburner.addEventListener("click",function(){return ue.loadBladeburnerContent(),!1}),Q.MainMenuLinks.Corporation.addEventListener("click",function(){return ue.loadCorporationContent(),Q.MainMenuLinks.Corporation.classList.add("active"),!1}),Q.MainMenuLinks.Gang.addEventListener("click",function(){return ue.loadGangContent(),!1}),Q.MainMenuLinks.Tutorial.addEventListener("click",function(){return ue.loadTutorialContent(),!1}),Q.MainMenuLinks.DevMenu.addEventListener("click",function(){return!1}),ue.ActiveScriptsList=document.getElementById("active-scripts-list"),ue.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),ue.Clickables.saveMainMenuButton.addEventListener("click",function(){return I.b.saveGame(pe),!1}),ue.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),ue.Clickables.deleteMainMenuButton.addEventListener("click",function(){return I.b.deleteGame(pe),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return I.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return I.b.saveGame(pe),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(ee.b)(),!1}),Object(R.c)(),Object(H.b)(),w.a.isWorking)&&(document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){if(w.a.workType==_.CONSTANTS.WorkTypeFaction){y.Factions[w.a.currentWorkFactionName];w.a.finishFactionWork(!0)}else w.a.workType==_.CONSTANTS.WorkTypeCreateProgram?w.a.finishCreateProgramWork(!0):w.a.workType==_.CONSTANTS.WorkTypeStudyClass?w.a.finishClass():w.a.workType==_.CONSTANTS.WorkTypeCrime?w.a.finishCrime(!0):w.a.workType==_.CONSTANTS.WorkTypeCompanyPartTime?w.a.finishWorkPartTime():w.a.finishWork(!0)}),ue.loadWorkInProgressContent());document.getElementById("character-overview-container").style.display="block",document.getElementById("terminal-menu-link").removeAttribute("class"),document.getElementById("stats-menu-link").removeAttribute("class"),document.getElementById("create-script-menu-link").removeAttribute("class"),document.getElementById("active-scripts-menu-link").removeAttribute("class"),document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),document.getElementById("city-menu-link").removeAttribute("class"),document.getElementById("tutorial-menu-link").removeAttribute("class"),document.getElementById("copy-save-to-clipboard-link").addEventListener("click",function(){const e=I.b.getSaveString();if(navigator.clipboard)navigator.clipboard.writeText(e).then(function(){Object($.createStatusText)("Copied save to clipboard")},function(e){console.error("Unable to copy save data to clipboard using Async API"),Object($.createStatusText)("Failed to copy save")});else{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?Object($.createStatusText)("Copied save to clipboard"):Object($.createStatusText)("Failed to copy save")}catch(e){console.error("Unable to copy save data to clipboard using document.execCommand('copy')"),Object($.createStatusText)("Failed to copy save")}document.body.removeChild(t)}}),document.getElementById("debug-delete-scripts-link").addEventListener("click",function(){return console.log("Deleting running scripts on home computer"),w.a.getHomeComputer().runningScripts=[],Object(Z.dialogBoxCreate)("Forcefully deleted all running scripts on home computer. Please save and refresh page"),Object(ee.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(Z.dialogBoxCreate)("Soft Reset!"),Object(x.a)(),Object(ee.a)(),!1})},start:function(){ue.idleTimer(),Object(A.f)()}};var pe,me;window.onload=function(){if(!window.indexedDB)return ue.load(null);(me=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.log("Error opening indexedDB: "),console.log(e),ue.load(null)},me.onsuccess=function(e){console.log("Opening bitburnerSave database successful!");var t=(pe=e.target.result).transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.log("Error in Database request to get savestring: "+e),ue.load(null)},t.onsuccess=function(e){ue.load(t.result)}},me.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(79))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Terminal="Terminal",e.CharacterInfo="CharacterInfo",e.ScriptEditor="ScriptEditor",e.ActiveScripts="ActiveScripts",e.HacknetNodes="HacknetNodes",e.World="World",e.CreateProgram="CreateProgram",e.Factions="Factions",e.Faction="Faction",e.Augmentations="Augmentations",e.Tutorial="Tutorial",e.DevMenu="Dev Menu",e.Location="Location",e.workInProgress="WorkInProgress",e.RedPill="RedPill",e.CinematicText="CinematicText",e.Infiltration="Infiltration",e.StockMarket="StockMarket",e.Gang="Gang",e.Mission="Mission",e.Corporation="Corporation",e.Bladeburner="Bladeburner",e.Sleeves="Sleeves",e.Resleeves="Re-sleeving"}(t.Page||(t.Page={}));t.routing=new class{constructor(){this.currentPage=null}isOn(e){return this.currentPage===e}navigateTo(e){this.currentPage=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentations={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(69),i=n(150),r=n(17);function o(e){const n=e.name;t.Factions[n]=e}function s(e){return t.Factions.hasOwnProperty(e)}function l(e){if(!(e instanceof a.Faction))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");const n=e.name;s(n)&&(e.favor=t.Factions[n].favor,delete t.Factions[n]),o(e)}t.Factions={},t.loadFactions=function(e){t.Factions=JSON.parse(e,r.Reviver)},t.AddToFactions=o,t.factionExists=s,t.initFactions=function(e=1){for(const e in i.FactionInfos)l(new a.Faction(e))},t.resetFaction=l},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";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),i=n(20),r=n(14),o=n(17);class s{constructor(e={info:"",moneyCost:0,name:"",repCost:0}){this.baseCost=0,this.baseRepRequirement=0,this.info="",this.level=0,this.name="",this.owned=!1,this.prereqs=[],this.mults={},this.startingCost=0,this.name=e.name,this.info=e.info,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*a.CONSTANTS.AugmentationRepMultiplier*i.BitNodeMultipliers.AugmentationRepCost,this.baseCost=e.moneyCost*a.CONSTANTS.AugmentationCostMultiplier*i.BitNodeMultipliers.AugmentationMoneyCost,this.startingCost=this.baseCost,this.level=0,e.hacking_mult&&(this.mults.hacking_mult=e.hacking_mult),e.strength_mult&&(this.mults.strength_mult=e.strength_mult),e.defense_mult&&(this.mults.defense_mult=e.defense_mult),e.dexterity_mult&&(this.mults.dexterity_mult=e.dexterity_mult),e.agility_mult&&(this.mults.agility_mult=e.agility_mult),e.charisma_mult&&(this.mults.charisma_mult=e.charisma_mult),e.hacking_exp_mult&&(this.mults.hacking_exp_mult=e.hacking_exp_mult),e.strength_exp_mult&&(this.mults.strength_exp_mult=e.strength_exp_mult),e.defense_exp_mult&&(this.mults.defense_exp_mult=e.defense_exp_mult),e.dexterity_exp_mult&&(this.mults.dexterity_exp_mult=e.dexterity_exp_mult),e.agility_exp_mult&&(this.mults.agility_exp_mult=e.agility_exp_mult),e.charisma_exp_mult&&(this.mults.charisma_exp_mult=e.charisma_exp_mult),e.hacking_chance_mult&&(this.mults.hacking_chance_mult=e.hacking_chance_mult),e.hacking_speed_mult&&(this.mults.hacking_speed_mult=e.hacking_speed_mult),e.hacking_money_mult&&(this.mults.hacking_money_mult=e.hacking_money_mult),e.hacking_grow_mult&&(this.mults.hacking_grow_mult=e.hacking_grow_mult),e.company_rep_mult&&(this.mults.company_rep_mult=e.company_rep_mult),e.faction_rep_mult&&(this.mults.faction_rep_mult=e.faction_rep_mult),e.crime_money_mult&&(this.mults.crime_money_mult=e.crime_money_mult),e.crime_success_mult&&(this.mults.crime_success_mult=e.crime_success_mult),e.work_money_mult&&(this.mults.work_money_mult=e.work_money_mult),e.hacknet_node_money_mult&&(this.mults.hacknet_node_money_mult=e.hacknet_node_money_mult),e.hacknet_node_purchase_cost_mult&&(this.mults.hacknet_node_purchase_cost_mult=e.hacknet_node_purchase_cost_mult),e.hacknet_node_ram_cost_mult&&(this.mults.hacknet_node_ram_cost_mult=e.hacknet_node_ram_cost_mult),e.hacknet_node_core_cost_mult&&(this.mults.hacknet_node_core_cost_mult=e.hacknet_node_core_cost_mult),e.hacknet_node_level_cost_mult&&(this.mults.hacknet_node_level_cost_mult=e.hacknet_node_level_cost_mult),e.bladeburner_max_stamina_mult&&(this.mults.bladeburner_max_stamina_mult=e.bladeburner_max_stamina_mult),e.bladeburner_stamina_gain_mult&&(this.mults.bladeburner_stamina_gain_mult=e.bladeburner_stamina_gain_mult),e.bladeburner_analysis_mult&&(this.mults.bladeburner_analysis_mult=e.bladeburner_analysis_mult),e.bladeburner_success_chance_mult&&(this.mults.bladeburner_success_chance_mult=e.bladeburner_success_chance_mult)}static fromJSON(e){return o.Generic_fromJSON(s,e.data)}addToFactions(e){for(let t=0;t<e.length;++t){const n=r.Factions[e[t]];null!=n?n.augmentations.push(this.name):console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${e[t]}`)}}addToAllFactions(){for(const e in r.Factions)if(r.Factions.hasOwnProperty(e)){const t=r.Factions[e];if(null==t){console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${e}`);continue}t.augmentations.push(this.name)}}toJSON(){return o.Generic_toJSON("Augmentation",this)}}t.Augmentation=s,o.Reviver.constructors.Augmentation=s},function(e,t,n){"use strict";function a(e,t){var n;if(null==t)return console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0;if("object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data){if("AllServersMap"===t.ctor)return console.log("Converting AllServersMap for v0.43.1"),t.data;if("function"==typeof(n=a.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON)return n.fromJSON(t)}return t}function i(e,t,n){var a,i;n||(n=Object.keys(t)),a={};for(let e=0;e<n.length;++e)a[i=n[e]]=t[i];return{ctor:e,data:a}}function r(e,t){var n,a;for(a in n=new e,t)n[a]=t[a];return n}n.r(t),n.d(t,"Reviver",function(){return a}),n.d(t,"Generic_toJSON",function(){return i}),n.d(t,"Generic_fromJSON",function(){return r}),a.constructors={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(294),i=n(80),r=n(17);t.Companies={},t.initCompanies=function(){const e=t.Companies;t.Companies={},a.companiesMetadata.forEach(e=>{!function(e){null!=t.Companies[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.Companies[e.name]=new i.Company(e)}(e)});for(const n in t.Companies){const a=t.Companies[n];e[n]instanceof i.Company?(a.favor=e[n].favor,isNaN(a.favor)&&(a.favor=0)):a.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,r.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(47),i={AutosaveInterval:60,CodeInstructionRunTime:50,DisableHotkeys:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1};t.Settings={AutosaveInterval:i.AutosaveInterval,CodeInstructionRunTime:25,DisableHotkeys:i.DisableHotkeys,Editor:a.EditorSetting.Ace,EditorKeybinding:a.AceKeybindingSetting.Ace,EditorTheme:"Monokai",Locale:"en",MaxLogCapacity:i.MaxLogCapacity,MaxPortCapacity:i.MaxPortCapacity,OwnedAugmentationsOrder:a.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:a.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:i.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:i.SuppressFactionInvites,SuppressHospitalizationPopup:i.SuppressHospitalizationPopup,SuppressMessages:i.SuppressMessages,SuppressTravelConfirmation:i.SuppressTravelConfirmation,init(){Object.assign(t.Settings,i)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitNodeMultipliers={HackingLevelMultiplier:1,StrengthLevelMultiplier:1,DefenseLevelMultiplier:1,DexterityLevelMultiplier:1,AgilityLevelMultiplier:1,CharismaLevelMultiplier:1,ServerGrowthRate:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerStartingSecurity:1,ServerWeakenRate:1,HomeComputerRamCost:1,PurchasedServerCost:1,PurchasedServerLimit:1,PurchasedServerMaxRam:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,ManualHackMoney:1,ScriptHackMoney:1,CodingContractMoney:1,ClassGymExpGain:1,CompanyWorkExpGain:1,CrimeExpGain:1,FactionWorkExpGain:1,HackExpGain:1,FactionPassiveRepGain:1,FactionWorkRepGain:1,RepToDonateToFaction:1,AugmentationMoneyCost:1,AugmentationRepCost:1,InfiltrationMoney:1,InfiltrationRep:1,FourSigmaMarketDataCost:1,FourSigmaMarketDataApiCost:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1,DaedalusAugsRequirement:1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(23),i=n(20),r=n(1),o=n(30),s=n(123);function l(e,t,n){let a=1+(r.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;a>r.CONSTANTS.ServerMaxGrowthRate&&(a=r.CONSTANTS.ServerMaxGrowthRate);const o=e.serverGrowth/100;return Math.log(t)/(Math.log(a)*n.hacking_grow_mult*o*i.BitNodeMultipliers.ServerGrowthRate)}function c(e){for(var t in a.AllServers)if(a.AllServers.hasOwnProperty(t)&&a.AllServers[t].hostname==e)return a.AllServers[t];return null}t.numCycleForGrowth=l,t.processSingleServerGrowth=function(e,t,n){const a=Math.max(Math.floor(t/450),0);var o=1+(r.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;o>r.CONSTANTS.ServerMaxGrowthRate&&(o=r.CONSTANTS.ServerMaxGrowthRate);const s=a*(e.serverGrowth/100)*i.BitNodeMultipliers.ServerGrowthRate;let c=Math.pow(o,s*n.hacking_grow_mult);c<1&&(console.log("WARN: serverGrowth calculated to be less than 1"),c=1);const u=e.moneyAvailable;if(e.moneyAvailable*=c,e.moneyMax&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),e.moneyMax&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),u!==e.moneyAvailable){let t=l(e,e.moneyAvailable/u,n);t=Math.max(0,t),e.fortify(2*r.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/u},t.prestigeHomeComputer=function(e){const t=e.programs.includes(o.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(o.Programs.NukeProgram.name),t&&e.programs.push(o.Programs.BitFlume.name),e.scripts.forEach(function(e){e.updateRamUsage()}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")},t.GetServerByHostname=c,t.getServer=function(e){return s.isValidIPAddress(e)?void 0!==a.AllServers[e]?a.AllServers[e]:null:c(e)},t.getServerOnNetwork=function(e,t){if(!(t>e.serversOnNetwork.length))return a.AllServers[e.serversOnNetwork[t]];console.error("Tried to get server on network that was out of range")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(68);t.clearEventListeners=function(e){try{let t;const n=(t="string"==typeof e?a.getElementById(e):e).cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(n,t),n}catch(e){return console.error(e),null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(74),i=n(40),r=n(271),o=n(90),s=n(15),l=n(17);function c(e){var n=e.ip;if(o.ipExists(n))throw console.log("IP of server that's being added: "+n),console.log("Hostname of the server thats being added: "+e.hostname),console.log("The server that already has this IP is: "+t.AllServers[n].hostname),new Error("Error: Trying to add a server with an existing IP");t.AllServers[n]=e}t.AllServers={},t.AddToAllServers=c,t.initForeignServers=function(e){const t=[];for(let e=0;e<15;e++)t.push([]);const n=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],l=e=>{switch(typeof e){case"number":return e;case"object":return s.getRandomInt(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of r.serverMetadata){const r={hostname:e.hostname,ip:o.createRandomIp(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(r.maxRam=Math.pow(2,l(e.maxRamExponent)));for(const t of n)void 0!==e[t]&&(r[t]=l(e[t]));const s=new a.Server(r);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&i.SpecialServerIps.addIp(e.specialName,s.ip),c(s),void 0!==e.networkLayer&&t[l(e.networkLayer)-1].push(s)}const u=(e,t)=>{e.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.ip)},p=e=>e[Math.floor(Math.random()*e.length)],m=(e,t)=>{for(const n of e)u(n,t())};m(t[0],()=>e);for(let e=1;e<t.length;e++)m(t[e],()=>p(t[e-1]))},t.prestigeAllServers=function(){for(var e in t.AllServers)delete t.AllServers[e];t.AllServers={}},t.loadAllServers=function(e){t.AllServers=JSON.parse(e,l.Reviver)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(22);t.yesNoBoxOpen=!1;const i=document.getElementById("yes-no-box-container"),r=document.getElementById("yes-no-box-text");function o(e){if(27===e.keyCode)s();else if(13===e.keyCode){const e=document.getElementById("yes-no-box-yes");e?e.click():console.error("Could not find YesNoBox Yes button DOM element")}}function s(){return i?i.style.display="none":console.error("Container not found for YesNoBox"),t.yesNoBoxOpen=!1,document.removeEventListener("keydown",o),!1}t.yesNoBoxHotkeyHandler=o,t.yesNoBoxClose=s,t.yesNoBoxGetYesButton=function(){return a.clearEventListeners("yes-no-box-yes")},t.yesNoBoxGetNoButton=function(){return a.clearEventListeners("yes-no-box-no")},t.yesNoBoxCreate=function(e){return!t.yesNoBoxOpen&&(t.yesNoBoxOpen=!0,r?r.innerHTML=e:console.error("Text element not found for YesNoBox"),i?i.style.display="flex":console.error("Container not found for YesNoBox"),document.addEventListener("keydown",o),!0)};const l=document.getElementById("yes-no-text-input-box-container"),c=document.getElementById("yes-no-text-input-box-input"),u=document.getElementById("yes-no-text-input-box-text");function p(e){if(27===e.keyCode)m();else if(13===e.keyCode){const e=document.getElementById("yes-no-text-input-box-yes");e?e.click():console.error("Could not find YesNoTxtInputBox Yes button DOM element")}}function m(){return null==l?(console.error("Container not found for YesNoTextInputBox"),!1):(l.style.display="none",t.yesNoBoxOpen=!1,c.value="",document.removeEventListener("keydown",p),!1)}t.yesNoTxtInpBoxHotkeyHandler=p,t.yesNoTxtInpBoxClose=m,t.yesNoTxtInpBoxGetYesButton=function(){return a.clearEventListeners("yes-no-text-input-box-yes")},t.yesNoTxtInpBoxGetNoButton=function(){return a.clearEventListeners("yes-no-text-input-box-no")},t.yesNoTxtInpBoxGetInput=function(){if(null==c)return console.error("Could not find YesNoTextInputBox input element"),"";let e=c.value;return e=e.replace(/\s+/g,"")},t.yesNoTxtInpBoxCreate=function(e){t.yesNoBoxOpen=!0,u&&(u.innerHTML=e),l?l.style.display="flex":console.error("Container not found for YesNoTextInputBox"),document.addEventListener("keydown",p),c.focus()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(68),i=n(75);t.removeElementById=function(e){try{const t=a.getElementById(e);i.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(293),i=n(3);t.Industries={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},t.IndustryStartingCosts={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},t.IndustryDescriptions={Energy:"Engage in the production and distribution of energy.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Energy,"$0.000a")+"<br>Recommended starting Industry: NO",Utilities:"Distributes water and provides wastewater services.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Utilities,"$0.000a")+"<br>Recommended starting Industry: NO",Agriculture:"Cultive crops and breed livestock to produce food.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Agriculture,"$0.000a")+"<br>Recommended starting Industry: YES",Fishing:"Produce food through the breeding and processing of fish and fish products<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Fishing,"$0.000a")+"<br>Recommended starting Industry: NO",Mining:"Extract and process metals from the earth.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Mining,"$0.000a")+"<br>Recommended starting Industry: NO",Food:"Create your own restaurants all around the world.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Food,"$0.000a")+"<br>Recommended starting Industry: YES",Tobacco:"Create and distribute tobacco and tobacco-related products.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Tobacco,"$0.000a")+"<br>Recommended starting Industry: YES",Chemical:"Product industrial chemicals<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Chemical,"$0.000a")+"<br>Recommended starting Industry: NO",Pharmaceutical:"Discover, develop, and create new pharmaceutical drugs.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Pharmaceutical,"$0.000a")+"<br>Recommended starting Industry: NO",Computer:"Develop and manufacture new computer hardware and networking infrastructures.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Computer,"$0.000a")+"<br>Recommended starting Industry: NO",Robotics:"Develop and create robots.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Robotics,"$0.000a")+"<br>Recommended starting Industry: NO",Software:"Develop computer software and create AI Cores.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Software,"$0.000a")+"<br>Recommended starting Industry: YES",Healthcare:"Create and manage hospitals.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.Healthcare,"$0.000a")+"<br>Recommended starting Industry: NO",RealEstate:"Develop and manage real estate properties.<br><br>Starting cost: "+i.numeralWrapper.format(t.IndustryStartingCosts.RealEstate,"$0.000a")+"<br>Recommended starting Industry: NO"},t.IndustryResearchTrees={Energy:a.getBaseResearchTreeCopy(),Utilities:a.getBaseResearchTreeCopy(),Agriculture:a.getBaseResearchTreeCopy(),Fishing:a.getBaseResearchTreeCopy(),Mining:a.getBaseResearchTreeCopy(),Food:a.getProductIndustryResearchTreeCopy(),Tobacco:a.getProductIndustryResearchTreeCopy(),Chemical:a.getBaseResearchTreeCopy(),Pharmaceutical:a.getProductIndustryResearchTreeCopy(),Computer:a.getProductIndustryResearchTreeCopy(),Robotics:a.getProductIndustryResearchTreeCopy(),Software:a.getProductIndustryResearchTreeCopy(),Healthcare:a.getProductIndustryResearchTreeCopy(),RealEstate:a.getProductIndustryResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=a.getBaseResearchTreeCopy()}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"f",function(){return IssueNewSharesCooldown}),__webpack_require__.d(__webpack_exports__,"k",function(){return SellSharesCooldown}),__webpack_require__.d(__webpack_exports__,"m",function(){return WarehouseInitialCost}),__webpack_require__.d(__webpack_exports__,"n",function(){return WarehouseInitialSize}),__webpack_require__.d(__webpack_exports__,"o",function(){return WarehouseUpgradeBaseCost}),__webpack_require__.d(__webpack_exports__,"g",function(){return OfficeInitialCost}),__webpack_require__.d(__webpack_exports__,"h",function(){return OfficeInitialSize}),__webpack_require__.d(__webpack_exports__,"a",function(){return BribeThreshold}),__webpack_require__.d(__webpack_exports__,"b",function(){return BribeToRepRatio}),__webpack_require__.d(__webpack_exports__,"j",function(){return ProductProductionCostRatio}),__webpack_require__.d(__webpack_exports__,"d",function(){return DividendMaxPercentage}),__webpack_require__.d(__webpack_exports__,"c",function(){return Corporation}),__webpack_require__.d(__webpack_exports__,"e",function(){return Industry}),__webpack_require__.d(__webpack_exports__,"i",function(){return OfficeSpace});var _CorporationState__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(160),_CorporationState__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_CorporationState__WEBPACK_IMPORTED_MODULE_0__),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(138),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(137),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(24),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__),_IndustryData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(27),_IndustryData__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_4__),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(127),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(124),_Material__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_6__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(91),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__),_Product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(109),_Product__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_8__),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(133),_ResearchMap__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_ResearchMap__WEBPACK_IMPORTED_MODULE_9__),_Warehouse__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(82),_Warehouse__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_10__);__webpack_require__.d(__webpack_exports__,"l",function(){return _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse});var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(20),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__),_Constants__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(1),_Constants__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_12__),_Faction_Factions__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(14),_Faction_Factions__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Faction_Factions__WEBPACK_IMPORTED_MODULE_13__),_Literature__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(108),_Locations__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(6),_Locations__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_15__),_Locations_Cities__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(89),_Locations_Cities__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_Locations_Cities__WEBPACK_IMPORTED_MODULE_16__),_Player__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(0),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(12),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(194),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_20__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(9),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(154),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_22__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(17),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(76),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(4),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(37),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(55),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(7),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(15),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(44),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(31),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(75),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(26),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(25),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__),react__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(2),react__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_35__),react_dom__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(113),react_dom__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_36__),_ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(193),_ui_Root__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(192),_ui_Routing__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(114),_ui_Routing__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(_ui_Routing__WEBPACK_IMPORTED_MODULE_39__),decimal_js__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(46);const INITIALSHARES=1e9,SHARESPERPRICEUPDATE=1e6,IssueNewSharesCooldown=216e3,SellSharesCooldown=18e3,CyclesPerMarketCycle=50,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/_CorporationState__WEBPACK_IMPORTED_MODULE_0__.AllCorporationStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5,DividendMaxPercentage=50,EmployeeSalaryMultiplier=3,CyclesPerEmployeeRaise=400,EmployeeRaiseAmount=50,BaseMaxProducts=3;let researchTreeBoxOpened=!1,researchTreeBox=null;$(document).mousedown(function(e){researchTreeBoxOpened&&null==$(e.target).closest("#corporation-research-popup-box-content").get(0)&&(Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_32__.removeElement)(researchTreeBox),researchTreeBox=null,researchTreeBoxOpened=!1)});var empManualAssignmentModeActive=!1;function Industry(e={}){this.offices={[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Aevum]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Chongqing]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Sector12]:new OfficeSpace({loc:_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Sector12,size:OfficeInitialSize}),[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.NewTokyo]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Ishima]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Scientific Research"}),this.researched={},this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0);var t=Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.warehouses={[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Aevum]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Chonqing]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse({corp:e.corp,industry:this,loc:_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Sector12,size:WarehouseInitialSize}),[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.NewTokyo]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Ishima]:0,[_Locations__WEBPACK_IMPORTED_MODULE_15__.Locations.Volhaven]:0},this.init()}function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),this.age=e.age?e.age:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(20,50),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(.1,5),this.pro=0,this.cyclesUntilRaise=CyclesPerEmployeeRaise,this.loc=e.loc?e.loc:"",this.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned}Industry.prototype.init=function(){switch(this.startingCost=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[this.type],this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.log("ERR: Invalid Industry Type passed into Industry.init(): "+this.type)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:return"develop and manage real estate properties";default:return console.log("ERROR: Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.getMaximumNumberProducts=function(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,BaseMaxProducts+e},Industry.prototype.hasMaximumNumberProducts=function(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t<Cities.length;++t){var n=Cities[t],a=this.warehouses[n];if(a instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var i=a.materials,r=(this.offices[n],Math.pow(.002*i.RealEstate.qty+1,this.reFac)*Math.pow(.002*i.Hardware.qty+1,this.hwFac)*Math.pow(.002*i.Robots.qty+1,this.robFac)*Math.pow(.002*i.AICores.qty+1,this.aiFac));e+=Math.pow(r,.73)}}this.prodMult=e<1?1:e},Industry.prototype.updateWarehouseSizeUsed=function(e){for(var t in e instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse&&e.updateMaterialSizeUsed(),this.products)if(this.products.hasOwnProperty(t)){var n=this.products[t];e.sizeUsed+=n.data[e.loc][0]*n.siz,n.data[e.loc][0]>0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"<br>")}},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_21__.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_40__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var i=0;for(var r in this.offices)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;a<Cities.length;++a)if(this.warehouses[Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var i=this.warehouses[Cities[a]];for(var r in t)t.hasOwnProperty(r)&&i.materials[r].processMarket();for(var o=0;o<n.length;++o)i.materials[n[o]].processMarket();i.materials.Hardware.processMarket(),i.materials.Robots.processMarket(),i.materials.AICores.processMarket(),i.materials.RealEstate.processMarket()}},Industry.prototype.processProductMarket=function(e=1){for(var t in this.products)if(this.products.hasOwnProperty(t)){var n=this.products[t],a=4e-4*Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(1,3);this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics||(a*=3),a*=e,n.dmd-=a,n.cmp+=a,n.cmp=Math.min(n.cmp,99.99),n.dmd=Math.max(n.dmd,.001)}},Industry.prototype.processMaterials=function(marketCycles=1,company){var revenue=0,expenses=0,industry=this;if(this.calculateProductionFactors(),"EXPORT"===this.state)for(let e=0;e<Cities.length;++e){var city=Cities[e],office=this.offices[city];if(this.warehouses[city]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var warehouse=this.warehouses[city];for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.imp=0}}}for(let i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city];if(this.warehouses[city]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var warehouse=this.warehouses[city];switch(this.state){case"PURCHASE":for(var matName in warehouse.materials)warehouse.materials.hasOwnProperty(matName)&&(!function(e,t){var n,a,i=warehouse.materials[e];warehouse.smartSupplyEnabled&&Object.keys(t.reqMats).includes(e)?(i.buy=t.reqMats[e]*warehouse.smartSupplyStore,a=i.buy*SecsPerMarketCycle*marketCycles):a=i.buy*SecsPerMarketCycle*marketCycles,n="RealEstate"==e?a:Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e]),(a=Math.min(a,n))>0&&(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()*this.getProductionMultiplier();let e;e=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var totalMatSize=0;for(let e=0;e<this.prodMats.length;++e)totalMatSize+=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[this.prodMats[e]];for(const e in this.reqMats){var normQty=this.reqMats[e];totalMatSize-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e]*normQty}if(totalMatSize>0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);e=Math.min(maxAmt,e)}e<0&&(e=0),warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac<=0&&(producableFrac=0,e=0),producableFrac>0&&e>0){for(const t in this.reqMats){var reqMatQtyNeeded=this.reqMats[t]*e*producableFrac;warehouse.materials[t].qty-=reqMatQtyNeeded,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(let t=0;t<this.prodMats.length;++t)warehouse.materials[this.prodMats[t]].qty+=e*producableFrac,warehouse.materials[this.prodMats[t]].qlt=office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]/90+Math.pow(this.sciResearch.qty,this.sciFac)+Math.pow(warehouse.materials.AICores.qty,this.aiFac)/1e4}else for(const e in this.reqMats)this.reqMats.hasOwnProperty(e)&&(warehouse.materials[e].prd=0);const t=e*producableFrac/(SecsPerMarketCycle*marketCycles);for(let e=0;e<this.prodMats.length;++e)warehouse.materials[this.prodMats[e]].prd=t}else for(const e in this.reqMats)warehouse.materials[e].prd=0;break;case"SALE":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];if(mat.sCost<0||!1===mat.sllman[0]){mat.sll=0;continue}const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(mat),markupLimit=mat.getMarkupLimit();var sCost;if(mat.marketTa2){const e=mat.prd,t=markupLimit,n=e,a=(mat.qlt+.001)*marketFactor*businessFactor*company.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),i=Math.sqrt(n/a),r=t/i+mat.bCost;mat.marketTa2Price=r,sCost=r}else mat.marketTa1?sCost=mat.bCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__.isString)(mat.sCost)?(sCost=mat.sCost.replace(/MP/g,mat.bCost),sCost=eval(sCost)):sCost=mat.sCost;let markup=1;sCost>mat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost<mat.bCost&&(markup=sCost<=0?1e12:mat.bCost/sCost);var maxSell=(mat.qlt+.001)*marketFactor*markup*businessFactor*company.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__.isString)(mat.sllman[1])){var tmp=mat.sllman[1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,mat.prd);try{sellAmt=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Error evaluating your sell amount for material "+mat.name+" in "+this.name+"'s "+city+" office. The sell amount is being set to zero"),sellAmt=0}sellAmt=Math.min(maxSell,sellAmt)}else sellAmt=-1===mat.sllman[1]?maxSell:Math.min(maxSell,mat.sllman[1]);if(sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(mat.qty,sellAmt),sellAmt<0){console.log("sellAmt calculated to be negative"),mat.sll=0;continue}sellAmt&&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<mat.exp.length;++expI){var exp=mat.exp[expI],amt=exp.amt.replace(/MAX/g,mat.qty/(SecsPerMarketCycle*marketCycles));try{amt=eval(amt)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Calculating export for "+mat.name+" in "+this.name+"'s "+city+" division failed with error: "+e);continue}if(isNaN(amt))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Error calculating export amount for "+mat.name+" in "+this.name+"'s "+city+" division.");else{if(amt=amt*SecsPerMarketCycle*marketCycles,mat.qty<amt&&(amt=mat.qty),0===amt)break;for(var foo=0;foo<company.divisions.length;++foo)if(company.divisions[foo].name===exp.ind){var expIndustry=company.divisions[foo],expWarehouse=expIndustry.warehouses[exp.city];if(!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse)){console.log("ERROR: Invalid export! "+expIndustry.name+" "+exp.city);break}if(expWarehouse.sizeUsed>=expWarehouse.size)return;var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.log("ERROR: Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(const t in this.products){const n=this.products[t];if(!n.fin){const t=n.createCity,a=this.offices[t],i=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],r=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],o=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],s=i+r+o;if(s<=0)break;const l=1+r/(1.2*s),c=(Math.pow(i,.34)+Math.pow(o,.2))*l;n.createProduct(e,c),n.prog>=100&&n.finishProduct(a.employeeProd,this);break}}for(var a in this.products)if(this.products.hasOwnProperty(a)){var i=this.products[a];i instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&i.fin&&(n+=this.processProduct(e,i,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<Cities.length;++i){let city=Cities[i],office=this.offices[city],warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse)switch(this.state){case"PRODUCTION":var maxProd=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let prod;prod=product.prdman[city][0]?Math.min(maxProd,product.prdman[city][1]):maxProd,prod*=SecsPerMarketCycle*marketCycles;var netStorageSize=product.siz;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var normQty=product.reqMats[reqMatName];netStorageSize-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[reqMatName]*normQty}if(netStorageSize>0){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].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac>0&&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);product.pCost*=ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;var sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,n=e,a=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),i=Math.sqrt(n/a);let r;r=0===a||0===i?0:t/i+product.pCost,product.marketTa2Price[city]=r,sCost=r}else product.marketTa1?sCost=product.pCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__.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_21__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break;case"START":case"PURCHASE":case"EXPORT":break;default:console.log("ERROR: Invalid State: "+this.state)}}return totalProfit},Industry.prototype.discontinueProduct=function(e){for(var t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]},Industry.prototype.upgrade=function(e,t){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(let e=0;e<a.employees.length;++e)a.employees[e].ene=Math.min(1.05*a.employees[e].ene,a.maxEne);break;case 1:var r=n.getAdvertisingMultiplier()*this.getAdvertisingMultiplier();this.awareness+=3*r,this.popularity+=1*r,this.awareness*=1.01*r,this.popularity*=(1+Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(1,3)/100)*r;break;default:console.log("ERROR: Un-implemented function index: "+i)}},Industry.prototype.getOfficeProductivity=function(e,t){const n=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],a=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],i=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],r=n+a+i;if(r<=0)return 0;const o=1+i/(1.2*r),s=(Math.pow(n,.4)+Math.pow(a,.3))*o;return t&&t.forProduct?.025*s:.05*s},Industry.prototype.getBusinessFactor=function(e){const t=1+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business];return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_20__.calculateEffectWithFactors)(t,.26,1e4)},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.hasResearch=function(e){return!0===this.researched[e]},Industry.prototype.updateResearchTree=function(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type];if(Object.keys(e.researched).length!==Object.keys(this.researched).length){console.log("Updating Corporation Research Tree Data");for(let t in this.researched)e.research(t)}},Industry.prototype.getAdvertisingMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getAdvertisingMultiplier()},Industry.prototype.getEmployeeChaMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeChaMultiplier()},Industry.prototype.getEmployeeCreMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeCreMultiplier()},Industry.prototype.getEmployeeEffMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeEffMultiplier()},Industry.prototype.getEmployeeIntMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeIntMultiplier()},Industry.prototype.getProductionMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getProductionMultiplier()},Industry.prototype.getProductProductionMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getProductProductionMultiplier()},Industry.prototype.getSalesMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getSalesMultiplier()},Industry.prototype.getScientificResearchMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getScientificResearchMultiplier()},Industry.prototype.getStorageMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getStorageMultiplier()},Industry.prototype.createResearchBox=function(){const e="corporation-research-popup-box";researchTreeBoxOpened&&(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)(e),researchTreeBox=null);const t=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type];researchTreeBox=Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__.createPopup)(e,[],{backgroundColor:"black"});const n=t.createTreantMarkup();n.chart.container="#"+e+"-content",n.chart.nodeAlign="BOTTOM",n.chart.rootOrientation="WEST",n.chart.siblingSeparation=40,n.chart.connectors={type:"step",style:{"arrow-end":"block-wide-long",stroke:"white","stroke-width":2}};new Treant(n);const a=t.getAllNodes();for(let e=0;e<a.length;++e){if(!0===this.researched[a[e]])continue;const n=_ResearchMap__WEBPACK_IMPORTED_MODULE_9__.ResearchMap[a[e]],i=a[e].replace(/\s/g,""),r=document.getElementById(i+"-corp-research-click-listener");null!=r?r.addEventListener("click",()=>{if(this.sciResearch.qty>=n.cost)return this.sciResearch.qty-=n.cost,t.research(a[e]),this.researched[a[e]]=!0,Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)(`Researched ${a[e]}. It may take a market cycle `+`(~${SecsPerMarketCycle} seconds) before the effects of `+"the Research apply."),this.createResearchBox();Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)(`You do not have enough Scientific Research for ${n.name}`)}):console.warn(`Could not find Research Tree div for ${i}`)}const i=document.getElementById(`${e}-content`);null!=i&&(Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_24__.appendLineBreaks)(i,2),i.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("pre",{display:"block",innerText:"Multipliers from research:\n"+` * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n`+` * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n`+` * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n`+` * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n`+` * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n`+` * Production Multiplier: x${t.getProductionMultiplier()}\n`+` * Sales Multiplier: x${t.getSalesMultiplier()}\n`+` * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n`+` * Storage Multiplier: x${t.getStorageMultiplier()}`})),i.appendChild(Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_27__.createPopupCloseButton)(researchTreeBox,{class:"std-button",display:"block",innerText:"Close"}))),researchTreeBoxOpened=!0},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Reviver.constructors.Industry=Industry,Employee.prototype.process=function(e=1,t){var n=.003*e,a=n*Math.random();this.age+=n,this.exp+=n,this.age>150&&(this.int-=a,this.eff-=a,this.cha-=a),this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.salary+=EmployeeRaiseAmount,this.cyclesUntilRaise+=CyclesPerEmployeeRaise);var i=n*Math.random();return this.pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=a,this.hap-=a,this.ene<t.minEne&&(this.ene=t.minEne),this.hap<t.minHap&&(this.hap=t.minHap),this.sal*e*SecsPerMarketCycle},Employee.prototype.calculateProductivity=function(e,t){var n=this.cre*e.getEmployeeCreMultiplier()*t.getEmployeeCreMultiplier(),a=this.cha*e.getEmployeeChaMultiplier()*t.getEmployeeChaMultiplier(),i=this.int*e.getEmployeeIntMultiplier()*t.getEmployeeIntMultiplier(),r=this.eff*e.getEmployeeEffMultiplier()*t.getEmployeeEffMultiplier();const o=this.mor*this.hap*this.ene*1e-6;let s;switch(this.pos){case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations:s=.6*i+.1*a+this.exp+.5*n+r;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer:s=i+.1*a+1.5*this.exp+r;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business:s=.4*i+a+.5*this.exp;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management:s=2*a+this.exp+.2*n+.7*r;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD:s=1.5*i+.8*this.exp+n+.5*r;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned:case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training:s=0;break;default:console.log("ERROR: Invalid employee position: "+this.pos)}return o*s},Employee.prototype.throwParty=function(e){var t=1+e/1e7;return this.mor*=t,this.mor=Math.min(100,this.mor),this.hap*=t,this.hap=Math.min(100,this.hap),t},Employee.prototype.createUI=function(e,t,n){var a=this.cre*t.getEmployeeCreMultiplier()*n.getEmployeeCreMultiplier(),i=this.cha*t.getEmployeeChaMultiplier()*n.getEmployeeChaMultiplier(),r=this.int*t.getEmployeeIntMultiplier()*n.getEmployeeIntMultiplier(),o=this.eff*t.getEmployeeEffMultiplier()*n.getEmployeeEffMultiplier();e.style.color="white",e.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("p",{id:"cmpy-mgmt-employee-"+this.name+"-panel-text",innerHTML:"Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.mor,3)+"<br>Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.hap,3)+"<br>Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.ene,3)+"<br>Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.age,3)+"<br>Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(r,3)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(i,3)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(this.exp,3)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(a,3)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(o,3)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(this.sal,"$0.000a")+"/ s<br>"}));var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("select",{});for(var l in _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions)_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.hasOwnProperty(l)&&s.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("option",{text:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l],value:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l]}));s.addEventListener("change",()=>{this.pos=s.options[s.selectedIndex].value});for(var c=0;c<s.length;++c)if(s.options[c].value===this.pos){s.selectedIndex=c;break}e.appendChild(s)},Employee.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_toJSON)("Employee",this)},Employee.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_fromJSON)(Employee,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.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.maxEne=100,this.minHap=0,this.maxHap=100,this.maxMor=100,this.employees=[],this.employeeProd={[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD]:0,total:0}}function Corporation(e={}){this.name=e.name?e.name:"The Corporation",this.divisions=[],this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(15e10),this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.fundingRound=0,this.public=!1,this.totalShares=INITIALSHARES,this.numShares=INITIALSHARES,this.shareSalesUntilPriceUpdate=SHARESPERPRICEUPDATE,this.shareSaleCooldown=0,this.issueNewSharesCooldown=0,this.dividendPercentage=0,this.dividendTaxPercentage=50,this.issuedShares=0,this.sharePrice=0,this.storedCycles=0;var t=Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__.CorporationUnlockUpgrades).length,n=Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__.CorporationUpgrades).length;this.unlockUpgrades=Array(t).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1),this.state=new _CorporationState__WEBPACK_IMPORTED_MODULE_0__.CorporationState}let corpRouting,eventHandler,companyManagementDiv;OfficeSpace.prototype.atCapacity=function(){return this.employees.length>=this.size},OfficeSpace.prototype.process=function(e=1,t){t.corporation;var n=t.industry;if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const e=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&(e.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);var a=1;n.funds<0&&n.lastCycleRevenue<0?a=Math.pow(.99,e):n.funds>0&&n.lastCycleRevenue>0&&(a=Math.pow(1.01,e));const i=n.hasResearch("AutoBrew"),r=n.hasResearch("AutoPartyManager");var o=0;for(let t=0;t<this.employees.length;++t){const n=this.employees[t];r?(n.mor=this.maxMor,n.hap=this.maxHap):(n.mor*=a,n.hap*=a,n.mor=Math.min(n.mor,this.maxMor),n.hap=Math.min(n.hap,this.maxHap)),i?n.ene=this.maxEne:(n.ene*=a,n.ene=Math.min(n.ene,this.maxEne)),o+=n.process(e,this)}return this.calculateEmployeeProductivity(t),o},OfficeSpace.prototype.calculateEmployeeProductivity=function(e){var t=e.corporation,n=e.industry;for(const e in this.employeeProd)this.employeeProd[e]=0;var a=0;for(let e=0;e<this.employees.length;++e){const i=this.employees[e],r=i.calculateProductivity(t,n);this.employeeProd[i.pos]+=r,a+=r}this.employeeProd.total=a},OfficeSpace.prototype.findEmployees=function(e){e.corporation,e.industry;if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(25,50)/100,n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(51,75)/100,a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(76,100)/100,i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),c=EmployeeSalaryMultiplier*(i+r+o+s+l),u=new Employee({intelligence:i*t,charisma:r*t,experience:o*t,creativity:s*t,efficiency:l*t,salary:c*t}),p=new Employee({intelligence:i*n,charisma:r*n,experience:o*n,creativity:s*n,efficiency:l*n,salary:c*n}),m=new Employee({intelligence:i*a,charisma:r*a,experience:o*a,creativity:s*a,efficiency:l*a,salary:c*a}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("h1",{innerHTML:"Select one of the following candidates for hire:"}),d=function(t,n){return Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerHTML:"Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.int,1)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.cha,1)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.exp,1)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.cre,1)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.formatNumber)(t.eff,1)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(t.sal,"$0.000a")+" s<br>",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),_=[h,d(u,this),d(p,this),d(m,this),g];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__.createPopup)("cmpy-mgmt-hire-employee-popup",_)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,a=(t.industry,Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxGetYesButton)()),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxGetNoButton)();a.innerHTML="Hire",i.innerHTML="Cancel",a.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxGetInput)(),a=0;a<this.employees.length;++a)if(this.employees[a].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("You already have an employee with this nickname! Please give every employee a unique nickname."),!1;return e.name=t,this.employees.push(e),n.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxClose)()}),i.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoTxtInpBoxCreate)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var e=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(76,100)/100,t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_29__.getRandomInt)(50,100),o=new Employee({intelligence:t*e,charisma:n*e,experience:a*e,creativity:i*e,efficiency:r*e,salary:EmployeeSalaryMultiplier*(t+n+a+i+r)*e}),s=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.generateRandomString)(7);for(let e=0;e<this.employees.length;++e)if(this.employees[e].name===s)return this.hireRandomEmployee();return o.name=s,this.employees.push(o),o}},OfficeSpace.prototype.assignEmployeeToJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned)return this.employees[t].pos=e,!0;return!1},OfficeSpace.prototype.unassignEmployeeFromJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===e)return this.employees[t].pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned,!0;return!1},OfficeSpace.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_toJSON)("OfficeSpace",this)},OfficeSpace.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_fromJSON)(OfficeSpace,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Reviver.constructors.OfficeSpace=OfficeSpace,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){const t=this.getState(),n=1,a=n*CyclesPerIndustryStateCycle;if(this.storedCycles-=a,this.divisions.forEach(function(a){a.process(n,t,e)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=a),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=a),"START"===t){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(0),this.divisions.forEach(e=>{e.lastCycleRevenue!==-1/0&&e.lastCycleRevenue!==1/0&&e.lastCycleExpenses!==-1/0&&e.lastCycleExpenses!==1/0&&(this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses))});const e=this.revenue.minus(this.expenses).times(n*SecsPerMarketCycle);if(isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.<br><br>(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_40__.a(15e10)),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>DividendMaxPercentage)console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);else{const t=this.dividendPercentage/100*e,n=e-t,a=t/this.totalShares,i=this.numShares*a*(1-this.dividendTaxPercentage/100);_Player__WEBPACK_IMPORTED_MODULE_17__.a.gainMoney(i),_Player__WEBPACK_IMPORTED_MODULE_17__.a.recordMoneySource(i,"corporation"),this.funds=this.funds.plus(n)}else this.funds=this.funds.plus(e);this.updateSharePrice()}this.state.nextState(),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__.Page.Corporation)&&this.rerender()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(this.dividendPercentage>0&&(t*=(100-this.dividendPercentage)/100),e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=315e3*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__.BitNodeMultipliers.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();let n=4;switch(this.fundingRound){case 0:e=.1,n=4;break;case 1:e=.35,n=3;break;case 2:e=.25,n=3;break;case 3:e=.2,n=2.5;break;case 4:return}var a=t*e*n,i=Math.floor(INITIALSHARES*e),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxGetYesButton)(),o=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxGetNoButton)();r.innerHTML="Accept",o.innerHML="Reject",r.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(a),this.numShares-=i,this.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxClose)())),o.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_34__.yesNoBoxCreate)("An investment firm has offered you "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(a,"$0.000a")+" in funding in exchange for a "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(100*e,"0.000a")+"% stake in the company ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(i,"0.000a")+" shares).<br><br>Do you accept or reject this offer?<br><br>Hint: Investment firms will offer more money if your corporation is turning a profit")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/this.totalShares,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(t,"$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).<br><br>You have a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.format(this.numShares,"0.000a")+" of shares that you can issue."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.ENTER&&e.click()}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(a.value),t=this.determineValuation()/this.totalShares;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.rerender(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-go-public-popup"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)(`You took your ${this.name} public and earned `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_18__.numeralWrapper.formatMoney(e*t)} in your IPO`),!1)}});var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_26__.createPopup)("cmpy-mgmt-go-public-popup",[n,i,a,e,r])},Corporation.prototype.getTargetSharePrice=function(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)},Corporation.prototype.updateSharePrice=function(){const e=this.getTargetSharePrice();this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.immediatelyUpdateSharePrice=function(){this.sharePrice=this.getTargetSharePrice()},Corporation.prototype.calculateShareSale=function(e){let t=e,n=this.shareSalesUntilPriceUpdate,a=this.sharePrice,i=0,r=0;const o=Math.ceil(e/SHARESPERPRICEUPDATE);if(!(isNaN(o)||o>1e7)){for(let e=0;e<o;++e){if(t<n){r+=a*t,n-=t;break}r+=a*n,t-=n=SHARESPERPRICEUPDATE,i+=n,a=this.determineValuation()/(2*(this.totalShares+i-this.numShares))}return[r,a,n]}console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${o}`)},Corporation.prototype.convertCooldownToString=function(e){_Constants__WEBPACK_IMPORTED_MODULE_12__.CONSTANTS.MilliPerCycle;const t=e/5;return t>3600?`${Math.floor(t/3600)} hour(s)`:t>60?`${Math.floor(t/60)} minute(s)`:`${Math.floor(t)} second(s)`},Corporation.prototype.unlock=function(e){const t=e[0],n=e[1];for(;this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_21__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n),5===t?this.dividendTaxPercentage-=5:6===t&&(this.dividendTaxPercentage-=10))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],a=e[2],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_21__.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.divisions.length;++o){var s=this.divisions[o];for(var l in s.warehouses)s.warehouses.hasOwnProperty(l)&&s.warehouses[l]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse&&s.warehouses[l].updateSize(this,s)}},Corporation.prototype.getProductionMultiplier=function(){var e=this.upgradeMultipliers[0];return isNaN(e)||e<1?1:e},Corporation.prototype.getStorageMultiplier=function(){var e=this.upgradeMultipliers[1];return isNaN(e)||e<1?1:e},Corporation.prototype.getDreamSenseGain=function(){var e=this.upgradeMultipliers[2]-1;return e<=0?0:e},Corporation.prototype.getAdvertisingMultiplier=function(){var e=this.upgradeMultipliers[3];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeCreMultiplier=function(){var e=this.upgradeMultipliers[4];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeChaMultiplier=function(){var e=this.upgradeMultipliers[5];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeIntMultiplier=function(){var e=this.upgradeMultipliers[6];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeEffMultiplier=function(){var e=this.upgradeMultipliers[7];return isNaN(e)||e<1?1:e},Corporation.prototype.getSalesMultiplier=function(){var e=this.upgradeMultipliers[8];return isNaN(e)||e<1?1:e},Corporation.prototype.getScientificResearchMultiplier=function(){var e=this.upgradeMultipliers[9];return isNaN(e)||e<1?1:e},Corporation.prototype.getStarterGuide=function(){let e=_Player__WEBPACK_IMPORTED_MODULE_17__.a.getHomeComputer(),t=!1,n="corporation-management-handbook.lit";for(let a=0;a<e.messages.length;++a)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_30__.isString)(e.messages[a])&&e.messages[a]===n){t=!0;break}return t||e.messages.push(n),Object(_Literature__WEBPACK_IMPORTED_MODULE_14__.b)(n),!1},Corporation.prototype.createUI=function(){companyManagementDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_25__.createElement)("div",{id:"cmpy-mgmt-container",position:"fixed",class:"generic-menupage-container"}),document.getElementById("entire-game-container").appendChild(companyManagementDiv),corpRouting=new _ui_Routing__WEBPACK_IMPORTED_MODULE_39__.CorporationRouting(this),eventHandler=new _ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_37__.a(this,corpRouting),this.rerender()},Corporation.prototype.rerender=function(){null!=companyManagementDiv&&null!=corpRouting&&null!=eventHandler?_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_19__.Page.Corporation)&&react_dom__WEBPACK_IMPORTED_MODULE_36___default.a.render(react__WEBPACK_IMPORTED_MODULE_35___default.a.createElement(_ui_Root__WEBPACK_IMPORTED_MODULE_38__.a,{corp:this,routing:corpRouting,eventHandler:eventHandler}),companyManagementDiv):console.warn("Corporation.rerender() called when companyManagementDiv, corpRouting, or eventHandler is null")},Corporation.prototype.clearUI=function(){companyManagementDiv instanceof HTMLElement&&(react_dom__WEBPACK_IMPORTED_MODULE_36___default.a.unmountComponentAtNode(companyManagementDiv),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_33__.removeElementById)(companyManagementDiv.id)),companyManagementDiv=null,document.getElementById("character-overview-wrapper").style.visibility="visible"},Corporation.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_toJSON)("Corporation",this)},Corporation.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Generic_fromJSON)(Corporation,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_23__.Reviver.constructors.Corporation=Corporation}).call(this,__webpack_require__(79))},function(e,t,n){"use strict";n.d(t,"c",function(){return P}),n.d(t,"d",function(){return A}),n.d(t,"e",function(){return w}),n.d(t,"i",function(){return N}),n.d(t,"h",function(){return I}),n.d(t,"j",function(){return L}),n.d(t,"q",function(){return D}),n.d(t,"p",function(){return j}),n.d(t,"n",function(){return F}),n.d(t,"m",function(){return U}),n.d(t,"g",function(){return Y}),n.d(t,"r",function(){return ee}),n.d(t,"k",function(){return R}),n.d(t,"o",function(){return G}),n.d(t,"l",function(){return T}),n.d(t,"f",function(){return O}),n.d(t,"a",function(){return k}),n.d(t,"b",function(){return C});var a=n(35),i=n(86),r=n(1),o=n(6),s=n(50),l=n(39),c=n(0),u=n(12),p=n(3),m=n(9),h=n(22),d=n(17),g=n(43),_=n(15),f=n(31),y=n(4),b=n(33),v=n(26),E=n(25),k={LimitBuy:"Limit Buy Order",LimitSell:"Limit Sell Order",StopBuy:"Stop Buy Order",StopSell:"Stop Sell Order"},C={Long:"L",Short:"S"};function T(e,t,n,i,r,o=null){var s=o instanceof l.b,c=new M(e,t,n,i,r);if(isNaN(t)||isNaN(n))return s?o.scriptRef.log("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"):Object(m.dialogBoxCreate)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;if(null==P.Orders){var u={};for(var p in P)if(P.hasOwnProperty(p)){if(!((e=P[p])instanceof a.Stock))continue;u[e.symbol]=[]}P.Orders=u}return P.Orders[e.symbol].push(c),H(c.stock,c.type,c.pos),te(c.stock),!0}function O(e,t=null){var n=t instanceof l.b;if(null==P.Orders)return!1;if(e.order&&e.order instanceof M){for(var i=e.order,r=P.Orders[i.stock.symbol],o=0;o<r.length;++o)if(i==r[o])return r.splice(o,1),te(i.stock),!0;return!1}if(e.stock&&e.shares&&e.price&&e.type&&e.pos&&e.stock instanceof a.Stock){r=P.Orders[e.stock.symbol];var s=e.stock.symbol+" - "+e.shares+" @ "+p.numeralWrapper.format(e.price,"$0.000a");for(o=0;o<r.length;++o){i=r[o];if(e.shares===i.shares&&e.price===i.price&&e.type===i.type&&e.pos===i.pos)return r.splice(o,1),te(i.stock),n&&t.scriptRef.log("Successfully cancelled order: "+s),!0}return n&&t.scriptRef.log("Failed to cancel order: "+s),!1}return!1}function S(e){var t=e.stock,n=P.Orders[t.symbol],a=!0;switch(console.log("Executing the following order:"),console.log(e),e.type){case k.LimitBuy:case k.StopBuy:e.pos===C.Long?a=B(e.stock,e.shares)&&a:e.pos===C.Short&&(a=j(e.stock,e.shares)&&a);break;case k.LimitSell:case k.StopSell:e.pos===C.Long?a=W(e.stock,e.shares)&&a:e.pos===C.Short&&(a=F(e.stock,e.shares)&&a)}if(a){for(var i=0;i<n.length;++i)if(e==n[i])return n.splice(i,1),void te(e.stock);console.log("ERROR: Could not find the following Order in Order Book: "),console.log(e)}else console.log("Order failed to execute")}function M(e,t,n,a,i){this.stock=e,this.shares=t,this.price=n,this.type=a,this.pos=i}M.prototype.toJSON=function(){return Object(d.Generic_toJSON)("Order",this)},M.fromJSON=function(e){return Object(d.Generic_fromJSON)(M,e.data)},d.Reviver.constructors.Order=M;let P={},A={},w={},x={longestName:0,longestSymbol:0};function R(e){P=""===e?{}:JSON.parse(e,d.Reviver)}function N(){A[o.Locations.AevumECorp]="ECP",A[o.Locations.Sector12MegaCorp]="MGCP",A[o.Locations.Sector12BladeIndustries]="BLD",A[o.Locations.AevumClarkeIncorporated]="CLRK",A[o.Locations.VolhavenOmniTekIncorporated]="OMTK",A[o.Locations.Sector12FourSigma]="FSIG",A[o.Locations.ChongqingKuaiGongInternational]="KGI",A[o.Locations.AevumFulcrumTechnologies]="FLCM",A[o.Locations.IshimaStormTechnologies]="STM",A[o.Locations.NewTokyoDefComm]="DCOMM",A[o.Locations.VolhavenHeliosLabs]="HLS",A[o.Locations.NewTokyoVitaLife]="VITA",A[o.Locations.Sector12IcarusMicrosystems]="ICRS",A[o.Locations.Sector12UniversalEnergy]="UNV",A[o.Locations.AevumAeroCorp]="AERO",A[o.Locations.VolhavenOmniaCybersystems]="OMN",A[o.Locations.ChongqingSolarisSpaceSystems]="SLRS",A[o.Locations.NewTokyoGlobalPharmaceuticals]="GPH",A[o.Locations.IshimaNovaMedical]="NVMD",A[o.Locations.AevumWatchdogSecurity]="WDS",A[o.Locations.VolhavenLexoCorp]="LXO",A[o.Locations.AevumRhoConstruction]="RHOC",A[o.Locations.Sector12AlphaEnterprises]="APHE",A[o.Locations.VolhavenSysCoreSecurities]="SYSC",A[o.Locations.VolhavenCompuTek]="CTK",A[o.Locations.AevumNetLinkTechnologies]="NTLK",A[o.Locations.IshimaOmegaSoftware]="OMGA",A[o.Locations.Sector12FoodNStuff]="FNS",A["Sigma Cosmetics"]="SGC",A["Joes Guns"]="JGN",A["Catalyst Ventures"]="CTYS",A["Microdyne Technologies"]="MDYN",A["Titan Laboratories"]="TITN";for(const e in A)x.longestName=e.length>x.longestName?e.length:x.longestName,x.longestSymbol=A[e].length>x.longestSymbol?A[e].length:x.longestSymbol}function I(){for(var e in P)P.hasOwnProperty(e)&&delete P[e];const t=_.getRandomInt;var n=o.Locations.AevumECorp,i=new a.Stock(n,A[n],t(40,50)/100,!0,19,t(17e3,28e3),24e11);P[n]=i;var r=o.Locations.Sector12MegaCorp,s=new a.Stock(r,A[r],t(40,50)/100,!0,19,t(24e3,34e3),24e11);P[r]=s;var l=o.Locations.Sector12BladeIndustries,c=new a.Stock(l,A[l],t(70,80)/100,!0,13,t(12e3,25e3),16e11);P[l]=c;var u=o.Locations.AevumClarkeIncorporated,p=new a.Stock(u,A[u],t(65,75)/100,!0,12,t(1e4,25e3),15e11);P[u]=p;var m=o.Locations.VolhavenOmniTekIncorporated,h=new a.Stock(m,A[m],t(60,70)/100,!0,12,t(32e3,43e3),18e11);P[m]=h;var d=o.Locations.Sector12FourSigma,g=new a.Stock(d,A[d],t(100,110)/100,!0,17,t(5e4,8e4),2e12);P[d]=g;var f=o.Locations.ChongqingKuaiGongInternational,y=new a.Stock(f,A[f],t(75,85)/100,!0,10,t(16e3,28e3),19e11);P[f]=y;var b=o.Locations.AevumFulcrumTechnologies,v=new a.Stock(b,A[b],t(120,130)/100,!0,16,t(29e3,36e3),2e12);P[b]=v;var E=o.Locations.IshimaStormTechnologies,k=new a.Stock(E,A[E],t(80,90)/100,!0,7,t(2e4,25e3),12e11);P[E]=k;var C=o.Locations.NewTokyoDefComm,T=new a.Stock(C,A[C],t(60,70)/100,!0,10,t(6e3,19e3),9e11);P[C]=T;var O=o.Locations.VolhavenHeliosLabs,S=new a.Stock(O,A[O],t(55,65)/100,!0,9,t(1e4,18e3),825e9);P[O]=S;var M=o.Locations.NewTokyoVitaLife,w=new a.Stock(M,A[M],t(70,80)/100,!0,7,t(8e3,14e3),1e12);P[M]=w;var x=o.Locations.Sector12IcarusMicrosystems,R=new a.Stock(x,A[x],t(60,70)/100,!0,7.5,t(12e3,24e3),8e11);P[x]=R;var N=o.Locations.Sector12UniversalEnergy,I=new a.Stock(N,A[N],t(50,60)/100,!0,10,t(16e3,29e3),9e11);P[N]=I;var L=o.Locations.AevumAeroCorp,D=new a.Stock(L,A[L],t(55,65)/100,!0,6,t(8e3,17e3),64e10);P[L]=D;var B=o.Locations.VolhavenOmniaCybersystems,W=new a.Stock(B,A[B],t(65,75)/100,!0,4.5,t(6e3,15e3),6e11);P[B]=W;var j=o.Locations.ChongqingSolarisSpaceSystems,F=new a.Stock(j,A[j],t(70,80)/100,!0,8.5,t(14e3,28e3),705e9);P[j]=F;var U=o.Locations.NewTokyoGlobalPharmaceuticals,H=new a.Stock(U,A[U],t(55,65)/100,!0,10.5,t(12e3,3e4),695e9);P[U]=H;var G=o.Locations.IshimaNovaMedical,K=new a.Stock(G,A[G],t(70,80)/100,!0,5,t(15e3,27e3),6e11);P[G]=K;var q=o.Locations.AevumWatchdogSecurity,$=new a.Stock(q,A[q],t(240,260)/100,!0,1.5,t(4e3,8500),45e10);P[q]=$;var Y=o.Locations.VolhavenLexoCorp,z=new a.Stock(Y,A[Y],t(115,135)/100,!0,6,t(4500,8e3),3e11);P[Y]=z;var V=o.Locations.AevumRhoConstruction,J=new a.Stock(V,A[V],t(50,70)/100,!0,1,t(2e3,7e3),18e10);P[V]=J;var X=o.Locations.Sector12AlphaEnterprises,Q=new a.Stock(X,A[X],t(175,205)/100,!0,10,t(4e3,8500),24e10);P[X]=Q;var Z=o.Locations.VolhavenSysCoreSecurities,ee=new a.Stock(Z,A[Z],t(150,170)/100,!0,3,t(3e3,8e3),2e11);P[Z]=ee;var te=o.Locations.VolhavenCompuTek,ne=new a.Stock(te,A[te],t(80,100)/100,!0,4,t(1e3,6e3),185e9);P[te]=ne;var ae=o.Locations.AevumNetLinkTechnologies,ie=new a.Stock(ae,A[ae],t(400,430)/100,!0,1,t(1e3,5e3),58e9);P[ae]=ie;var re=o.Locations.IshimaOmegaSoftware,oe=new a.Stock(re,A[re],t(90,110)/100,!0,.5,t(1e3,8e3),6e10);P[re]=oe;var se=o.Locations.Sector12FoodNStuff,le=new a.Stock(se,A[se],t(70,80)/100,!1,1,t(500,4500),45e9);P[se]=le;var ce=new a.Stock("Sigma Cosmetics",A["Sigma Cosmetics"],t(260,300)/100,!0,0,t(1500,3500),3e10);P["Sigma Cosmetics"]=ce;var ue=new a.Stock("Joes Guns",A["Joes Guns"],t(360,400)/100,!0,1,t(250,1500),42e9);P["Joes Guns"]=ue;var pe="Catalyst Ventures",me=new a.Stock(pe,A[pe],t(120,175)/100,!0,13.5,t(250,1500),1e11);P[pe]=me;var he="Microdyne Technologies",de=new a.Stock(he,A[he],t(70,80)/100,!0,8,t(15e3,3e4),36e10);P[he]=de;var ge="Titan Laboratories",_e=new a.Stock(ge,A[ge],t(50,70)/100,!0,11,t(12e3,24e3),42e10);P[ge]=_e;var fe={};for(var ye in P)if(P.hasOwnProperty(ye)){var be=P[ye];if(!(be instanceof a.Stock))continue;fe[be.symbol]=[]}P.Orders=fe,P.storedCycles=0,P.lastUpdate=0}function L(){for(var e in A)if(A.hasOwnProperty(e)){var t=P[e];if(null==t){console.error(`Could not find Stock for ${e}`);continue}var n=A[e];w[n]=t}}function D(){for(var e in P)if(P.hasOwnProperty(e)){var t=P[e];if(!(t instanceof a.Stock))continue;var n=.6;t.b&&(n=.4),Math.random()<n&&(t.b=!t.b)}}function B(e,t){if(0==(t=Math.round(t))||t<0)return!1;if(null==e||isNaN(t))return Object(m.dialogBoxCreate)("Failed to buy stock. This may be a bug, contact developer"),!1;var n=e.price*t;if(c.a.money.lt(n+r.CONSTANTS.StockMarketCommission))return Object(m.dialogBoxCreate)("You do not have enough money to purchase this. You need "+p.numeralWrapper.format(n+r.CONSTANTS.StockMarketCommission,"($0.000a)")+"."),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return Object(m.dialogBoxCreate)(`You cannot purchase this many shares. ${e.symbol} has a maximum of `+`${p.numeralWrapper.formatBigNumber(e.maxShares)} shares.`),!1;var a=e.playerShares*e.playerAvgPx;c.a.loseMoney(n+r.CONSTANTS.StockMarketCommission);var i=a+n;return e.playerShares=Math.round(e.playerShares+t),e.playerAvgPx=i/e.playerShares,ee(e),Object(m.dialogBoxCreate)("Bought "+p.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+p.numeralWrapper.format(e.price,"($0.000a)")+" per share. Paid "+p.numeralWrapper.format(r.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."),!0}function W(e,t){if(0==t)return!1;if(null==e||t<0||isNaN(t))return Object(m.dialogBoxCreate)("Failed to sell stock. This may be a bug, contact developer"),!1;if((t=Math.round(t))>e.playerShares&&(t=e.playerShares),0===t)return!1;var n=e.price*t-r.CONSTANTS.StockMarketCommission;return c.a.gainMoney(n),c.a.recordMoneySource(n,"stock"),e.playerShares=Math.round(e.playerShares-t),0==e.playerShares&&(e.playerAvgPx=0),ee(e),Object(m.dialogBoxCreate)("Sold "+p.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+p.numeralWrapper.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+p.numeralWrapper.format(n,"($0.000a)")+"."),!0}function j(e,t,n=null){var a=n instanceof l.b;if(0===(t=Math.round(t))||t<0)return!1;if(null==e||isNaN(t))return a?n.scriptRef.log("ERROR: shortStock() failed because of invalid arguments."):Object(m.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;var i=e.price*t;if(c.a.money.lt(i+r.CONSTANTS.StockMarketCommission))return a?n.scriptRef.log("ERROR: shortStock() failed because you do not have enough money to purchase this short position. You need "+p.numeralWrapper.format(i+r.CONSTANTS.StockMarketCommission,"($0.000a)")+"."):Object(m.dialogBoxCreate)("You do not have enough money to purchase this short position. You need "+p.numeralWrapper.format(i+r.CONSTANTS.StockMarketCommission,"($0.000a)")+"."),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return a?n.scriptRef.log("ERROR: shortStock() failed because purchasing this many short shares would exceed "+`${e.symbol}'s maximum number of shares.`):Object(m.dialogBoxCreate)(`You cannot purchase this many shares. ${e.symbol} has a maximum of `+`${e.maxShares} shares.`),!1;var o=e.playerShortShares*e.playerAvgShortPx;c.a.loseMoney(i+r.CONSTANTS.StockMarketCommission);var s=o+i;return e.playerShortShares=Math.round(e.playerShortShares+t),e.playerAvgShortPx=s/e.playerShortShares,ee(e),a?null==n.disableLogs.ALL&&null==n.disableLogs.shortStock&&n.scriptRef.log("Bought a short position of "+p.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+p.numeralWrapper.format(e.price,"($0.000a)")+" per share. Paid "+p.numeralWrapper.format(r.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."):Object(m.dialogBoxCreate)("Bought a short position of "+p.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+p.numeralWrapper.format(e.price,"($0.000a)")+" per share. Paid "+p.numeralWrapper.format(r.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."),!0}function F(e,t,n=null){var a=n instanceof l.b;if(null==e||isNaN(t)||t<0)return a?n.scriptRef.log("ERROR: sellShort() failed because of invalid arguments."):Object(m.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 i=t*e.playerAvgShortPx,o=(e.playerAvgShortPx-e.price)*t-r.CONSTANTS.StockMarketCommission;return isNaN(o)&&(o=0),c.a.gainMoney(i+o),c.a.recordMoneySource(o,"stock"),a&&(n.scriptRef.onlineMoneyMade+=o,c.a.scriptProdSinceLastAug+=o),e.playerShortShares=Math.round(e.playerShortShares-t),0===e.playerShortShares&&(e.playerAvgShortPx=0),ee(e),a?null==n.disableLogs.ALL&&null==n.disableLogs.sellShort&&n.scriptRef.log("Sold your short position of "+p.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+p.numeralWrapper.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+p.numeralWrapper.format(i+o,"($0.000a)")+"."):Object(m.dialogBoxCreate)("Sold your short position of "+p.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+p.numeralWrapper.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+p.numeralWrapper.format(i+o,"($0.000a)")+"."),!0}function U(e=1){(null==P.storedCycles||isNaN(P.storedCycles))&&(P.storedCycles=0),P.storedCycles+=e;const t=6e3/r.CONSTANTS.MilliPerCycle;if(P.storedCycles<t)return;const n=(new Date).getTime();if(!(n-P.lastUpdate<4e3)){P.lastUpdate=n,P.storedCycles-=t;var i=Math.random();for(var o in P)if(P.hasOwnProperty(o)){var s=P[o];if(!(s instanceof a.Stock))continue;var l=i*s.mv/100;isNaN(l)&&(l=.02);var c=50;s.b?(c=(c+s.otlkMag)/100,isNaN(c)&&(c=.5)):(c=(c-s.otlkMag)/100,isNaN(c)&&(c=.5)),s.price>=s.cap&&(c=.1,s.b=!1);var p=Math.random();p<c?(s.price*=1+l,H(s,k.LimitBuy,C.Short),H(s,k.LimitSell,C.Long),H(s,k.StopBuy,C.Long),H(s,k.StopSell,C.Short),u.routing.isOn(u.Page.StockMarket)&&Z(s,!0)):(s.price/=1+l,H(s,k.LimitBuy,C.Long),H(s,k.LimitSell,C.Short),H(s,k.StopBuy,C.Short),H(s,k.StopSell,C.Long),u.routing.isOn(u.Page.StockMarket)&&Z(s,!1));var m=s.otlkMag*l;s.otlkMag<=.1&&(m=1),p<.5?s.otlkMag+=m:s.otlkMag-=m,s.otlkMag>50&&(s.otlkMag=50),s.otlkMag<0&&(s.otlkMag*=-1,s.b=!s.b)}}}function H(e,t,n){var i=P.Orders;if(null!=i){var r=i[e.symbol];if(null==r||r.constructor!==Array)return console.log("ERROR: Invalid Order book for "+e.symbol+" in processOrders()"),void(r=[]);for(var o=0;o<r.length;++o){var s=r[o];if(s.type===t&&s.pos===n)switch(s.type){case k.LimitBuy:s.pos===C.Long&&e.price<=s.price?S(s):s.pos===C.Short&&e.price>=s.price&&S(s);break;case k.LimitSell:case k.StopBuy:s.pos===C.Long&&e.price>=s.price?S(s):s.pos===C.Short&&e.price<=s.price&&S(s);break;case k.StopSell:s.pos===C.Long&&e.price<=s.price?S(s):s.pos===C.Short&&e.price>=s.price&&S(s);break;default:return void console.log("Invalid order type: "+s.type)}}}else{var l={};for(var c in P)if(P.hasOwnProperty(c)){if(!((e=P[c])instanceof a.Stock))continue;l[e.symbol]=[]}P.Orders=l}}function G(e){K=e}var K=!1,q=!1,$=r.CONSTANTS.StockMarketCommission;function Y(){function e(e,t,n,a,i){e.innerText=a,e.classList.remove("a-link-button"),e.classList.remove("a-link-button-bought"),e.classList.remove("a-link-button-inactive"),!n&&c.a.money.gte(t)?e.classList.add("a-link-button"):n?(e.innerText=i,e.classList.add("a-link-button-bought")):e.classList.add("a-link-button-inactive")}null==c.a.hasWseAccount&&(c.a.hasWseAccount=!1),null==c.a.hasTixApiAccess&&(c.a.hasTixApiAccess=!1),null==c.a.has4SData&&(c.a.has4SData=!1),null==c.a.has4SDataTixApi&&(c.a.has4SDataTixApi=!1);var t=Object(h.clearEventListeners)("stock-market-buy-account");e(t,r.CONSTANTS.WSEAccountCost,c.a.hasWseAccount,"Buy WSE Account - "+p.numeralWrapper.format(r.CONSTANTS.WSEAccountCost,"($0.000a)"),"WSE Account - Purchased"),t.addEventListener("click",function(){return c.a.hasWseAccount=!0,I(),L(),c.a.loseMoney(r.CONSTANTS.WSEAccountCost),Y(),!1});var n=Object(h.clearEventListeners)("stock-market-buy-tix-api");e(n,r.CONSTANTS.TIXAPICost,c.a.hasTixApiAccess,"Buy Trade Information eXchange (TIX) API Access - "+p.numeralWrapper.format(r.CONSTANTS.TIXAPICost,"($0.000a)"),"TIX API Access - Purchased"),n.addEventListener("click",function(){return c.a.hasTixApiAccess=!0,c.a.loseMoney(r.CONSTANTS.TIXAPICost),Y(),!1});var o=Object(h.clearEventListeners)("stock-market-buy-4s-data");e(o,Object(i.getStockMarket4SDataCost)(),c.a.has4SData,"Buy 4S Market Data Access - "+p.numeralWrapper.format(Object(i.getStockMarket4SDataCost)(),"($0.000a)"),"4S Market Data - Purchased"),o.addEventListener("click",function(){return!c.a.money.lt(Object(i.getStockMarket4SDataCost)())&&(c.a.has4SData=!0,c.a.loseMoney(Object(i.getStockMarket4SDataCost)()),Y(),!1)}),o.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you view additional pricing and volatility information about stocks"})),o.style.marginRight="2px";var s=Object(h.clearEventListeners)("stock-market-4s-data-help-tip");s.style.marginTop="10px",s.addEventListener("click",()=>(Object(m.dialogBoxCreate)("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility<br><br>Price Forecast indicates the probability the stock has of increasing or decreasing. A '+' forecast means the stock has a higher chance of increasing than decreasing, and a '-' means the opposite. The number of '+/-' symbols is used to illustrate the magnitude of these probabilities. For example, '+++' means that the stock has a significantly higher chance of increasing than decreasing, while '+' means that the stock only has a slightly higher chance of increasing than decreasing.<br><br>Volatility represents the maximum percentage by which a stock's price can change every tick (a tick occurs every few seconds while the game is running).<br><br>A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change."),!1));var l=Object(h.clearEventListeners)("stock-market-buy-4s-tix-api");if(e(l,Object(i.getStockMarket4STixApiCost)(),c.a.has4SDataTixApi,"Buy 4S Market Data TIX API Access - "+p.numeralWrapper.format(Object(i.getStockMarket4STixApiCost)(),"($0.000a)"),"4S Market Data TIX API - Purchased"),c.a.hasTixApiAccess?(l.addEventListener("click",function(){return!c.a.money.lt(Object(i.getStockMarket4STixApiCost)())&&(c.a.has4SDataTixApi=!0,c.a.loseMoney(Object(i.getStockMarket4STixApiCost)()),Y(),!1)}),l.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you access 4S Market Data through Netscript"}))):(l.classList.remove("a-link-button"),l.classList.remove("a-link-button-bought"),l.classList.remove("a-link-button-inactive"),l.classList.add("a-link-button-inactive"),l.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Requires TIX API Access"}))),null!=(E=document.getElementById("stock-market-list"))){var u=document.getElementById("stock-market-commission"),d=document.getElementById("stock-market-mode"),g=document.getElementById("stock-market-expand-tickers"),_=document.getElementById("stock-market-collapse-tickers"),b=document.getElementById("stock-market-watchlist-filter"),v=document.getElementById("stock-market-watchlist-filter-update");if(!c.a.hasWseAccount){for(K=!1;E.firstChild;)E.removeChild(E.firstChild);return u.style.visibility="hidden",d.style.visibility="hidden",g.style.visibility="hidden",_.style.visibility="hidden",b.style.visibility="hidden",void(v.style.visibility="hidden")}if(u.style.visibility="visible",d.style.visibility="visible",g.style.visibility="visible",_.style.visibility="visible",b.style.visibility="visible",v.style.visibility="visible",!K&&c.a.hasWseAccount){console.log("Creating Stock Market UI"),u.innerHTML="Commission Fees: Every transaction you make has a "+p.numeralWrapper.format(r.CONSTANTS.StockMarketCommission,"($0.000a)")+" commission fee.<br><br>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(h.clearEventListeners)("stock-market-investopedia").addEventListener("click",function(){return Object(m.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.<br><br>NOTE: Shorting stocks is not available immediately, and must be unlocked later on in the game.<br><br>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.<br><br>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.<br><br>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.<br><br>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.<br><br>Here is a summary of how each order works and when they execute:<br><br>In a LONG Position:<br><br>A Limit Order to buy will execute if the stock's price <= order's price<br>A Limit Order to sell will execute if the stock's price >= order's price<br>A Stop Order to buy will execute if the stock's price >= order's price<br>A Stop Order to sell will execute if the stock's price <= order's price<br><br>In a SHORT Position:<br><br>A Limit Order to buy will execute if the stock's price >= order's price<br>A Limit Order to sell will execute if the stock's price <= order's price<br>A Stop Order to buy will execute if the stock's price <= order's price<br>A Stop Order to sell will execute if the stock's price >= order's price."),!1}),d&&(q=!1,d.innerHTML="Switch to 'Portfolio' Mode<span class='tooltiptext'>Displays only the stocks for which you have shares or orders</span>",d.addEventListener("click",z));var E=document.getElementById("stock-market-list");g&&g.addEventListener("click",()=>{for(var e=E.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")||e[t].click()}),_&&_.addEventListener("click",()=>{for(var e=E.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")&&e[t].click()}),b&&v?(P.watchlistFilter&&(b.value=P.watchlistFilter),v.addEventListener("click",()=>{let e=b.value.toString();P.watchlistFilter=e.replace(/\s/g,""),q?z():V()}),b.addEventListener("keyup",e=>{e.preventDefault(),e.keyCode===f.KEY.ENTER&&v.click()})):console.warn("Stock Market Watchlist DOM elements could not be found"),J(),K=!0}if(c.a.hasWseAccount)for(var k in P)if(P.hasOwnProperty(k)){var C=P[k];C instanceof a.Stock&&(Z(C,null),te(C))}}}function z(){q=!0;var e=Object(h.clearEventListeners)("stock-market-mode");e&&(e.innerHTML="Switch to 'All stocks' Mode<span class='tooltiptext'>Displays all stocks on the WSE</span>",e.addEventListener("click",V)),J()}function V(){q=!1;var e=Object(h.clearEventListeners)("stock-market-mode");e&&(e.innerHTML="Switch to 'Portfolio' Mode<span class='tooltiptext'>Displays only the stocks for which you have shares or orders</span>",e.addEventListener("click",z)),J()}function J(){var e=document.getElementById("stock-market-list");null==e&&Object(g.exceptionAlert)("Error creating Stock Tickers UI. DOM element with ID 'stock-market-list' could not be found"),Object(b.removeChildrenFromElement)(e);var t=P.Orders;if(null==t){var n={};for(var i in P)if(P.hasOwnProperty(i)){if(!((o=P[i])instanceof a.Stock))continue;n[o.symbol]=[]}P.Orders=n,t=P.Orders}let r=null;if(null!=P.watchlistFilter&&""!==P.watchlistFilter){r=P.watchlistFilter.replace(/\s/g,"").split(",")}for(var i in P)if(P.hasOwnProperty(i)){var o;if(!((o=P[i])instanceof a.Stock))continue;if(r&&!r.includes(o.symbol))continue;let e=t[o.symbol];if(q&&0===o.playerShares&&0===o.playerShortShares&&0===e.length)continue;X(o)}Q()}function X(e){if(e instanceof a.Stock){var t="stock-market-ticker-"+e.symbol,n=document.createElement("li"),i=document.createElement("button"),r=document.createElement("pre");i.classList.add("accordion-header"),i.setAttribute("id",t+"-hdr"),r.textContent=e.name+" - "+e.symbol+" - "+p.numeralWrapper.format(e.price,"($0.000a)"),i.appendChild(r);var o=document.createElement("div");o.classList.add("accordion-panel"),o.setAttribute("id",t+"-panel");var l=document.createElement("input"),u=document.createElement("select",{class:"dropdown"}),h=document.createElement("select",{class:"dropdown"}),d=document.createElement("span"),g=document.createElement("span"),_=document.createElement("span"),f=document.createElement("span"),y=document.createElement("p"),b=document.createElement("ul");l.classList.add("stock-market-input"),l.placeholder="Quantity (Shares)",l.setAttribute("id",t+"-qty-input"),l.setAttribute("onkeydown","return ( event.ctrlKey || event.altKey || (47<event.keyCode && event.keyCode<58 && event.shiftKey==false) || (95<event.keyCode && event.keyCode<106) || (event.keyCode==8) || (event.keyCode==9) || (event.keyCode>34 && event.keyCode<40) || (event.keyCode==46) )"),u.classList.add("stock-market-input"),u.classList.add("dropdown"),u.setAttribute("id",t+"-pos-selector");var v=document.createElement("option");if(v.text="Long",u.add(v),8===c.a.bitNodeN||s.f&&s.h>=2){var O=document.createElement("option");O.text="Short",u.add(O)}h.classList.add("stock-market-input"),h.classList.add("dropdown"),h.setAttribute("id",t+"-order-selector");var S=document.createElement("option");if(S.text="Market Order",h.add(S),8===c.a.bitNodeN||s.f&&s.h>=3){var M=document.createElement("option");M.text="Limit Order",h.add(M);var P=document.createElement("option");P.text="Stop Order",h.add(P)}d.classList.add("stock-market-input"),d.classList.add("a-link-button"),d.innerHTML="Buy",d.addEventListener("click",()=>{var n=u.options[u.selectedIndex].text;n="Long"===n?C.Long:C.Short;var a=h.options[h.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===C.Long?B(e,i):j(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(E.yesNoTxtInpBoxGetYesButton)(),o=Object(E.yesNoTxtInpBoxGetNoButton)();r.innerText="Place Buy "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(E.yesNoTxtInpBoxGetInput)());t="Limit Order"===a?k.LimitBuy:k.StopBuy,T(e,i,r,t,n),Object(E.yesNoTxtInpBoxClose)()}),o.addEventListener("click",()=>{Object(E.yesNoTxtInpBoxClose)()}),Object(E.yesNoTxtInpBoxCreate)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),g.classList.add("stock-market-input"),g.classList.add("a-link-button"),g.innerHTML="Sell",g.addEventListener("click",()=>{var n=u.options[u.selectedIndex].text;n="Long"===n?C.Long:C.Short;var a=h.options[h.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===C.Long?W(e,i):F(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(E.yesNoTxtInpBoxGetYesButton)(),o=Object(E.yesNoTxtInpBoxGetNoButton)();r.innerText="Place Sell "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(E.yesNoTxtInpBoxGetInput)());t="Limit Order"===a?k.LimitSell:k.StopSell,Object(E.yesNoTxtInpBoxClose)(),T(e,i,r,t,n)}),o.addEventListener("click",()=>{Object(E.yesNoTxtInpBoxClose)()}),Object(E.yesNoTxtInpBoxCreate)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),_.classList.add("stock-market-input"),_.classList.add("a-link-button"),_.innerHTML="Buy MAX",_.addEventListener("click",()=>{var t=u.options[u.selectedIndex].text;t="Long"===t?C.Long:C.Short;var n=h.options[h.selectedIndex].text,a=c.a.money.toNumber();switch(n){case"Market Order":var i=Math.floor((a-$)/e.price);i=Math.min(i,Math.round(e.maxShares-e.playerShares-e.playerShortShares)),t===C.Long?B(e,i):j(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(E.yesNoTxtInpBoxGetYesButton)(),o=Object(E.yesNoTxtInpBoxGetNoButton)();r.innerText="Place Buy "+n,o.innerText="Cancel Order",r.addEventListener("click",()=>{var i,r=Number(Object(E.yesNoTxtInpBoxGetInput)());i="Limit Order"===n?k.LimitBuy:k.StopBuy;var o=Math.floor((a-$)/r);o=Math.min(o,Math.round(e.maxShares-e.playerShares-e.playerShortShares)),T(e,o,r,i,t),Object(E.yesNoTxtInpBoxClose)()}),o.addEventListener("click",()=>{Object(E.yesNoTxtInpBoxClose)()}),Object(E.yesNoTxtInpBoxCreate)("Enter the price for your "+n);break;default:console.log("ERROR: Invalid order type")}return!1}),f.classList.add("stock-market-input"),f.classList.add("a-link-button"),f.innerHTML="Sell ALL",f.addEventListener("click",()=>{var t=u.options[u.selectedIndex].text;switch(t="Long"===t?C.Long:C.Short,h.options[h.selectedIndex].text){case"Market Order":if(t===C.Long){var n=e.playerShares;W(e,n)}else{n=e.playerShortShares;F(e,n,null)}break;case"Limit Order":case"Stop Order":Object(m.dialogBoxCreate)("ERROR: 'Sell All' only works for Market Orders");break;default:console.log("ERROR: Invalid order type")}return!1}),y.setAttribute("id",t+"-position-text"),y.classList.add("stock-market-position-text"),e.posTxtEl=y,b.setAttribute("id",t+"-order-list"),b.classList.add("stock-market-order-list"),o.appendChild(l),o.appendChild(u),o.appendChild(h),o.appendChild(d),o.appendChild(g),o.appendChild(_),o.appendChild(f),o.appendChild(y),o.appendChild(b),n.appendChild(i),n.appendChild(o),document.getElementById("stock-market-list").appendChild(n),Z(e,!0),ee(e),te(e)}else console.log("Invalid stock in createStockSticker()")}function Q(){var e=document.getElementById("stock-market-list").getElementsByClassName("accordion-header");if(null!=e)for(var t=0;t<e.length;++t)e[t].onclick=function(){this.classList.toggle("active");var e=this.nextElementSibling;"block"===e.style.display?e.style.display="none":e.style.display="block"};else console.log("ERROR: Could not find header elements for stock tickers")}function Z(e,t){if(!u.routing.isOn(u.Page.StockMarket))return;if(!(e instanceof a.Stock))return console.log("Invalid stock in updateStockTicker():"),void console.log(e);var n="stock-market-ticker-"+e.symbol;(e.playerShares>0||e.playerShortShares>0)&&ee(e);var i=document.getElementById(n+"-hdr");if(null==i){if(!q){let t=P.watchlistFilter;""!==t&&t.includes(e.symbol)&&console.log("ERROR: Couldn't find ticker element for stock: "+e.symbol)}return}const r=p.numeralWrapper.format(e.price,"($0.000a)");let o=`${e.name}${" ".repeat(1+x.longestName-e.name.length+(x.longestSymbol-e.symbol.length))}${e.symbol} -${" ".repeat(10-r.length)}${r}`;c.a.has4SData&&(o+=` - Volatility: ${p.numeralWrapper.format(e.mv,"0,0.00")}% - Price Forecast: `,o+=(e.b?"+":"-").repeat(Math.floor(e.otlkMag/10)+1)),i.firstChild.textContent=o,null!=t&&(i.firstChild.style.color=t?"#66ff33":"red")}function ee(e){if(!u.routing.isOn(u.Page.StockMarket))return;if(!(e instanceof a.Stock))return console.log("Invalid stock in updateStockPlayerPosition():"),void console.log(e);var t="stock-market-ticker-"+e.symbol;if(q){if(0===e.playerShares&&0===e.playerShortShares&&P.Orders&&P.Orders[e.symbol]&&0===P.Orders[e.symbol].length)return Object(v.removeElementById)(t+"-hdr"),void Object(v.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return X(e),void Q()}if(e.posTxtEl instanceof Element||(e.posTxtEl=document.getElementById(t+"-position-text")),null==e.posTxtEl)return void console.log("ERROR: Could not find stock position element for: "+e.symbol);const n=e.playerShares*e.playerAvgPx;let i=(e.price-e.playerAvgPx)*e.playerShares,r=i/n;isNaN(r)&&(r=0);const o=e.playerShortShares*e.playerAvgShortPx;let l=(e.playerAvgShortPx-e.price)*e.playerShortShares,m=l/o;isNaN(m)&&(m=0),e.posTxtEl.innerHTML=`Max Shares: ${p.numeralWrapper.format(e.maxShares,"0.000a")}<br>`+"<h3 class='tooltip stock-market-position-text'>Long Position: <span class='tooltiptext'>Shares in the long position will increase in value if the price of the corresponding stock increases</span></h3><br>Shares: "+p.numeralWrapper.format(e.playerShares,"0,0")+"<br>Average Price: "+p.numeralWrapper.format(e.playerAvgPx,"$0.000a")+" (Total Cost: "+p.numeralWrapper.format(n,"$0.000a")+")<br>Profit: "+p.numeralWrapper.format(i,"$0.000a")+" ("+p.numeralWrapper.format(r,"0.00%")+")<br>",(8===c.a.bitNodeN||s.f&&s.h>=2)&&(e.posTxtEl.innerHTML+="<br><h3 class='tooltip stock-market-position-text'>Short Position: <span class='tooltiptext'>Shares in short position will increase in value if the price of the corresponding stock decreases</span></h3><br>Shares: "+p.numeralWrapper.format(e.playerShortShares,"0,0")+"<br>Average Price: "+p.numeralWrapper.formatMoney(e.playerAvgShortPx)+" (Total Cost: "+p.numeralWrapper.formatMoney(o)+")<br>Profit: "+p.numeralWrapper.formatMoney(l)+" ("+p.numeralWrapper.format(m,"0.00%")+")<br><br><h3 class='stock-market-position-text'>Orders:</h3>")}function te(e){if(u.routing.isOn(u.Page.StockMarket)){var t="stock-market-ticker-"+e.symbol,n=document.getElementById(t+"-order-list");if(null!=n){var a=P.Orders;if(null!=a){var i=a[e.symbol];if(null!=i){if(q){if(0===e.playerShares&&0===e.playerShortShares&&P.Orders&&P.Orders[e.symbol]&&0===P.Orders[e.symbol].length)return Object(v.removeElementById)(t+"-hdr"),void Object(v.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return X(e),void Q()}for(;n.firstChild;)n.removeChild(n.firstChild);for(var r=0;r<i.length;++r)!function(){var e=i[r],t=document.createElement("li");t.style.padding="4px";var a=e.pos===C.Long?"Long Position":"Short Position";t.style.color="white",t.innerText=e.type+" - "+a+" - "+e.shares+" @ "+p.numeralWrapper.format(e.price,"($0.000a)");var o=document.createElement("span");o.classList.add("stock-market-order-cancel-btn"),o.classList.add("a-link-button"),o.innerHTML="Cancel Order",o.addEventListener("click",function(){return O({order:e},null),!1}),t.appendChild(o),n.appendChild(t)}()}else console.log("ERROR: Could not find orders for: "+e.symbol)}else console.log("ERROR: Could not find order book in stock market")}else if(!q){let t=P.watchlistFilter;""!==t&&t.includes(e.symbol)&&console.log("ERROR: Could not find order list for "+e.symbol)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(287),i=n(286);t.Programs={};for(const e of i.programsMetadata)t.Programs[e.key]=new a.Program(e.name,e.create)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY={A:65,B:66,C:67,CTRL:17,D:68,DOWNARROW:40,E:69,ENTER:13,ESC:27,F:70,H:72,J:74,K:75,L:76,M:77,N:78,O:79,P:80,R:82,S:83,TAB:9,U:85,UPARROW:38,W:87,1:49,2:50}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(22);t.MainMenuLinks={Terminal:null,ScriptEditor:null,ActiveScripts:null,CreateProgram:null,Stats:null,Factions:null,Augmentations:null,HacknetNodes:null,Sleeves:null,City:null,Travel:null,Job:null,StockMarket:null,Bladeburner:null,Corporation:null,Gang:null,Tutorial:null,Options:null,DevMenu:null},t.initializeMainMenuLinks=function(){try{function e(e){const t=a.clearEventListeners(e);if(null==t)throw new Error(`clearEventListeners() failed for element with id: ${e}`);return t}return t.MainMenuLinks.Terminal=e("terminal-menu-link"),t.MainMenuLinks.ScriptEditor=e("create-script-menu-link"),t.MainMenuLinks.ActiveScripts=e("active-scripts-menu-link"),t.MainMenuLinks.CreateProgram=e("create-program-menu-link"),t.MainMenuLinks.Stats=e("stats-menu-link"),t.MainMenuLinks.Factions=e("factions-menu-link"),t.MainMenuLinks.Augmentations=e("augmentations-menu-link"),t.MainMenuLinks.HacknetNodes=e("hacknet-nodes-menu-link"),t.MainMenuLinks.Sleeves=e("sleeves-menu-link"),t.MainMenuLinks.City=e("city-menu-link"),t.MainMenuLinks.Travel=e("travel-menu-link"),t.MainMenuLinks.Job=e("job-menu-link"),t.MainMenuLinks.StockMarket=e("stock-market-menu-link"),t.MainMenuLinks.Bladeburner=e("bladeburner-menu-link"),t.MainMenuLinks.Corporation=e("corporation-menu-link"),t.MainMenuLinks.Gang=e("gang-menu-link"),t.MainMenuLinks.Tutorial=e("tutorial-menu-link"),t.MainMenuLinks.Options=document.getElementById("options-menu-link"),t.MainMenuLinks.DevMenu=e("dev-menu-link"),!0}catch(e){return console.error(`Failed to initialize Main Menu Links: ${e}`),!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(44),i=n(68);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";Object.defineProperty(t,"__esModule",{value:!0}),t.FconfSettings={ENABLE_BASH_HOTKEYS:!1,ENABLE_TIMESTAMPS:!1,MAIN_MENU_STYLE:"default",THEME_BACKGROUND_COLOR:"#000000",THEME_FONT_COLOR:"#66ff33",THEME_HIGHLIGHT_COLOR:"#ffffff",THEME_PROMPT_COLOR:"#f92672",WRAP_INPUT:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(17),i=n(15);class r{static fromJSON(e){return a.Generic_fromJSON(r,e.data)}constructor(e="",t="",n=1,a=!0,r=0,o=1e4,s=1e12){this.name=e,this.symbol=t,this.price=o,this.playerShares=0,this.playerAvgPx=0,this.playerShortShares=0,this.playerAvgShortPx=0,this.mv=n,this.b=a,this.otlkMag=r,this.cap=i.getRandomInt(1e3*o,25e3*o);let l=s/o;this.totalShares=1e5*Math.round(l/1e5);this.maxShares=1e5*Math.round(.2*this.totalShares/1e5),this.posTxtEl=null}toJSON(){return a.Generic_toJSON("Stock",this)}}t.Stock=r,a.Reviver.constructors.Stock=r},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return Q});var a=n(13),i=n(5),r=n(20),o=n(1),s=n(11),l=n(69),c=n(14),u=n(53),p=n(6),m=n(0),h=n(77),d=n(3),g=n(64),_=n(31),f=n(96),y=n(9),b=n(33),v=n(17),E=n(81),k=n(76),C=n(100),T=n(4),O=n(37),S=n(12),M=n(43),P=n(7),A=n(15),w=n(122),x=n(75),R=n(26);const N='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 166 132" style="fill:#adff2f;"><g><path d="M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"/><path d="M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"/></g></svg> ',I='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="-22 0 511 511.99561" style="fill:#adff2f;"><path d="m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"/><path d="m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"/><path d="m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"/><path d="m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"/></svg>',L=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],D=1e9;var B="bladeburner-active-action",W=0,j={helpList:"Use 'help [command]' to get more information about a particular Bladeburner console command.<br><br>automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks<br>clear/cls Clear the console<br>help [cmd] Display this help text, or help text for a specific command<br>log [en/dis] [type] Enable or disable logging for events and actions<br>skill [action] [name] Level or display info about your Bladeburner skills<br>start [type] [name] Start a Bladeburner action/task<br>stop Stops your current Bladeburner action/task<br>",automate:'automate [var] [val] [hi/low]<br><br>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.<br><br>automate status - Check the current status of your automation and get a brief description of what it\'ll do<br>automate en - Enable the automation feature<br>automate dis - Disable the automation feature<br><br>There are four properties that must be set for this automation to work properly. Here is how to set them:<br><br>automate stamina 100 high<br>automate contract Tracking high<br>automate stamina 50 low<br>automate general "Field Analysis" low<br><br>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<br><br>Clears the console",cls:"cls<br><br>Clears the console",help:"help [command]<br><br>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:<br><br>help automate<br><br>will display specific information about using the automate console command",log:"log [en/dis] [type]<br><br>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:<br><br>[general, contracts, ops, blackops, events]<br><br>The logging for these categories can be enabled or disabled like so:<br><br>log dis contracts - Disables logging that occurs when contracts are completed<br>log en contracts - Enables logging that occurs when contracts are completed<br>log dis events - Disables logging for Bladeburner random events<br><br>Logging can be universally enabled/disabled using the 'all' keyword:<br><br>log dis all<br>log en all",skill:'skill [action] [name]<br><br>Level or display information about your skills.<br><br>To display information about all of your skills and your multipliers, use:<br><br>skill list<br><br>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:<br><br>skill list Reaper<br>skill list "Digital Observer"<br><br>This console command can also be used to level up skills:<br><br>skill level [skill name]',start:'start [type] [name]<br><br>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:<br><br>[general, contract, op, blackop]<br><br>Examples:<br><br>start contract Tracking<br>start op "Undercover Operation"<br>',stop:"stop<br><br>Stop your current action and go idle"};function F(e={}){this.name=e.name?e.name:p.Locations.Sector12,this.pop=e.pop?e.pop:Object(A.getRandomInt)(D,1.5*D),this.popEst=this.pop*(Math.random()+.5),this.comms=e.comms?e.comms:Object(A.getRandomInt)(5,150),this.commsEst=this.comms+Object(A.getRandomInt)(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}function U(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.money&&(this.money=e.money),e.expGain&&(this.expGain=e.expGain),e.weaponAbility&&(this.weaponAbility=e.weaponAbility),e.gunAbility&&(this.gunAbility=e.gunAbility)}e(document).keydown(function(e){if(S.routing.isOn(S.Page.Bladeburner)){if(!(m.a.bladeburner instanceof Q))return;let r=m.a.bladeburner.consoleHistory;if(e.keyCode===_.KEY.ENTER){e.preventDefault();var t=Z.consoleInput.value;t.length>0&&(m.a.bladeburner.postToConsole("> "+t),m.a.bladeburner.resetConsoleInput(),m.a.bladeburner.executeConsoleCommands(t))}if(e.keyCode===_.KEY.UPARROW){if(null==Z.consoleInput)return;var n=W;if(0===(i=r.length))return;(n<0||n>i)&&(W=i),0!==n&&--W;var a=r[W];Z.consoleInput.value=a,Object(g.setTimeoutRef)(function(){Z.consoleInput.selectionStart=Z.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===_.KEY.DOWNARROW){if(null==Z.consoleInput)return;var i;n=W;if(0==(i=r.length))return;if((n<0||n>i)&&(W=i),n==i||n==i-1)W=i,Z.consoleInput.value="";else{a=r[++W];Z.consoleInput.value=a}}}}),F.prototype.improvePopulationEstimateByCount=function(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEst<this.pop?(this.popEst+=e,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEst<this.pop&&(this.popEst=this.pop))},F.prototype.improvePopulationEstimateByPercentage=function(e,t=1){if(e*=t,isNaN(e))throw new Error("NaN passed into City.improvePopulationEstimateByPercentage()");this.popEst<this.pop?(++this.popEst,this.popEst*=1+e/100,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEst<this.pop&&(this.popEst=this.pop))},F.prototype.improveCommunityEstimate=function(e=1){if(isNaN(e))throw new Error("NaN passed into City.improveCommunityEstimate()");this.commsEst<this.comms?(this.commsEst+=e,this.commsEst>this.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst<this.comms&&(this.commsEst=this.comms))},F.prototype.changePopulationByCount=function(e,t={}){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByCount()");this.pop+=e,t.estChange&&!isNaN(t.estChange)&&(this.popEst+=t.estChange),t.estOffset&&(this.popEst=Object(E.addOffset)(this.popEst,t.estOffset)),this.popEst=Math.max(this.popEst,0)},F.prototype.changePopulationByPercentage=function(e,t={}){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByPercentage()");if(0!==e){var n=Math.round(this.pop*(e/100));return t.nonZero&&0===n&&(n=e>0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}},F.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))},F.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)}},F.prototype.toJSON=function(){return Object(v.Generic_toJSON)("City",this)},F.fromJSON=function(e){return Object(v.Generic_fromJSON)(F,e.data)},v.Reviver.constructors.City=F,U.prototype.calculateCost=function(e){return Math.floor((this.baseCost+e*this.costInc)*r.BitNodeMultipliers.BladeburnerSkillCost)};var H={},G={BladesIntuition:"Blade's Intuition",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Tracer:"Tracer",Overclock:"Overclock",Reaper:"Reaper",EvasiveSystem:"Evasive System",Datamancer:"Datamancer",CybersEdge:"Cyber's Edge",HandsOfMidas:"Hands of Midas",Hyperdrive:"Hyperdrive"};function K(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(E.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(A.getRandomInt)(1e3,25e3),this.countGrowth=e.countGrowth?e.countGrowth:Object(A.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")}K.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},K.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=m.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 V||this instanceof J)&&(this.teamCount&&this.teamCount>0&&(this.teamCount=Math.min(this.teamCount,e.teamSize),a*=Math.pow(this.teamCount,.05)));if(!(this instanceof J)){var l=e.getCurrentCity();if(t.est?a*=Math.pow(l.popEst/D,.7):a*=Math.pow(l.pop/D,.7),l.chaos>50){var c=l.chaos-50+1;n*=Math.pow(c,.1)}if(this instanceof V&&"Raid"===this.name&&l.comms<=0)return 0}if(a*=e.skillMultipliers.successChanceAll,(this instanceof V||this instanceof J)&&(a*=e.skillMultipliers.successChanceOperation),this instanceof z&&(a*=e.skillMultipliers.successChanceContract),this.isStealth&&(a*=e.skillMultipliers.successChanceStealth),this.isKill&&(a*=e.skillMultipliers.successChanceKill),a*=m.a.bladeburner_success_chance_mult,isNaN(a))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,a/n)},K.prototype.attempt=function(e){return Math.random()<this.getSuccessChance(e)},K.prototype.getActionTime=function(e){var t=this.getDifficulty()/10,n=e.skillMultipliers.actionTime,a=m.a.agility*e.skillMultipliers.effAgi,i=m.a.dexterity*e.skillMultipliers.effDex,r=.5*(Math.pow(a,.04)+Math.pow(i,.035)+a/1e4+i/1e4);if(t=Math.max(1,t*n/r),this instanceof z)return Math.ceil(t);if(this instanceof V)return Math.ceil(t);if(this instanceof J)return Math.ceil(1.5*t);throw new Error("Unrecognized Action Type in Action.getActionTime(this). Must be either Contract, Operation, or BlackOperation")},K.prototype.getSuccessesNeededForNextLevel=function(e){return Math.ceil(.5*this.maxLevel*(2*e+(this.maxLevel-1)))},K.prototype.setMaxLevel=function(e){this.successes>=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel},K.prototype.toJSON=function(){return Object(v.Generic_toJSON)("Action",this)},K.fromJSON=function(e){return Object(v.Generic_fromJSON)(K,e.data)},v.Reviver.constructors.Action=K;var q={};const $=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7,Diplomacy:8,"Hyperbolic Regeneration Chamber":9});function Y(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function z(e={}){K.call(this,e)}function V(e={}){K.call(this,e),this.reqdRank=e.reqdRank?e.reqdRank:100,this.teamCount=e.teamCount?e.teamCount:0}function J(e={}){V.call(this,e),this.count=1,this.countGrowth=0}Y.prototype.toJSON=function(){return Object(v.Generic_toJSON)("ActionIdentifier",this)},Y.fromJSON=function(e){return Object(v.Generic_fromJSON)(Y,e.data)},v.Reviver.constructors.ActionIdentifier=Y,z.prototype=Object.create(K.prototype),z.prototype.toJSON=function(){return Object(v.Generic_toJSON)("Contract",this)},z.fromJSON=function(e){return Object(v.Generic_fromJSON)(z,e.data)},v.Reviver.constructors.Contract=z,V.prototype=Object.create(K.prototype),V.prototype.toJSON=function(){return Object(v.Generic_toJSON)("Operation",this)},V.fromJSON=function(e){return Object(v.Generic_fromJSON)(V,e.data)},v.Reviver.constructors.Operation=V,J.prototype=Object.create(K.prototype),J.prototype.toJSON=function(){return Object(v.Generic_toJSON)("BlackOperation",this)},J.fromJSON=function(e){return Object(v.Generic_fromJSON)(J,e.data)},v.Reviver.constructors.BlackOperation=J;var X={};function Q(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(A.getRandomInt)(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t=$.Idle;this.action=new Y({type:t}),this.cities={};for(var n=0;n<L.length;++n)this.cities[L[n]]=new F({name:L[n]});this.city=p.Locations.Sector12,this.skills={},this.skillMultipliers={},this.updateSkillMultipliers(),this.staminaBonus=0,this.maxStamina=0,this.calculateMaxStamina(),this.stamina=this.maxStamina,this.contracts={},this.operations={},this.blackops={},this.logging={general:!0,contracts:!0,ops:!0,blackops:!0,events:!0},this.automateEnabled=!1,this.automateActionHigh=0,this.automateThreshHigh=0,this.automateActionLow=0,this.automateThreshLow=0,this.consoleHistory=[],this.consoleLogs=[],function(){let e;H[G.BladesIntuition]=new U({name:G.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),H[G.Cloak]=new U({name:G.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),H[G.ShortCircuit]=new U({name:G.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),H[G.DigitalObserver]=new U({name:G.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),H[G.Tracer]=new U({name:G.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),H[G.Overclock]=new U({name:G.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),H[G.Reaper]=new U({name:G.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),H[G.EvasiveSystem]=new U({name:G.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),H[G.Datamancer]=new U({name:G.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),H[G.CybersEdge]=new U({name:G.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),H[G.HandsOfMidas]=new U({name:G.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),H[G.Hyperdrive]=new U({name:G.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10}),q[e="Training"]=new K({name:e,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),q[e="Field Analysis"]=new K({name:e,desc:"Mine and analyze Synthoid-related data. This improve the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.<br><br>Does NOT require stamina."}),q[e="Recruitment"]=new K({name:e,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.<br><br>Does NOT require stamina."}),q[e="Diplomacy"]=new K({name:e,desc:"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.<br><br>Does NOT require stamina."}),q[e="Hyperbolic Regeneration Chamber"]=new K({name:e,desc:"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.<br><br>"}),X["Operation Typhoon"]=new J({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.<br><br>The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Zero"]=new J({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.<br><br>The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),X["Operation X"]=new J({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.<br><br>Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Titan"]=new J({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.<br><br>Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Ares"]=new J({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.<br><br>Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Archangel"]=new J({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.<br><br>The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Juggernaut"]=new J({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.<br><br>Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Red Dragon"]=new J({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.<br><br>Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation K"]=new J({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.<br><br>We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and 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}),X["Operation Deckard"]=new J({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}),X["Operation Tyrell"]=new J({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.<br><br>We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Wallace"]=new J({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.<br><br>The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Shoulder of Orion"]=new J({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.<br><br>The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),X["Operation Hyron"]=new J({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.<br><br>I do not need to remind you why sentient-level AIs pose a serious thread to all of mankind.<br><br>The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Morpheus"]=new J({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.<br><br>The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),X["Operation Ion Storm"]=new J({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.<br><br>This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Annihilus"]=new J({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}),X["Operation Ultron"]=new J({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.<br><br>OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.<br><br>Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).<br><br>Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),X["Operation Centurion"]=new J({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.<br><br>It seems that the universe is not without a sense of irony.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),X["Operation Vindictus"]=new J({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),X["Operation Daedalus"]=new J({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()}Q.prototype.prestige=function(){this.resetAction();var e=c.Factions.Bladeburners;this.rank>=25&&Object(u.c)(e)},Q.prototype.create=function(){this.contracts.Tracking=new z({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.<br><br>Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(A.getRandomInt)(25,150),countGrowth:Object(A.getRandomInt)(5,75)/10,weights:{hack:0,str:.05,def:.05,dex:.35,agi:.35,cha:.1,int:.05},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.9,int:1},isStealth:!0}),this.contracts["Bounty Hunter"]=new z({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.<br><br>Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(A.getRandomInt)(5,150),countGrowth:Object(A.getRandomInt)(5,75)/10,weights:{hack:0,str:.15,def:.15,dex:.25,agi:.25,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.contracts.Retirement=new z({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.<br><br>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(A.getRandomInt)(5,150),countGrowth:Object(A.getRandomInt)(5,75)/10,weights:{hack:0,str:.2,def:.2,dex:.2,agi:.2,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.operations.Investigation=new V({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.<br><br>Successful Investigation ops will increase the accuracy of your synthoid data.<br><br>You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(A.getRandomInt)(1,100),countGrowth:Object(A.getRandomInt)(10,40)/10,weights:{hack:.25,str:.05,def:.05,dex:.2,agi:.1,cha:.25,int:.1},decays:{hack:.85,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Undercover Operation"]=new V({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.<br><br>Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(A.getRandomInt)(1,100),countGrowth:Object(A.getRandomInt)(10,40)/10,weights:{hack:.2,str:.05,def:.05,dex:.2,agi:.2,cha:.2,int:.1},decays:{hack:.8,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Sting Operation"]=new V({name:"Sting Operation",desc:"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5.5,rankLoss:.5,hpLoss:2.5,count:Object(A.getRandomInt)(1,150),countGrowth:Object(A.getRandomInt)(3,40)/10,weights:{hack:.25,str:.05,def:.05,dex:.25,agi:.1,cha:.2,int:.1},decays:{hack:.8,str:.85,def:.85,dex:.85,agi:.85,cha:.7,int:.9},isStealth:!0}),this.operations.Raid=new V({name:"Raid",desc:"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your current city in order for this Operation to be successful",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:55,rankLoss:2.5,hpLoss:50,count:Object(A.getRandomInt)(1,150),countGrowth:Object(A.getRandomInt)(2,40)/10,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isKill:!0}),this.operations["Stealth Retirement Operation"]=new V({name:"Stealth Retirement Operation",desc:"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:22,rankLoss:2,hpLoss:10,count:Object(A.getRandomInt)(1,150),countGrowth:Object(A.getRandomInt)(1,20)/10,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isStealth:!0,isKill:!0}),this.operations.Assassination=new V({name:"Assassination",desc:"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:44,rankLoss:4,hpLoss:5,count:Object(A.getRandomInt)(1,150),countGrowth:Object(A.getRandomInt)(1,20)/10,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.8},isStealth:!0,isKill:!0})},Q.prototype.storeCycles=function(e=1){this.storedCycles+=e},Q.prototype.process=function(){if(!1===h.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(h.a)(m.a.bitNodeN);if(!1===a.Augmentations[i.AugmentationNames.BladesSimulacrum].owned&&m.a.isWorking){if(this.action.type!==$.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="<br><br>Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),Object(y.dialogBoxCreate)(e)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),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/480}for(var r in this.operations)if(this.operations.hasOwnProperty(r)){var o=this.operations[r];o.count+=e*o.countGrowth/480}for(var s=0;s<L.length;++s){var l=this.cities[L[s]];if(!(l instanceof F))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");l.chaos-=1e-4*e,l.chaos=Math.max(0,l.chaos)}this.randomEventCounter-=e,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter=Object(A.getRandomInt)(240,600)),this.processAction(e),this.automateEnabled&&(this.stamina<=this.automateThreshLow?this.action.name===this.automateActionLow.name&&this.action.type===this.automateActionLow.type||(this.action=new Y({type:this.automateActionLow.type,name:this.automateActionLow.name}),this.startAction(this.action)):this.stamina>=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new Y({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(this.action)))),S.routing.isOn(S.Page.Bladeburner)&&this.updateContent()}},Q.prototype.calculateMaxStamina=function(){var e=m.a.agility*this.skillMultipliers.effAgi,t=Math.pow(e,.8)+this.staminaBonus;if(t*=this.skillMultipliers.stamina,t*=m.a.bladeburner_max_stamina_mult,isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");this.maxStamina=t},Q.prototype.calculateStaminaGainPerSecond=function(){var e=m.a.agility*this.skillMultipliers.effAgi;return(.0085+this.maxStamina/7e4)*Math.pow(e,.17)*(this.skillMultipliers.stamina*m.a.bladeburner_stamina_gain_mult)},Q.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},Q.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(c.factionExists)("Bladeburners")){var t=c.Factions.Bladeburners;if(!(t instanceof l.Faction))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*m.a.faction_rep_mult*n}}var a=3*(this.totalSkillPoints+1);if(this.maxRank>=a){var i=Math.floor((this.maxRank-a)/3+1);this.skillPoints+=i,this.totalSkillPoints+=i}},Q.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof F))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},Q.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,money:1,expGain:1,weaponAbility:1,gunAbility:1}},Q.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=H[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<a.length;++i){var r=a[i];if(null!=t[r]&&!isNaN(t[r])){var o=t[r]*n,s=1+o/100;"actionTime"===r&&(s=1-o/100),this.skillMultipliers[r]*=s}}}},Q.prototype.upgradeSkill=function(e){var t=e.name;if(this.skills[t]?++this.skills[t]:this.skills[t]=1,isNaN(this.skills[t])||this.skills[t]<0)throw new Error("Level of Skill "+t+" is invalid: "+this.skills[t]);this.updateSkillMultipliers()},Q.prototype.getActionObject=function(e){switch(e.type){case $.Contract:return this.contracts[e.name];case $.Operation:return this.operations[e.name];case $.BlackOp:case $.BlackOperation:return X[e.name];case $.Training:return q.Training;case $["Field Analysis"]:return q["Field Analysis"];case $.Recruitment:return q.Recruitment;default:return null}},Q.prototype.resetAction=function(){this.action=new Y({type:$.Idle})},Q.prototype.startAction=function(e){if(null!=e)switch(this.action=e,this.actionTimeCurrent=0,e.type){case $.Idle:this.actionTimeToComplete=0;break;case $.Contract:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Contract Object for: "+e.name);if(t.count<1)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(M.exceptionAlert)(e)}break;case $.Operation:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Operation Object for: "+e.name);if(t.count<1)return this.resetAction();if("Raid"===e.name&&0===this.getCurrentCity().commsEst)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(M.exceptionAlert)(e)}break;case $.BlackOp:case $.BlackOperation:try{if(null!=this.blackops[e.name]){this.resetAction(),this.log("Error: Tried to start a Black Operation that had already been completed");break}var t;if(null==(t=this.getActionObject(e)))throw new Error("Failed to get BlackOperation object for: "+e.name);this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(M.exceptionAlert)(e)}break;case $.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime();break;case $.Training:case $.FieldAnalysis:case $["Field Analysis"]:this.actionTimeToComplete=30;break;case $.Diplomacy:case $["Hyperbolic Regeneration Chamber"]:this.actionTimeToComplete=60;break;default:throw new Error("Invalid Action Type in Bladeburner.startAction(): "+e.type)}},Q.prototype.processAction=function(e){if(this.action.type!==$.Idle){if(this.actionTimeToComplete<=0)throw console.log("action.type: "+this.action.type),new Error("Invalid actionTimeToComplete value: "+this.actionTimeToComplete);if(!(this.action instanceof Y))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=e,this.actionTimeCurrent>=this.actionTimeToComplete?this.completeAction():void 0}},Q.prototype.completeAction=function(){switch(this.action.type){case $.Contract:case $.Operation:try{var e=this.action.type===$.Operation;if(null==(p=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=p.getDifficulty(),n=Math.pow(t,.28)+t/650,a=Math.pow(p.rewardFac,p.level-1);if(this.stamina-=.285*n,this.stamina<0&&(this.stamina=0),p.attempt(this)){this.gainActionStats(p,!0),++p.successes,--p.count;var i=0;if(e||(i=25e4*a*this.skillMultipliers.money,m.a.gainMoney(i),m.a.recordMoneySource(i,"bladeburner")),e?p.setMaxLevel(2.5):p.setMaxLevel(3),p.rankGain){var s=Object(E.addOffset)(p.rankGain*a*r.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(s),e&&this.logging.ops?this.log(p.name+" successfully completed! Gained "+Object(P.formatNumber)(s,3)+" rank"):!e&&this.logging.contracts&&this.log(p.name+" contract successfully completed! Gained "+Object(P.formatNumber)(s,3)+" rank and "+d.numeralWrapper.format(i,"$0.000a"))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(p,!1),++p.failures;var l=0,c=0;p.rankLoss&&(l=Object(E.addOffset)(p.rankLoss*a,10),this.changeRank(-1*l)),p.hpLoss&&(c=p.hpLoss*n,c=Math.ceil(Object(E.addOffset)(c,10)),this.hpLost+=c,m.a.takeDamage(c)&&(++this.numHosp,this.moneyLost+=o.CONSTANTS.HospitalCostPerHp*m.a.max_hp));var u="";l>0&&(u+="Lost "+Object(P.formatNumber)(l,3)+" rank."),c>0&&(u+="Took "+Object(P.formatNumber)(c,0)+" damage."),e&&this.logging.ops?this.log(p.name+" failed! "+u):!e&&this.logging.contracts&&this.log(p.name+" contract failed! "+u),e?this.completeOperation(!1):this.completeContract(!1)}p.autoLevel&&(p.level=p.maxLevel),this.startAction(this.action)}catch(e){Object(M.exceptionAlert)(e)}break;case $.BlackOp:case $.BlackOperation:try{var p;if(null==(p=this.getActionObject(this.action))||!(p instanceof J))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=p.getDifficulty(),n=Math.pow(t,.28)+t/650;this.stamina-=.285*n,this.stamina<0&&(this.stamina=0);var g,_=p.teamCount;if(p.attempt(this)){this.gainActionStats(p,!0),p.count=0,this.blackops[p.name]=!0;var f=0;if(p.rankGain&&(f=Object(E.addOffset)(p.rankGain*r.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(f)),g=Math.ceil(_/2),"Operation Daedalus"===p.name)return this.resetAction(),Object(h.a)(m.a.bitNodeN);S.routing.isOn(S.Page.Bladeburner)&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(p.name+" successful! Gained "+Object(P.formatNumber)(f,1)+" rank")}else{this.gainActionStats(p,!1);var y=0;c=0;p.rankLoss&&(y=Object(E.addOffset)(p.rankLoss,10),this.changeRank(-1*y)),p.hpLoss&&(c=p.hpLoss*n,c=Math.ceil(Object(E.addOffset)(c,10)),m.a.takeDamage(c)&&(++this.numHosp,this.moneyLost+=o.CONSTANTS.HospitalCostPerHp*m.a.max_hp)),g=Math.floor(_),this.logging.blackops&&this.log(p.name+" failed! Lost "+Object(P.formatNumber)(y,1)+" rank and took "+Object(P.formatNumber)(c,0)+" damage")}if(this.resetAction(),_>=1){var b=Object(A.getRandomInt)(1,g);this.teamSize-=b,this.teamLost+=b,this.logging.blackops&&this.log("You lost "+Object(P.formatNumber)(b,0)+" team members during "+p.name)}}catch(e){Object(M.exceptionAlert)(e)}break;case $.Training:this.stamina-=.1425;var v=30*m.a.strength_exp_mult,k=30*m.a.defense_exp_mult,C=30*m.a.dexterity_exp_mult,T=30*m.a.agility_exp_mult,O=.04*this.skillMultipliers.stamina;m.a.gainStrengthExp(v),m.a.gainDefenseExp(k),m.a.gainDexterityExp(C),m.a.gainAgilityExp(T),this.staminaBonus+=O,this.logging.general&&this.log("Training completed. Gained: "+Object(P.formatNumber)(v,1)+" str exp, "+Object(P.formatNumber)(k,1)+" def exp, "+Object(P.formatNumber)(C,1)+" dex exp, "+Object(P.formatNumber)(T,1)+" agi exp, "+Object(P.formatNumber)(O,3)+" max stamina"),this.startAction(this.action);break;case $.FieldAnalysis:case $["Field Analysis"]:var w=.04*Math.pow(m.a.hacking_skill,.3)+.04*Math.pow(m.a.intelligence,.9)+.02*Math.pow(m.a.charisma,.3);if(w*=m.a.bladeburner_analysis_mult,isNaN(w)||w<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var x=20*m.a.hacking_exp_mult,R=20*m.a.charisma_exp_mult;m.a.gainHackingExp(x),m.a.gainIntelligenceExp(.001),m.a.gainCharismaExp(R),this.changeRank(.1*r.BitNodeMultipliers.BladeburnerRank),this.getCurrentCity().improvePopulationEstimateByPercentage(w*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(P.formatNumber)(x,1)+" hacking exp, and "+Object(P.formatNumber)(R,1)+" charisma exp"),this.startAction(this.action);break;case $.Recruitment:var N=this.getRecruitmentSuccessChance();if(Math.random()<N){var I=2*this.actionTimeToComplete;m.a.gainCharismaExp(I),++this.teamSize,this.logging.general&&this.log("Successfully recruited a team member! Gained "+Object(P.formatNumber)(I,1)+" charisma exp")}else{I=1*this.actionTimeToComplete;m.a.gainCharismaExp(I),this.logging.general&&this.log("Failed to recruit a team member. Gained "+Object(P.formatNumber)(I,1)+" charisma exp")}this.startAction(this.action);break;case $.Diplomacy:w=this.getDiplomacyEffectiveness();this.getCurrentCity().chaos*=w,this.getCurrentCity().chaos<0&&(this.getCurrentCity().chaos=0),this.logging.general&&this.log(`Diplomacy completed. Chaos levels in the current city fell by ${d.numeralWrapper.formatPercentage(1-w)}`),this.startAction(this.action);break;case $["Hyperbolic Regeneration Chamber"]:m.a.regenerateHp(2),this.stamina=Math.min(this.maxStamina,this.stamina+.1),this.startAction(this.action),this.logging.general&&this.log("Rested in Hyperbolic Regeneration Chamber. Restored 2 HP and gained 0.1 stamina");break;default:console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`)}},Q.prototype.completeContract=function(e){if(this.action.type!==$.Contract)throw new Error("completeContract() called even though current action is not a Contract");var t=this.getCurrentCity();if(e)switch(this.action.name){case"Tracking":t.improvePopulationEstimateByCount(Object(A.getRandomInt)(100,1e3));break;case"Bounty Hunter":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.02);break;case"Retirement":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}},Q.prototype.completeOperation=function(e){if(this.action.type!==$.Operation)throw new Error("completeOperation() called even though current action is not an Operation");var t=this.getActionObject(this.action);if(null==t)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var n,a=t.teamCount;if(a>=1){n=e?Math.ceil(a/2):Math.floor(a);var i=Object(A.getRandomInt)(0,n);this.teamSize-=i,this.teamLost+=i,this.logging.ops&&i>0&&this.log("Lost "+Object(P.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(A.getRandomInt)(-10,-5)/10;r.changePopulationByPercentage(o,{nonZero:!0})}r.changeChaosByPercentage(Object(A.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&r.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByPercentage(Object(A.getRandomInt)(-3,-1));break;case"Assassination":e&&r.changePopulationByCount(-1,{estChange:-1}),r.changeChaosByPercentage(Object(A.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},Q.prototype.getRecruitmentTime=function(){var e=m.a.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(300-t))},Q.prototype.getRecruitmentSuccessChance=function(){return Math.pow(m.a.charisma,.45)/(this.teamSize+1)},Q.prototype.getDiplomacyEffectiveness=function(){return(100-(Math.pow(m.a.charisma,.045)+m.a.charisma/1e3))/100},Q.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;const l=this.skillMultipliers.expGain;m.a.gainHackingExp(o*e.weights.hack*m.a.hacking_exp_mult*l),m.a.gainStrengthExp(o*e.weights.str*m.a.strength_exp_mult*l),m.a.gainDefenseExp(o*e.weights.def*m.a.defense_exp_mult*l),m.a.gainDexterityExp(o*e.weights.dex*m.a.dexterity_exp_mult*l),m.a.gainAgilityExp(o*e.weights.agi*m.a.agility_exp_mult*l),m.a.gainCharismaExp(o*e.weights.cha*m.a.charisma_exp_mult*l),m.a.gainIntelligenceExp(s*e.weights.int*l)},Q.prototype.randomEvent=function(){var e=Math.random(),t=L[Object(A.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof F))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var a=L[Object(A.getRandomInt)(0,5)];a===t;)a=L[Object(A.getRandomInt)(0,5)];var i=this.cities[a];if(!(n instanceof F&&i instanceof F))throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var r=Object(A.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(A.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(A.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(A.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(A.getRandomInt)(5,20)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){r=Object(A.getRandomInt)(8,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")}},Q.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()<t&&this.triggerMigration(e)},Q.prototype.triggerMigration=function(e){for(var t=L[Object(A.getRandomInt)(0,5)];t===e;)t=L[Object(A.getRandomInt)(0,5)];var n=this.cities[t],a=this.cities[e];if(null==n||null==a)throw new Error("Failed to find City with name: "+t);var i=Math.random(),r=Object(A.getRandomInt)(3,15)/100;i<.05&&a.comms>0&&(r*=Object(A.getRandomInt)(2,4),--a.comms,++n.comms);var o=Math.round(a.pop*r);a.pop-=o,n.pop+=o};var Z={};Q.prototype.initializeDomElementRefs=function(){Z={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}},Q.prototype.createContent=function(){Z.bladeburnerDiv=Object(T.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),Z.overviewConsoleParentDiv=Object(T.createElement)("div",{height:"60%",display:"block",position:"relative"}),Z.overviewDiv=Object(T.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),Z.actionAndSkillsDiv=Object(T.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),Z.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),Z.consoleDiv=Object(T.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(Z.consoleInput instanceof Element&&Z.consoleInput.focus(),!1)}),Z.consoleTable=Object(T.createElement)("table",{class:"bladeburner-console-table"}),Z.consoleInputRow=Object(T.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),Z.consoleInputCell=Object(T.createElement)("td",{class:"bladeburner-console-input-cell"}),Z.consoleInputHeader=Object(T.createElement)("pre",{innerText:"> "}),Z.consoleInput=Object(T.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{Z.consoleInput.value=Z.consoleInput.value}}),Z.consoleInputCell.appendChild(Z.consoleInputHeader),Z.consoleInputCell.appendChild(Z.consoleInput),Z.consoleInputRow.appendChild(Z.consoleInputCell),Z.consoleTable.appendChild(Z.consoleInputRow),Z.consoleDiv.appendChild(Z.consoleTable),Z.overviewConsoleParentDiv.appendChild(Z.overviewDiv),Z.overviewConsoleParentDiv.appendChild(Z.consoleDiv),Z.bladeburnerDiv.appendChild(Z.overviewConsoleParentDiv),Z.bladeburnerDiv.appendChild(Z.actionAndSkillsDiv);const e=Object(T.createElement)("div");if(e.innerHTML=`<span class="text">${N}= This action requires stealth, ${I} = This action involves retirement</span>`,Z.bladeburnerDiv.appendChild(e),document.getElementById("entire-game-container").appendChild(Z.bladeburnerDiv),0===this.consoleLogs.length)this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands");else for(let e=0;e<this.consoleLogs.length;++e)this.postToConsole(this.consoleLogs[e],!1);Z.consoleInput.focus()},Q.prototype.clearContent=function(){Z.bladeburnerDiv instanceof Element&&(Object(b.removeChildrenFromElement)(Z.bladeburnerDiv),Object(x.removeElement)(Z.bladeburnerDiv)),Object(C.clearObject)(Z),this.initializeDomElementRefs()},Q.prototype.createOverviewContent=function(){if(null==Z.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");Z.overviewRank=Object(T.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),Z.overviewStamina=Object(T.createElement)("p",{display:"inline-block"}),Z.overviewStaminaHelpTip=Object(T.createElement)("div",{class:"help-tip",innerText:"?",clickListener:()=>{Object(y.dialogBoxCreate)("Performing actions will use up your stamina.<br><br>Your max stamina is determined primarily by your agility stat.<br><br>Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.<br><br>Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).<br><br>Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),Z.overviewGen1=Object(T.createElement)("p",{display:"block"}),Z.overviewEstPop=Object(T.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."}),Z.overviewEstPopHelpTip=Object(T.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(y.dialogBoxCreate)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.<br><br>Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.<br><br>The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}}),Z.overviewEstComms=Object(T.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."}),Z.overviewChaos=Object(T.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."}),Z.overviewBonusTime=Object(T.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."}),Z.overviewSkillPoints=Object(T.createElement)("p",{display:"block"}),Z.overviewAugSuccessMult=Object(T.createElement)("p",{display:"block"}),Z.overviewAugMaxStaminaMult=Object(T.createElement)("p",{display:"block"}),Z.overviewAugStaminaGainMult=Object(T.createElement)("p",{display:"block"}),Z.overviewAugAnalysisMult=Object(T.createElement)("p",{display:"block"}),Z.overviewDiv.appendChild(Z.overviewRank),Object(k.appendLineBreaks)(Z.overviewDiv,1),Z.overviewDiv.appendChild(Z.overviewStamina),Z.overviewDiv.appendChild(Z.overviewStaminaHelpTip),Z.overviewDiv.appendChild(Z.overviewGen1),Z.overviewDiv.appendChild(Z.overviewEstPop),Z.overviewDiv.appendChild(Z.overviewEstPopHelpTip),Object(k.appendLineBreaks)(Z.overviewDiv,1),Z.overviewDiv.appendChild(Z.overviewEstComms),Object(k.appendLineBreaks)(Z.overviewDiv,1),Z.overviewDiv.appendChild(Z.overviewChaos),Object(k.appendLineBreaks)(Z.overviewDiv,2),Z.overviewDiv.appendChild(Z.overviewBonusTime),Z.overviewDiv.appendChild(Z.overviewSkillPoints),Object(k.appendLineBreaks)(Z.overviewDiv,1),Z.overviewDiv.appendChild(Z.overviewAugSuccessMult),Z.overviewDiv.appendChild(Z.overviewAugMaxStaminaMult),Z.overviewDiv.appendChild(Z.overviewAugStaminaGainMult),Z.overviewDiv.appendChild(Z.overviewAugAnalysisMult),Object(k.appendLineBreaks)(Z.overviewDiv,1),Z.overviewDiv.appendChild(Object(T.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(T.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(R.removeElementById)(e),!1)})),t.push(Object(T.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<L.length;++n)!function(n,a){t.push(Object(T.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerText:L[a],clickListener:()=>(n.city=L[a],Object(R.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(O.createPopup)(e,t)}}));if(Object(c.factionExists)("Bladeburners")){var e=c.Factions.Bladeburners;if(!(e instanceof l.Faction))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");Z.overviewDiv.appendChild(Object(T.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?(s.Engine.loadFactionContent(),Object(u.a)("Bladeburners")):this.rank>=25?(Object(u.c)(e),Object(y.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(b.removeChildrenFromElement)(Z.overviewDiv),this.createOverviewContent()):Object(y.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}Z.overviewDiv.appendChild(Object(T.createElement)("br")),Z.overviewDiv.appendChild(Object(T.createElement)("br")),this.updateOverviewContent()},Q.prototype.createActionAndSkillsContent=function(){null==Z.currentTab&&(Z.currentTab="general"),Object(b.removeChildrenFromElement)(Z.actionAndSkillsDiv),Object(C.clearObject)(Z.generalActions),Object(C.clearObject)(Z.contracts),Object(C.clearObject)(Z.operations),Object(C.clearObject)(Z.blackops),Object(C.clearObject)(Z.skills);for(var e=Z.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n<t.length;++n)!function(e,t,n,a){Z.actionAndSkillsDiv.appendChild(Object(T.createElement)("a",{innerText:e[t],class:a===e[t].toLowerCase()?"bladeburner-nav-button-inactive":"bladeburner-nav-button",clickListener:()=>(Z.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(Z.actionsAndSkillsDesc=Object(T.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(b.removeChildrenFromElement)(Z.actionsAndSkillsList),Z.actionsAndSkillsList=Object(T.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(),Z.actionAndSkillsDiv.appendChild(Z.actionsAndSkillsDesc),Z.actionAndSkillsDiv.appendChild(Z.actionsAndSkillsList)},Q.prototype.createGeneralActionsContent=function(){if(null==Z.actionsAndSkillsList||null==Z.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Z.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",q)q.hasOwnProperty(e)&&(Z.generalActions[e]=Object(T.createElement)("div",{class:"bladeburner-action",name:e}),Z.actionsAndSkillsList.appendChild(Z.generalActions[e]))},Q.prototype.createContractsContent=function(){if(null==Z.actionsAndSkillsList||null==Z.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Z.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.<br><br>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)&&(Z.contracts[e]=Object(T.createElement)("div",{class:"bladeburner-action",name:e}),Z.actionsAndSkillsList.appendChild(Z.contracts[e]))},Q.prototype.createOperationsContent=function(){if(null==Z.actionsAndSkillsList||null==Z.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Z.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.<br><br>Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.<br><br>For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.<br><br>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)&&(Z.operations[e]=Object(T.createElement)("div",{class:"bladeburner-action",name:e}),Z.actionsAndSkillsList.appendChild(Z.operations[e]))},Q.prototype.createBlackOpsContent=function(){if(null==Z.actionsAndSkillsList||null==Z.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");Z.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.<br><br><b>Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops.</b><br><br>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 X)X.hasOwnProperty(t)&&e.push(X[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=e.length-1;n>=0;--n)null==this.blackops[[e[n].name]]&&0!==n&&null==this.blackops[[e[n-1].name]]||(Z.blackops[e[n].name]=Object(T.createElement)("div",{class:"bladeburner-action",name:e[n].name}),Z.actionsAndSkillsList.appendChild(Z.blackops[e[n].name]))},Q.prototype.createSkillsContent=function(){if(null==Z.actionsAndSkillsList||null==Z.actionsAndSkillsDesc)throw new Error("Bladeburner.createSkillsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");Z.actionsAndSkillsDesc.innerHTML="You will gain one skill point every 3 ranks.<br><br>Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.<br><br>";for(var e=Object.keys(this.skillMultipliers),t=0;t<e.length;++t){var n=this.skillMultipliers[e[t]];if(n&&1!==n)switch(n=Object(P.formatNumber)(n,3),e[t]){case"successChanceAll":Z.actionsAndSkillsDesc.innerHTML+="Total Success Chance: x"+n+"<br>";break;case"successChanceStealth":Z.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"<br>";break;case"successChanceKill":Z.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"<br>";break;case"successChanceContract":Z.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"<br>";break;case"successChanceOperation":Z.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"<br>";break;case"successChanceEstimate":Z.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"<br>";break;case"actionTime":Z.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"<br>";break;case"effHack":Z.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"<br>";break;case"effStr":Z.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"<br>";break;case"effDef":Z.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"<br>";break;case"effDex":Z.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"<br>";break;case"effAgi":Z.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"<br>";break;case"effCha":Z.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"<br>";break;case"effInt":Z.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"<br>";break;case"stamina":Z.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"<br>";break;case"money":Z.actionsAndSkillsDesc.innerHTML+="Contract Money: x"+n+"<br>";break;case"expGain":Z.actionsAndSkillsDesc.innerHTML+="Exp Gain: x"+n+"<br>";break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+e[t])}}for(var a in Z.skillPointsDisplay=Object(T.createElement)("p",{innerHTML:"<br><strong>Skill Points: "+Object(P.formatNumber)(this.skillPoints,0)+"</strong>"}),Z.actionAndSkillsDiv.appendChild(Z.skillPointsDisplay),H)H.hasOwnProperty(a)&&(Z.skills[a]=Object(T.createElement)("div",{class:"bladeburner-action",name:a}),Z.actionsAndSkillsList.appendChild(Z.skills[a]))},Q.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},Q.prototype.updateOverviewContent=function(){S.routing.isOn(S.Page.Bladeburner)&&(Z.overviewRank.childNodes[0].nodeValue="Rank: "+Object(P.formatNumber)(this.rank,2),Z.overviewStamina.innerText="Stamina: "+Object(P.formatNumber)(this.stamina,3)+" / "+Object(P.formatNumber)(this.maxStamina,3),Z.overviewGen1.innerHTML="Stamina Penalty: "+Object(P.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%<br><br>Team Size: "+Object(P.formatNumber)(this.teamSize,0)+"<br>Team Members Lost: "+Object(P.formatNumber)(this.teamLost,0)+"<br><br>Num Times Hospitalized: "+this.numHosp+"<br>Money Lost From Hospitalizations: "+d.numeralWrapper.format(this.moneyLost,"$0.000a")+"<br><br>Current City: "+this.city+"<br>",Z.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+d.numeralWrapper.format(this.getCurrentCity().popEst,"0.000a"),Z.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(P.formatNumber)(this.getCurrentCity().comms,0),Z.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(P.formatNumber)(this.getCurrentCity().chaos),Z.overviewSkillPoints.innerText="Skill Points: "+Object(P.formatNumber)(this.skillPoints,0),Z.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+this.storedCycles/5,Z.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(P.formatNumber)(100*m.a.bladeburner_success_chance_mult,1)+"%",Z.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(P.formatNumber)(100*m.a.bladeburner_max_stamina_mult,1)+"%",Z.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(P.formatNumber)(100*m.a.bladeburner_stamina_gain_mult,1)+"%",Z.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(P.formatNumber)(100*m.a.bladeburner_analysis_mult,1)+"%")},Q.prototype.updateActionAndSkillsContent=function(){switch(null==Z.currentTab&&(Z.currentTab="general"),Z.currentTab.toLowerCase()){case"general":for(var e=Object.keys(Z.generalActions),t=0;t<e.length;++t){var n=Z.generalActions[e[t]],a=n.name,i=q[a];if(null==i)throw new Error("Could not find Object "+a+" in Bladeburner.updateActionAndSkillsContent()");this.action.type===$[a]?n.classList.add(B):n.classList.remove(B),this.updateGeneralActionsUIElement(n,i)}break;case"contracts":var r=Object.keys(Z.contracts);for(t=0;t<r.length;++t){var o=Z.contracts[r[t]];a=o.name;this.action.type===$.Contract&&a===this.action.name?o.classList.add(B):o.classList.remove(B);var s=this.contracts[a];if(null==s)throw new Error("Could not find Contract "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateContractsUIElement(o,s)}break;case"operations":var l=Object.keys(Z.operations);for(t=0;t<l.length;++t){var c=Z.operations[l[t]];a=c.name;this.action.type===$.Operation&&a===this.action.name?c.classList.add(B):c.classList.remove(B);var u=this.operations[a];if(null==u)throw new Error("Could not find Operation "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateOperationsUIElement(c,u)}break;case"blackops":var p=Object.keys(Z.blackops);for(t=0;t<p.length;++t){var m=Z.blackops[p[t]];a=m.name;this.action.type===$.BlackOperation&&a===this.action.name?m.classList.add(B):m.classList.remove(B);var h=X[a];if(null==h)throw new Error("Could not find BlackOperation "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateBlackOpsUIElement(m,h)}break;case"skills":Z.skillPointsDisplay.innerHTML="<br><strong>Skill Points: "+Object(P.formatNumber)(this.skillPoints,0)+"</strong>";var d=Object.keys(Z.skills);for(t=0;t<d.length;++t){var g=Z.skills[d[t]],_=(a=g.name,H[a]);if(null==_)throw new Error("Could not find Skill "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateSkillsUIElement(g,_)}break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}},Q.prototype.updateGeneralActionsUIElement=function(e,t){Object(b.removeChildrenFromElement)(e);var n=e.classList.contains(B);if(e.appendChild(Object(T.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(P.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(P.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(T.createElement)("p",{display:"block",innerText:Object(f.createProgressBarText)({progress:a})}))}else e.appendChild(Object(T.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=$[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(k.appendLineBreaks)(e,2),e.appendChild(Object(T.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},Q.prototype.updateContractsUIElement=function(e,t){Object(b.removeChildrenFromElement)(e);var n=e.classList.contains(B),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(T.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(P.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(P.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(T.createElement)("p",{display:"block",innerText:Object(f.createProgressBarText)({progress:i})}))}else e.appendChild(Object(T.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=$.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var r=t.level>=t.maxLevel;Object(k.appendLineBreaks)(e,2),e.appendChild(Object(T.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3)+" successes needed for next level"})),e.appendChild(Object(T.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(T.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(k.appendLineBreaks)(e,2),e.appendChild(Object(T.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(P.formatNumber)(100*a,1)}% ${t.isStealth?N:""}${t.isKill?I:""}\n`+"Time Required (s): "+Object(P.formatNumber)(o,0)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(T.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(T.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase contract level when possible"}));const l=Object(T.createElement)("div",{class:"bbcheckbox"}),c=Object(T.createElement)("input",{type:"checkbox",id:s,checked:t.autoLevel,changeListener:()=>{t.autoLevel=c.checked}}),u=Object(T.createElement)("label",{for:s});l.appendChild(c),l.appendChild(u),e.appendChild(l)},Q.prototype.updateOperationsUIElement=function(e,t){Object(b.removeChildrenFromElement)(e);var n=e.classList.contains(B),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(T.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(P.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(P.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(T.createElement)("p",{display:"block",innerText:Object(f.createProgressBarText)({progress:i})}))}else e.appendChild(Object(T.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=$.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(T.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(P.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(T.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(T.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(T.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(y.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateOperationsUIElement(e,t)),Object(R.removeElementById)(n),!1}}),o=Object(T.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(R.removeElementById)(n),!1)});Object(O.createPopup)(n,[a,i,r,o])}}));var r=t.level>=t.maxLevel;Object(k.appendLineBreaks)(e,2),e.appendChild(Object(T.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(2.5)+" successes needed for next level"})),e.appendChild(Object(T.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(T.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(k.appendLineBreaks)(e,2),e.appendChild(Object(T.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(P.formatNumber)(100*a,1)}% ${t.isStealth?N:""}${t.isKill?I:""}\n`+"Time Required(s): "+Object(P.formatNumber)(o,0)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(T.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(T.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase operation level when possible"}));const l=Object(T.createElement)("div",{class:"bbcheckbox"}),c=Object(T.createElement)("input",{type:"checkbox",id:s,checked:t.autoLevel,changeListener:()=>{t.autoLevel=c.checked}}),u=Object(T.createElement)("label",{for:s});l.appendChild(c),l.appendChild(u),e.appendChild(l)},Q.prototype.updateBlackOpsUIElement=function(e,t){Object(b.removeChildrenFromElement)(e);var n=e.classList.contains(B),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(T.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(T.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(P.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(P.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var s=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(T.createElement)("p",{display:"block",innerText:Object(f.createProgressBarText)({progress:s})}))}else e.appendChild(Object(T.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=$.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(T.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(P.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(T.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(T.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(T.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(y.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateBlackOpsUIElement(e,t)),Object(R.removeElementById)(n),!1}}),o=Object(T.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(R.removeElementById)(n),!1)});Object(O.createPopup)(n,[a,i,r,o])}}));Object(k.appendLineBreaks)(e,2),e.appendChild(Object(T.createElement)("p",{display:"inline-block",innerHTML:"<br>"+t.desc+"<br><br>"})),e.appendChild(Object(T.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(P.formatNumber)(t.reqdRank,0)+"<br>"})),e.appendChild(Object(T.createElement)("p",{display:"inline-block",innerHTML:`Estimated Success Chance: ${Object(P.formatNumber)(100*i,1)}% ${t.isStealth?N:""}${t.isKill?I:""}\n`+"Time Required(s): "+Object(P.formatNumber)(r,0)}))}},Q.prototype.updateSkillsUIElement=function(e,t){Object(b.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(T.createElement)("h2",{innerText:t.name+" (Lvl "+a+")",display:"inline-block"}));var r=this.skillPoints>=i,o=!!t.maxLvl&&a>=t.maxLvl;e.appendChild(Object(T.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<i))return this.skillPoints-=i,this.upgradeSkill(t),this.createActionAndSkillsContent(),!1}})),Object(k.appendLineBreaks)(e,2),o?e.appendChild(Object(T.createElement)("p",{color:"red",display:"block",innerText:"MAX LEVEL"})):e.appendChild(Object(T.createElement)("p",{display:"block",innerText:"Skill Points required: "+Object(P.formatNumber)(i,0)})),e.appendChild(Object(T.createElement)("p",{innerHTML:t.desc,display:"inline-block"}))},Q.prototype.postToConsole=function(t,n=!0){!0===n&&(this.consoleLogs.push(t),this.consoleLogs.length>100&&this.consoleLogs.shift()),null!=t&&null!=Z.consoleDiv&&(e("#bladeubrner-console-input-row").before('<tr><td class="bladeburner-console-line" style="color: var(--my-font-color); white-space:pre-wrap;">'+t+"</td></tr>"),Z.consoleTable.childNodes.length>100&&Z.consoleTable.removeChild(Z.consoleTable.firstChild),this.updateConsoleScroll())},Q.prototype.updateConsoleScroll=function(){Z.consoleDiv.scrollTop=Z.consoleDiv.scrollHeight},Q.prototype.resetConsoleInput=function(){Z.consoleInput.value=""},Q.prototype.clearConsole=function(){for(;Z.consoleTable.childNodes.length>1;)Z.consoleTable.removeChild(Z.consoleTable.firstChild);this.consoleLogs.length=0},Q.prototype.log=function(e){this.postToConsole(`[${Object(w.getTimestamp)()}] ${e}`)},Q.prototype.executeConsoleCommands=function(e){try{this.consoleHistory[this.consoleHistory.length-1]!=e&&(this.consoleHistory.push(e),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1)),W=this.consoleHistory.length;for(var t=e.split(";"),n=0;n<t.length;++n)this.executeConsoleCommand(t[n])}catch(e){Object(M.exceptionAlert)(e)}},Q.prototype.executeConsoleCommand=function(e){e=(e=e.trim()).replace(/\s\s+/g," ");var t=this.parseCommandArguments(e);if(!(t.length<=0))switch(t[0].toLowerCase()){case"automate":this.executeAutomateConsoleCommand(t);break;case"clear":case"cls":this.clearConsole();break;case"help":this.executeHelpConsoleCommand(t);break;case"log":this.executeLogConsoleCommand(t);break;case"skill":this.executeSkillConsoleCommand(t);break;case"start":this.executeStartConsoleCommand(t);break;case"stop":this.resetAction();break;default:this.postToConsole("Invalid console command")}},Q.prototype.parseCommandArguments=function(e){const t=[];let n=0,a=0;for(;a<e.length;){const i=e.charAt(a);if('"'===i){const i=e.indexOf('"',a+1);if(-1!==i&&(i===e.length-1||" "===e.charAt(i+1))){t.push(e.substr(a+1,i-a-1)),n=a=i===e.length-1?i+1:i+2;continue}}else if("'"===i){const i=e.indexOf("'",a+1);if(-1!==i&&(i===e.length-1||" "===e.charAt(i+1))){t.push(e.substr(a+1,i-a-1)),n=a=i===e.length-1?i+1:i+2;continue}}else" "===i&&(t.push(e.substr(n,a-n)),n=a+1);++a}return n!==a&&t.push(e.substr(n,a-n)),console.log("Bladeburner console command parsing returned: "+t),t},Q.prototype.executeAutomateConsoleCommand=function(e){if(2===e.length||4===e.length)if(2!==e.length)if(4!==e.length);else{var t=e[1],n=e[2],a=!1;switch(e[3].toLowerCase().includes("hi")&&(a=!0),t){case"general":case"gen":if(null!=q[n]){var i=new Y({type:$[n],name:n});a?this.automateActionHigh=i:this.automateActionLow=i,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid action name specified: "+n);break;case"contract":case"contracts":if(null!=this.contracts[n]){i=new Y({type:$.Contract,name:n});a?this.automateActionHigh=i:this.automateActionLow=i,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid contract name specified: "+n);break;case"ops":case"op":case"operations":case"operation":if(null!=this.operations[n]){i=new Y({type:$.Operation,name:n});a?this.automateActionHigh=i:this.automateActionLow=i,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid Operation name specified: "+n);break;case"stamina":isNaN(n)?this.postToConsole("Invalid value specified for stamina threshold (must be numeric): "+n):(a?this.automateThreshHigh=Number(n):this.automateThreshLow=Number(n),this.log("Automate ("+(a?"HIGH":"LOW")+") stamina threshold set to "+n))}}else{var r=e[1];if("status"===r.toLowerCase())this.postToConsole("Automation: "+(this.automateEnabled?"enabled":"disabled")),this.automateEnabled&&this.postToConsole("When your stamina drops to "+Object(P.formatNumber)(this.automateThreshLow,0)+", you will automatically switch to "+this.automateActionLow.name+". When your stamina recovers to "+Object(P.formatNumber)(this.automateThreshHigh,0)+", you will automatically switch to "+this.automateActionHigh.name+".");else if(r.toLowerCase().includes("en")){if(!(this.automateActionLow instanceof Y&&this.automateActionHigh instanceof Y))return this.log("Failed to enable automation. Actions were not set");this.automateEnabled=!0,this.log("Bladeburner automation enabled")}else r.toLowerCase().includes("d")?(this.automateEnabled=!1,this.log("Bladeburner automation disabled")):this.log("Invalid argument for 'automate' console command: "+e[1])}else this.postToConsole("Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info")},Q.prototype.executeHelpConsoleCommand=function(e){if(1===e.length)this.postToConsole(j.helpList);else for(var t=1;t<e.length;++t){var n=j[e[t]];null!=n&&(this.postToConsole(n),this.postToConsole("<br>"))}},Q.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]")}},Q.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(H),n=0;n<t.length;++n){var a=H[t[n]],i=0;null!=this.skills[a.name]&&(i=this.skills[a.name]),this.postToConsole(a.name+": Level "+Object(P.formatNumber)(i,0))}this.postToConsole(" "),this.postToConsole("Effects: ");var r=Object.keys(this.skillMultipliers);for(n=0;n<r.length;++n){var o=this.skillMultipliers[r[n]];if(o&&1!==o)switch(o=Object(P.formatNumber)(o,3),r[n]){case"successChanceAll":this.postToConsole("Total Success Chance: x"+o);break;case"successChanceStealth":this.postToConsole("Stealth Success Chance: x"+o);break;case"successChanceKill":this.postToConsole("Retirement Success Chance: x"+o);break;case"successChanceContract":this.postToConsole("Contract Success Chance: x"+o);break;case"successChanceOperation":this.postToConsole("Operation Success Chance: x"+o);break;case"successChanceEstimate":this.postToConsole("Synthoid Data Estimate: x"+o);break;case"actionTime":this.postToConsole("Action Time: x"+o);break;case"effHack":this.postToConsole("Hacking Skill: x"+o);break;case"effStr":this.postToConsole("Strength: x"+o);break;case"effDef":this.postToConsole("Defense: x"+o);break;case"effDex":this.postToConsole("Dexterity: x"+o);break;case"effAgi":this.postToConsole("Agility: x"+o);break;case"effCha":this.postToConsole("Charisma: x"+o);break;case"effInt":this.postToConsole("Intelligence: x"+o);break;case"stamina":this.postToConsole("Stamina: x"+o);break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+r[n])}}}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 3:var s=e[2];if(null==(a=H[s])||!(a instanceof U))return this.postToConsole("Invalid skill name (Note that this is case-sensitive): "+s);if("list"===e[1].toLowerCase())this.postToConsole(a.name+": Level "+Object(P.formatNumber)(this.skills[a.name]),0);else if("level"===e[1].toLowerCase()){var l=0;this.skills[s]&&!isNaN(this.skills[s])&&(l=this.skills[s]);var c=a.calculateCost(l);this.skillPoints>=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(P.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")}},Q.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!=q[t]?(this.action.type=$[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=$.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=$.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!=X[t]?(this.action.type=$.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]")}},Q.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new Y,a=e.toLowerCase().trim(),i=t.toLowerCase().trim();switch(a){case"contract":case"contracts":case"contr":return n.type=$.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=$.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=$.BlackOp,X.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=$.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=$.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=$["Field Analysis"],n.name="Field Analysis";break;case"diplomacy":n.type=$.Diplomacy,n.name="Diplomacy";break;case"hyperbolic regeneration chamber":n.type=$["Hyperbolic Regeneration Chamber"],n.name="Hyperbolic Regeneration Chamber";break;default:return null}return n}},Q.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys($);for(let a=0;a<n.length;++a)if(e.type===$[n[a]]){t.type=n[a];break}return null==t.type&&(t.type="Idle"),t.name=null!=e.name?e.name:"Idle",t},Q.prototype.getContractNamesNetscriptFn=function(){return Object.keys(this.contracts)},Q.prototype.getOperationNamesNetscriptFn=function(){return Object.keys(this.operations)},Q.prototype.getBlackOpNamesNetscriptFn=function(){return Object.keys(X)},Q.prototype.getGeneralActionNamesNetscriptFn=function(){return Object.keys(q)},Q.prototype.getSkillNamesNetscriptFn=function(){return Object.keys(H)},Q.prototype.startActionNetscriptFn=function(e,t,n){var a="ERROR: bladeburner.startAction() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),!1;if(i.type===$.BlackOp){if(this.getActionObject(i).reqdRank>this.rank)return n.log(`Failed to start Black Op ${i.name} due to insufficient rank`),!1;if(null!=this.blackops[i.name])return n.log(`Failed to start Black Op ${i.name} because its already been completed`),!1;var r=[];for(const e in X)X.hasOwnProperty(e)&&r.push(e);r.sort(function(e,t){return X[e].reqdRank-X[t].reqdRank});let e=r.indexOf(i.name);if(-1===e)return n.log("ERROR: Invalid Black Operation name passed into bladeburner.startAction(). Note that this name is case-sensitive & whitespace-sensitive"),!1;if(e>0&&null==this.blackops[r[e-1]])return n.log(`ERROR: Cannot attempt Black Operation ${i.name} because you have not done the preceding one`),!1}try{return this.startAction(i),n.shouldLog("startAction")&&n.log("Starting bladeburner action with type "+e+" and name "+t),!0}catch(a){return this.resetAction(),n.log("ERROR: bladeburner.startAction() failed to start action of type "+e+" due to invalid name: "+t+"Note that this name is case-sensitive and whitespace-sensitive"),!1}},Q.prototype.getActionTimeNetscriptFn=function(e,t,n){var a="ERROR: bladeburner.getActionTime() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);if(null==r)return n.log(a),-1;switch(i.type){case $.Contract:case $.Operation:case $.BlackOp:case $.BlackOperation:return r.getActionTime(this);case $.Training:case $["Field Analysis"]:case $.FieldAnalysis:return 30;case $.Recruitment:return this.getRecruitmentTime();default:return n.log(a),-1}},Q.prototype.getActionEstimatedSuccessChanceNetscriptFn=function(e,t,n){var a="ERROR: bladeburner.getActionEstimatedSuccessChance() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);if(null==r)return n.log(a),-1;switch(i.type){case $.Contract:case $.Operation:case $.BlackOp:case $.BlackOperation:return r.getSuccessChance(this,{est:!0});case $.Training:case $["Field Analysis"]:case $.FieldAnalysis:return 1;case $.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log(a),-1}},Q.prototype.getActionCountRemainingNetscriptFn=function(e,t,n){var a="ERROR: bladeburner.getActionCountRemaining() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);if(null==r)return n.log(a),-1;switch(i.type){case $.Contract:case $.Operation:return Math.floor(r.count);case $.BlackOp:case $.BlackOperation:return null!=this.blackops[t]?0:1;case $.Training:case $["Field Analysis"]:case $.FieldAnalysis:return 1/0;default:return n.log(a),-1}},Q.prototype.getSkillLevelNetscriptFn=function(e,t){var n="ERROR: bladeburner.getSkillLevel() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";return""===e?-1:H.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log(n),-1)},Q.prototype.getSkillUpgradeCostNetscriptFn=function(e,t){var n="ERROR: bladeburner.getSkillUpgradeCostNetscriptFn() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";if(""===e)return-1;if(!H.hasOwnProperty(e))return t.log(n),-1;var a=H[e];return null==this.skills[e]?a.calculateCost(0):a.calculateCost(this.skills[e])},Q.prototype.upgradeSkillNetscriptFn=function(e,t){var n="ERROR: bladeburner.upgradeSkill() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";if(!H.hasOwnProperty(e))return t.log(n),!1;var a=H[e],i=0;this.skills[e]&&!isNaN(this.skills[e])&&(i=this.skills[e]);var r=a.calculateCost(i);return a.maxLvl&&i>=a.maxLvl?(t.shouldLog("upgradeSkill")&&t.log(`bladeburner.upgradeSkill() failed because ${e} is already maxed`),!1):this.skillPoints<r?(t.shouldLog("upgradeSkill")&&t.log("bladeburner.upgradeSkill() failed because you do not have enough skill points to upgrade "+e+" (You have "+this.skillPoints+", you need "+r+")"),!1):(this.skillPoints-=r,this.upgradeSkill(a),S.routing.isOn(S.Page.Bladeburner)&&"skills"===Z.currentTab.toLowerCase()&&this.createActionAndSkillsContent(),t.shouldLog("upgradeSkill")&&t.log(e+" successfully upgraded to level "+this.skills[e]),!0)},Q.prototype.getTeamSizeNetscriptFn=function(e,t,n){if(""===e&&""===t)return this.teamSize;var a="ERROR: bladeburner.getTeamSize() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);return null==r?(n.log(a),-1):i.type===$.Operation||i.type===$.BlackOp||i.type===$.BlackOperation?r.teamCount:0},Q.prototype.setTeamSizeNetscriptFn=function(e,t,n,a){var i="ERROR: bladeburner.setTeamSize() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",r=this.getActionIdFromTypeAndName(e,t);if(null==r)return a.log(i),-1;if(r.type!==$.Operation&&r.type!==$.BlackOp&&r.type!==$.BlackOperation)return a.log("ERROR: bladeburner.setTeamSize() failed. This function only works for Operations and BlackOps"),-1;var o=this.getActionObject(r);if(null==o)return a.log(i),-1;var s=Math.round(n);return isNaN(s)?(a.log("ERROR: bladeburner.setTeamSize() failed due to an invalid 'size' argument: "+n),-1):(this.teamSize<s&&(s=this.teamSize),o.teamCount=s,a.shouldLog("setTeamSize")&&a.log("Team size for "+t+" set to "+s),s)},Q.prototype.getCityEstimatedPopulationNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?this.cities[e].popEst:(t.log("ERROR: bladeburner.getCityEstimatedPopulation() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),-1)},Q.prototype.getCityEstimatedCommunitiesNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?this.cities[e].commsEst:(t.log("ERROR: bladeburner.getCityEstimatedCommunities() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),-1)},Q.prototype.getCityChaosNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?this.cities[e].chaos:(t.log("ERROR: bladeburner.getCityChaos() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),-1)},Q.prototype.switchCityNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?(this.city=e,!0):(t.log("ERROR: bladeburner.switchCity() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),!1)},Q.prototype.joinBladeburnerFactionNetscriptFn=function(e){var t=c.Factions.Bladeburners;return!!t.isMember||(this.rank>=25?(Object(u.c)(t),e.shouldLog("joinBladeburnerFaction")&&e.log("Joined Bladeburners Faction"),S.routing.isOn(S.Page.Bladeburner)&&(Object(b.removeChildrenFromElement)(Z.overviewDiv),this.createOverviewContent()),!0):(e.shouldLog("joinBladeburnerFaction")&&e.log("Failed to join Bladeburners Faction because you do not have the required 25 rank"),!1))},Q.prototype.toJSON=function(){return Object(v.Generic_toJSON)("Bladeburner",this)},Q.fromJSON=function(e){return Object(v.Generic_fromJSON)(Q,e.data)},v.Reviver.constructors.Bladeburner=Q}).call(this,n(79))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(4),i=n(68);t.createPopup=function(e,t,n={}){const r=a.createElement("div",{class:"popup-box-container",display:"flex",id:e}),o=a.createElement("div",{class:"popup-box-content",id:`${e}-content`});for(const e of t)o.appendChild(e);return n.backgroundColor&&(o.style.backgroundColor=n.backgroundColor),r.appendChild(o),i.getElementById("entire-game-container").appendChild(r),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(295),i=n(121);t.CompanyPositions={},a.companyPositionMetadata.forEach(e=>{!function(e){null!=t.CompanyPositions[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.CompanyPositions[e.name]=new i.CompanyPosition(e)}(e)})},function(e,t,n){"use strict";n.d(t,"b",function(){return C}),n.d(t,"h",function(){return T}),n.d(t,"a",function(){return O}),n.d(t,"f",function(){return w}),n.d(t,"d",function(){return x}),n.d(t,"c",function(){return R}),n.d(t,"g",function(){return N}),n.d(t,"e",function(){return M});var a=n(85),i=n(1),r=n(11),o=n(174),s=n(152),l=n(8),c=n(50),u=n(155),p=n(93),m=n(23),h=n(19),d=n(64),g=n(144),_=n(61),f=n(9),y=n(126),b=n(70),v=n(117),E=n(7);const k=n(205);function C(e){this.name=e.filename,this.running=!1,this.serverIp=e.server,this.code=e.getCode(),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.CONSTANTS.ScriptBaseRamCost,this.dynamicLoadedFns={}}C.prototype.getServer=function(){return m.AllServers[this.serverIp]},C.prototype.getScript=function(){let e=this.getServer();for(let t=0;t<e.scripts.length;++t)if(e.scripts[t].filename===this.name)return e.scripts[t];return console.log("ERROR: Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong"),null},C.prototype.getScriptOnServer=function(e,t){null==t&&(t=this.getServer());for(let n=0;n<t.scripts.length;++n)if(t.scripts[n].filename===e)return t.scripts[n];return null},C.prototype.shouldLog=function(e){return null==this.disableLogs.ALL&&null==this.disableLogs[e]},C.prototype.log=function(e){this.scriptRef.log(e)};let T=[];for(var O=[],S=0;S<i.CONSTANTS.NumNetscriptPorts;++S)O.push(new p.a);function M(){for(var e=0;e<T.length;++e)Object(a.b)(T[e]),T[e].env.stopFlag=!0;Object(a.c)(5e3),T.length=0}function P(e){e.running=!0;let t=null;function n(n,a){return function(...i){if(e.env.stopFlag)throw e;if("sleep"===n)return a(...i);if(t)throw e.errorMessage=Object(l.d)(e,sprintf("Concurrent calls to Netscript functions not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",t,n),null),e;let r;t=n;try{r=a(...i)}catch(e){throw t=null,e}return r&&void 0!==r.finally?r.finally(function(){t=null}):(t=null,r)}}for(let t in e.env.vars)"function"==typeof e.env.vars[t]&&(e.env.vars[t]=n(t,e.env.vars[t]));return Object(u.a)(e.getServer().scripts,e).then(function(t){return void 0===t?e:[t,e]}).catch(t=>{if(t instanceof Error)throw e.errorMessage=Object(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 A(e){var t,n,a=e.code;e.running=!0;try{let i=function(e,t){var n=Object(_.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;t.startsWith("./")&&(t=t.slice(2));let n=function(e){for(let t=0;t<a.scripts.length;++t)if(a.scripts[t].filename===e)return a.scripts[t];return null}(t);if(null==n)throw new Error("'Import' failed due to invalid script: "+t);let o=Object(_.parse)(n.code,{ecmaVersion:5,allowReserved:!0,sourceType:"module"});if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type){let t=e.specifiers[0].local.name,n=[],a=[];k.simple(o,{FunctionDeclaration:e=>{n.push(e.id.name),a.push(e)}}),i="var "+t+";\n(function (namespace) {\n",a.forEach(e=>{i+=Object(g.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(g.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(g.generate)(n),{code:e=i+e,lineOffset:s}}(a,e);t=i.code,n=i.lineOffset}catch(t){return Object(f.dialogBoxCreate)("Error processing Imports in "+e.name+":<br>"+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<arguments.length-1;++t)e.push(arguments[t]);let t=arguments[arguments.length-1];i.apply(null,e).then(function(e){t(e)}).catch(function(e){})};t.setProperty(n,e,t.createAsyncFunction(a))}else if("sprintf"===e||"vsprintf"===e||"scp"===e||"write"==e||"read"===e||"tryWrite"===e){let a=function(){let e=[];for(let n=0;n<arguments.length;++n)"object"==typeof arguments[n]||arguments[n].constructor===Array?e.push(t.pseudoToNative(arguments[n])):e.push(arguments[n]);return i.apply(null,e)};t.setProperty(n,e,t.createNativeFunction(a))}else{let a=function(){let e=i.apply(null,arguments);return null==e?e:e.constructor===Array||e===Object(e)?t.nativeToPseudo(e):e};t.setProperty(n,e,t.createNativeFunction(a))}else t.setProperty(n,e,t.nativeToPseudo(i))}t.setProperty(n,"args",t.nativeToPseudo(e.args))},n)}catch(t){return Object(f.dialogBoxCreate)("Syntax ERROR in "+e.name+":<br>"+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()?Object(d.setTimeoutRef)(a,h.Settings.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(E.isString)(t)?(e.errorMessage=t,n(e)):n(t instanceof C?t:e)}})}function w(){for(var e=!1,t=T.length-1;t>=0;t--)if(0==T[t].running&&1==T[t].env.stopFlag){e=!0;var n=T[t].serverIp,i=T[t].name;m.AllServers[n].ramUsed=0;for(let e=0;e<T.length;e++)T[e].serverIp===n&&e!==t&&(m.AllServers[n].ramUsed+=T[e].ramUsage);Object(a.b)(T[t]);for(var r=0;r<m.AllServers[n].runningScripts.length;r++)if(m.AllServers[n].runningScripts[r].filename==i&&Object(y.compareArrays)(m.AllServers[n].runningScripts[r].args,T[t].args)){m.AllServers[n].runningScripts.splice(r,1);break}T.splice(t,1)}e&&Object(a.c)();for(t=0;t<T.length;t++)if(0==T[t].running&&0==T[t].env.stopFlag){let e=null;if(T[t].name.endsWith(".js")||T[t].name.endsWith(".ns"))e=P(T[t]);else if(!((e=A(T[t]))instanceof Promise))continue;e.then(function(e){console.log("Stopping script "+e.name+" because it finished running naturally"),e.running=!1,e.env.stopFlag=!0,e.scriptRef.log("Script finished running")}).catch(function(e){if(e instanceof Error)return Object(f.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+e.toString());if(e.constructor!==Array||2!==e.length||"RETURNSTATEMENT"!==e[0])if(e instanceof C){if(Object(l.b)(e.errorMessage)){var t=e.errorMessage.split("|");if(4!=t.length)return console.log("ERROR: Something wrong with Error text in evaluator..."),void console.log("Error text: "+errorText);var n=t[1],a=t[2],i=t[3];Object(f.dialogBoxCreate)("Script runtime error: <br>Server Ip: "+n+"<br>Script name: "+a+"<br>Args:"+Object(b.arrayToString)(e.args)+"<br>"+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(f.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(f.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])})}Object(d.setTimeoutRef)(w,6e3)}function x(e,t){for(var n=0;n<T.length;n++)if(T[n].name==e.filename&&T[n].serverIp==t&&Object(y.compareArrays)(T[n].args,e.args)){T[n].env.stopFlag=!0,Object(l.c)(T[n]);for(var a=T[n];a.fnWorker;)a.fnWorker.env.stopFlag=!0,Object(l.c)(a.fnWorker),a=a.fnWorker;return!0}return!1}function R(e,t){e.filename;var n=1;e.threads&&!isNaN(e.threads)?n=e.threads:e.threads=1;var i=Object(v.roundToTwo)(e.getRamUsage()*n);if(i>t.maxRam-t.ramUsed)Object(f.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 C(e);r.ramUsage=i,Object(a.a)(r),T.push(r)}}function N(e=1){for(var t=e*r.Engine._idleSpeed/1e3,n=0;n<T.length;++n)T[n].scriptRef.onlineRunningTime+=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(17);t.SpecialServerNames={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};class i{static fromJSON(e){return a.Generic_fromJSON(i,e.data)}constructor(){}addIp(e,t){this[e]=t}toJSON(){return a.Generic_toJSON("SpecialServerIpsMap",this)}}t.SpecialServerIpsMap=i,a.Reviver.constructors.SpecialServerIpsMap=i,t.SpecialServerIps=new i,t.prestigeSpecialServerIps=function(){for(var e in t.SpecialServerIps)delete t.SpecialServerIps[e];t.SpecialServerIps=new i},t.loadSpecialServerIps=function(e){t.SpecialServerIps=JSON.parse(e,a.Reviver)},t.initSpecialServerIps=function(){t.SpecialServerIps=new i}},function(e,t,n){"use strict";n.d(t,"d",function(){return h}),n.d(t,"c",function(){return g}),n.d(t,"b",function(){return f}),n.d(t,"a",function(){return d});var a=n(11),i=n(0),r=n(19),o=n(32),s=n(43),l=n(22),c=n(4),u=n(37),p=n(26);const m=["Start","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End"],h={};for(let e=0;e<m.length;++e)h[m[e]]=e;var d={currStep:0,isRunning:!1,stepIsDone:{}};function g(){d.stepIsDone={};for(let e=0;e<m.length;++e)d.stepIsDone[e]=!1;a.Engine.loadTerminalContent(),a.Engine.Counters.autoSaveCounter=1/0,console.log("Interactive Tutorial started"),d.currStep=0,d.isRunning=!0,document.getElementById("interactive-tutorial-container").style.display="block",Object(l.clearEventListeners)("interactive-tutorial-exit").addEventListener("click",function(){return y(),!1}),Object(l.clearEventListeners)("interactive-tutorial-back").addEventListener("click",function(){return function(){d.currStep>h.Start&&(d.currStep-=1);_()}(),!1}),Object(l.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return f(),!1}),_()}function _(){if(d.isRunning){var e=Object(l.clearEventListeners)("terminal-menu-link"),t=Object(l.clearEventListeners)("stats-menu-link"),n=Object(l.clearEventListeners)("active-scripts-menu-link"),i=Object(l.clearEventListeners)("hacknet-nodes-menu-link"),r=Object(l.clearEventListeners)("city-menu-link"),o=Object(l.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),i.removeAttribute("class"),r.removeAttribute("class"),o.removeAttribute("class");var s=document.getElementById("interactive-tutorial-next");switch(d.currStep){case h.Start:a.Engine.loadTerminalContent(),b("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...<br><br>This tutorial will show you the basics of the game. You may skip the tutorial at any time."),s.style.display="inline-block";break;case h.GoToCharacterPage:a.Engine.loadTerminalContent(),b("Let's start by heading to the Stats page. Click the 'Stats' tab on the main navigation menu (left-hand side of the screen)"),s.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return a.Engine.loadCharacterContent(),f(),!1});break;case h.CharacterPage:a.Engine.loadCharacterContent(),b("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses/multipliers. "),s.style.display="inline-block";break;case h.CharacterGoToTerminalPage:a.Engine.loadCharacterContent(),b("Let's head to your computer's terminal by clicking the 'Terminal' tab on the main navigation menu."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),f(),!1});break;case h.TerminalIntro:a.Engine.loadTerminalContent(),b("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),s.style.display="inline-block";break;case h.TerminalHelp:a.Engine.loadTerminalContent(),b("Let's try it out. Start by entering the 'help' command into the Terminal (Don't forget to press Enter after typing the command)"),s.style.display="none";break;case h.TerminalLs:a.Engine.loadTerminalContent(),b("The 'help' command displays a list of all available Terminal commands, how to use them, and a description of what they do. <br><br>Let's try another command. Enter the 'ls' command"),s.style.display="none";break;case h.TerminalScan:a.Engine.loadTerminalContent(),b("'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. <br><br>Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the 'scan' command."),s.style.display="none";break;case h.TerminalScanAnalyze1:a.Engine.loadTerminalContent(),b("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. <br><br> That's great and all, but there's so many servers. Which one should you go to? The 'scan-analyze' command gives some more detailed information about servers on the network. Try it now"),s.style.display="none";break;case h.TerminalScanAnalyze2:a.Engine.loadTerminalContent(),b("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). <br><br> It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'."),s.style.display="none";break;case h.TerminalConnect:a.Engine.loadTerminalContent(),b("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.<br><br>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'"),s.style.display="none";break;case h.TerminalAnalyze:a.Engine.loadTerminalContent(),b("You are now connected to another machine! What can you do now? You can hack it!<br><br> In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain experience. <br><br> Before you try to hack a server, you should run diagnostics using the 'analyze' command"),s.style.display="none";break;case h.TerminalNuke:a.Engine.loadTerminalContent(),b("When the 'analyze' command finishes running it will show useful information about hacking the server. <br><br> 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.<br><br> The 'analyze' results shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead and run the virus using the 'run NUKE.exe' command."),s.style.display="none";break;case h.TerminalManualHack:a.Engine.loadTerminalContent(),b("You now have root access! You can hack the server using the 'hack' command. Try doing that now."),s.style.display="none";break;case h.TerminalHackingMechanics:a.Engine.loadTerminalContent(),b("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.<br><br>If your attempt to hack the server is successful, you will steal a certain percentage of the server's total money. This percentage is affected by your hacking skill and the server's security level.<br><br>The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking."),s.style.display="inline-block";break;case h.TerminalCreateScript:a.Engine.loadTerminalContent(),b("Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be hacking manually the entire time. You can automate your hacking by writing scripts!<br><br>To create a new script or edit an existing one, you can use the '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)"),s.style.display="none";break;case h.TerminalTypeScript:a.Engine.loadScriptEditorContent("foodnstuff.script",""),b("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. <strong style='background-color:#444;'>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.</strong> For now, just copy and paste the following code into the script editor: <br><br>while(true) { <br> hack('foodnstuff'); <br>}<br><br> For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.<br><br>To save and close the script editor, press the button in the bottom left, or press ctrl + b."),s.style.display="none";break;case h.TerminalFree:a.Engine.loadTerminalContent(),b("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.<br><br>To check how much RAM is available on this machine, enter the 'free' command."),s.style.display="none";break;case h.TerminalRunScript:a.Engine.loadTerminalContent(),b("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'."),s.style.display="none";break;case h.TerminalGoToActiveScriptsPage:a.Engine.loadTerminalContent(),b("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). <br><br>These scripts can passively earn you income and hacking experience. Your scripts will also earn money and experience while you are offline, although at a much slower rate. <br><br> Let's check out some statistics for our running scripts by clicking the 'Active Scripts' link in the main navigation menu."),s.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return a.Engine.loadActiveScriptsContent(),f(),!1});break;case h.ActiveScriptsPage:a.Engine.loadActiveScriptsContent(),b("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."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),f(),!1});break;case h.ActiveScriptsToTerminal:a.Engine.loadTerminalContent(),b("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'"),s.style.display="none";break;case h.TerminalTailScript:a.Engine.loadTerminalContent(),b("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes! <br><br>This 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. <strong style='background-color:#444;'>If you are an experienced JavaScript developer, I would highly suggest you check out the section on NetscriptJS/Netscript 2.0.</strong><br><br>For now, let's move on to something else!"),s.style.display="inline-block";break;case h.GoToHacknetNodesPage:a.Engine.loadTerminalContent(),b("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."),s.style.display="none",i.setAttribute("class","flashing-button"),i.addEventListener("click",function(){return a.Engine.loadHacknetNodesContent(),f(),!1});break;case h.HacknetNodesIntroduction:a.Engine.loadHacknetNodesContent(),b("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),s.style.display="none";break;case h.HacknetNodesGoToWorldPage:a.Engine.loadHacknetNodesContent(),b("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.<br><br>Let's go to the 'City' page through the main navigation menu."),s.style.display="none",r.setAttribute("class","flashing-button"),r.addEventListener("click",function(){return a.Engine.loadWorldContent(),f(),!1});break;case h.WorldDescription:a.Engine.loadWorldContent(),b("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!<br><br>Lastly, click on the 'Tutorial' link in the main navigation menu."),s.style.display="none",o.setAttribute("class","flashing-button"),o.addEventListener("click",function(){return a.Engine.loadTutorialContent(),f(),!1});break;case h.TutorialPageInfo:a.Engine.loadTutorialContent(),b("This page contains a lot of different documentation about the game's content and mechanics. <strong style='background-color:#444;'> I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing</strong>. That's the end of the tutorial. Hope you enjoy the game!"),s.style.display="inline-block",s.innerHTML="Finish Tutorial";break;case h.End:y();break;default:throw new Error("Invalid tutorial step")}!0===d.stepIsDone[d.currStep]&&(s.style.display="inline-block")}else console.log("Interactive Tutorial not running")}function f(){d.currStep===h.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),d.currStep===h.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),d.currStep===h.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),d.currStep===h.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),d.currStep===h.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),d.currStep===h.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),d.currStep===h.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),d.stepIsDone[d.currStep]=!0,d.currStep<h.End&&(d.currStep+=1),_()}function y(){if(0===r.Settings.AutosaveInterval?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*r.Settings.AutosaveInterval,console.log("Ending interactive tutorial"),!Object(o.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(s.exceptionAlert)(new Error(e)),void console.error(e)}a.Engine.init(),d.currStep=h.End,d.isRunning=!1,document.getElementById("interactive-tutorial-container").style.display="none";var e="interactive-tutorial-ending-popup",t=Object(c.createElement)("p",{innerHTML:"If you are new to the game, the following links may be useful for you!<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. To read it, go to Terminal and enter<br><br>cat hackers-starting-handbook.lit"}),n=Object(c.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(p.removeElementById)(e)}});Object(u.createPopup)(e,[t,n]),i.a.getHomeComputer().messages.push("hackers-starting-handbook.lit")}function b(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";Object.defineProperty(t,"__esModule",{value:!0}),t.SoftwareCompanyPositions=["Software Engineering Intern","Junior Software Engineer","Senior Software Engineer","Lead Software Developer","Head of Software","Head of Engineering","Vice President of Technology","Chief Technology Officer"],t.ITCompanyPositions=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],t.SecurityEngineerCompanyPositions=["Security Engineer"],t.NetworkEngineerCompanyPositions=["Network Engineer","Network Administrator"],t.BusinessCompanyPositions=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],t.SecurityCompanyPositions=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],t.AgentCompanyPositions=["Field Agent","Secret Agent","Special Operative"],t.MiscCompanyPositions=["Waiter","Employee"],t.SoftwareConsultantCompanyPositions=["Software Consultant","Senior Software Consultant"],t.BusinessConsultantCompanyPositions=["Business Consultant","Senior Business Consultant"],t.PartTimeCompanyPositions=["Part-time Waiter","Part-time Employee"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(9);t.exceptionAlert=function(e){console.error(e),a.dialogBoxCreate("Caught an exception: "+e+"<br><br>Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"<br><br>Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"<br><br>This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.<br><br>If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted",!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=function(e){return"string"==typeof e||e instanceof String}},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return s});var a=n(0),i=n(66),r=n(8);function o(e,t){return`gang.${e}() failed with exception: `+t}function s(e,t){const n=`gang.${t}() failed because you do not currently have a Gang`;if(!(a.a.gang instanceof i.b))throw Object(r.d)(e,n)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Ace="ace",e.Emacs="emacs",e.Vim="vim"}(t.AceKeybindingSetting||(t.AceKeybindingSetting={})),function(e){e.Default="default",e.Emacs="emacs",e.Sublime="sublime",e.Vim="vim"}(t.CodeMirrorKeybindingSetting||(t.CodeMirrorKeybindingSetting={})),function(e){e.Monokai="monokai",e.Day_3024="3024-day",e.Night_3024="3024-night",e.abcdef="abcdef",e.Ambiance_mobile="ambiance-mobile",e.Ambiance="ambiance",e.Base16_dark="base16-dark",e.Base16_light="base16-light",e.Bespin="bespin",e.Blackboard="blackboard",e.Cobalt="cobalt",e.Colorforth="colorforth",e.Darcula="darcula",e.Dracula="dracula",e.Duotone_dark="duotone-dark",e.Duotone_light="duotone-light",e.Eclipse="eclipse",e.Elegant="elegant",e.Erlang_dark="erlang-dark",e.Gruvbox_dark="gruvbox-dark",e.Hopscotch="hopscotch",e.Icecoder="icecoder",e.Idea="idea",e.Isotope="isotope",e.Lesser_dark="lesser-dark",e.Liquibyte="liquibyte",e.Lucario="lucario",e.Material="material",e.Mbo="mbo",e.Mdn_like="mdn-like",e.Midnight="midnight",e.Neat="neat",e.Neo="neo",e.Night="night",e.Oceanic_next="oceanic-next",e.Panda_syntax="panda-syntax",e.Paraiso_dark="paraiso-dark",e.Paraiso_light="paraiso-light",e.Pastel_on_dark="pastel-on-dark",e.Railscasts="railscasts",e.Rubyblue="rubyblue",e.Seti="seti",e.Shadowfox="shadowfox",e.Solarized="solarized",e.ssms="ssms",e.The_matrix="the-matrix",e.Tomorrow_night_bright="tomorrow-night-bright",e.Tomorrow_night_eighties="tomorrow-night-eighties",e.Ttcn="ttcn",e.Twilight="twilight",e.Vibrant_ink="vibrant-ink",e.xq_dark="xq-dark",e.xq_light="xq-light",e.Yeti="yeti",e.Zenburn="zenburn"}(t.CodeMirrorThemeSetting||(t.CodeMirrorThemeSetting={})),function(e){e.Ace="Ace",e.CodeMirror="CodeMirror"}(t.EditorSetting||(t.EditorSetting={})),function(e){e[e.Cost=0]="Cost",e[e.Default=1]="Default",e[e.Reputation=2]="Reputation"}(t.PurchaseAugmentationsOrderSetting||(t.PurchaseAugmentationsOrderSetting={})),function(e){e[e.Alphabetically=0]="Alphabetically",e[e.AcquirementTime=1]="AcquirementTime"}(t.OwnedAugmentationsOrderSetting||(t.OwnedAugmentationsOrderSetting={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(169),i=n(1);t.Crimes={Shoplift:new a.Crime("Shoplift",i.CONSTANTS.CrimeShoplift,2e3,15e3,.05,.1,{dexterity_success_weight:1,agility_success_weight:1,dexterity_exp:2,agility_exp:2}),RobStore:new a.Crime("Rob Store",i.CONSTANTS.CrimeRobStore,6e4,4e5,.2,.5,{hacking_exp:30,dexterity_exp:45,agility_exp:45,hacking_success_weight:.5,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:.25*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),Mug:new a.Crime("Mug",i.CONSTANTS.CrimeMug,4e3,36e3,.2,.25,{strength_exp:3,defense_exp:3,dexterity_exp:3,agility_exp:3,strength_success_weight:1.5,defense_success_weight:.5,dexterity_success_weight:1.5,agility_success_weight:.5}),Larceny:new a.Crime("Larceny",i.CONSTANTS.CrimeLarceny,9e4,8e5,1/3,1.5,{hacking_exp:45,dexterity_exp:60,agility_exp:60,hacking_success_weight:.5,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:.5*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),DealDrugs:new a.Crime("Deal Drugs",i.CONSTANTS.CrimeDrugs,1e4,12e4,1,.5,{dexterity_exp:5,agility_exp:5,charisma_exp:10,charisma_success_weight:3,dexterity_success_weight:2,agility_success_weight:1}),BondForgery:new a.Crime("Bond Forgery",i.CONSTANTS.CrimeBondForgery,3e5,45e5,.5,.1,{hacking_exp:100,dexterity_exp:150,charisma_exp:15,hacking_success_weight:.05,dexterity_success_weight:1.25,intelligence_exp:2*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),TraffickArms:new a.Crime("Traffick Arms",i.CONSTANTS.CrimeTraffickArms,4e4,6e5,2,1,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:20,charisma_exp:40,charisma_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1}),Homicide:new a.Crime("Homicide",i.CONSTANTS.CrimeHomicide,3e3,45e3,1,3,{strength_exp:2,defense_exp:2,dexterity_exp:2,agility_exp:2,strength_success_weight:2,defense_success_weight:2,dexterity_success_weight:.5,agility_success_weight:.5,kills:1}),GrandTheftAuto:new a.Crime("Grand Theft Auto",i.CONSTANTS.CrimeGrandTheftAuto,8e4,16e5,8,5,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:80,charisma_exp:40,hacking_success_weight:1,strength_success_weight:1,dexterity_success_weight:4,agility_success_weight:2,charisma_success_weight:2,intelligence_exp:i.CONSTANTS.IntelligenceCrimeBaseExpGain}),Kidnap:new a.Crime("Kidnap",i.CONSTANTS.CrimeKidnap,12e4,36e5,5,6,{strength_exp:80,defense_exp:80,dexterity_exp:80,agility_exp:80,charisma_exp:80,charisma_success_weight:1,strength_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:2*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),Assassination:new a.Crime("Assassination",i.CONSTANTS.CrimeAssassination,3e5,12e6,8,10,{strength_exp:300,defense_exp:300,dexterity_exp:300,agility_exp:300,strength_success_weight:1,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:5*i.CONSTANTS.IntelligenceCrimeBaseExpGain,kills:1}),Heist:new a.Crime("Heist",i.CONSTANTS.CrimeHeist,6e5,12e7,18,15,{hacking_exp:450,strength_exp:450,defense_exp:450,dexterity_exp:450,agility_exp:450,charisma_exp:450,hacking_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,charisma_success_weight:1,intelligence_exp:10*i.CONSTANTS.IntelligenceCrimeBaseExpGain})}},function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}l((a=a.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const i=n(285),r=n(17),o=n(31),s=n(4),l=n(37),c=n(26);class u{constructor(e,t,n,a,i,r){this.name=e,this.desc=t,this.generate=n,this.solver=a,this.difficulty=i,this.numTries=r}}t.CodingContractType=u,t.CodingContractTypes={};for(const e of i.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new u(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var p;console.info(`${Object.keys(t.CodingContractTypes).length} Coding Contract Types loaded`),function(e){e[e.FactionReputation=0]="FactionReputation",e[e.FactionReputationAll=1]="FactionReputationAll",e[e.CompanyReputation=2]="CompanyReputation",e[e.Money=3]="Money"}(t.CodingContractRewardType||(t.CodingContractRewardType={})),function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.Cancelled=2]="Cancelled"}(p=t.CodingContractResult||(t.CodingContractResult={}));class m{constructor(e="",n="Find Largest Prime Factor",a=null){if(this.tries=0,this.fn=e,this.fn.endsWith(".cct")||(this.fn+=".cct"),null==t.CodingContractTypes[n])throw new Error(`Error: invalid contract type: ${n} please contact developer`);this.type=n,this.data=t.CodingContractTypes[n].generate(),this.reward=a}static fromJSON(e){return r.Generic_fromJSON(m,e.data)}getData(){return this.data}getDescription(){return t.CodingContractTypes[this.type].desc(this.data)}getDifficulty(){return t.CodingContractTypes[this.type].difficulty}getMaxNumTries(){return t.CodingContractTypes[this.type].numTries}getType(){return t.CodingContractTypes[this.type].name}isSolution(e){return t.CodingContractTypes[this.type].solver(this.data,e)}prompt(){return a(this,void 0,void 0,function*(){return new Promise((e,n)=>{const a=t.CodingContractTypes[this.type],i=`coding-contract-prompt-popup-${this.fn}`,r=s.createElement("p",{innerHTML:["You are attempting to solve a Coding Contract. You have",`${this.getMaxNumTries()-this.tries} tries remaining,`,"after which the contract will self-destruct.<br><br>",`${a.desc(this.data).replace(/\n/g,"<br>")}`].join(" ")});let u,m,h;u=s.createElement("input",{onkeydown:e=>{e.keyCode===o.KEY.ENTER&&""!==u.value?(e.preventDefault(),m.click()):e.keyCode===o.KEY.ESC&&(e.preventDefault(),h.click())},placeholder:"Enter Solution here"}),m=s.createElement("a",{class:"a-link-button",clickListener:()=>{const t=u.value;this.isSolution(t)?e(p.Success):e(p.Failure),c.removeElementById(i)},innerText:"Solve"}),h=s.createElement("a",{class:"a-link-button",clickListener:()=>{e(p.Cancelled),c.removeElementById(i)},innerText:"Cancel"});const d=s.createElement("br");l.createPopup(i,[r,d,d,u,m,h]),u.focus()})})}toJSON(){return r.Generic_toJSON("CodingContract",this)}}t.CodingContract=m,r.Reviver.constructors.CodingContract=m},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return ye}),n.d(t,"g",function(){return fe}),n.d(t,"d",function(){return he}),n.d(t,"f",function(){return me}),n.d(t,"h",function(){return ge}),n.d(t,"e",function(){return se}),n.d(t,"b",function(){return ce}),n.d(t,"c",function(){return ue});var a=n(85),i=n(16),r=n(13),o=n(73),s=n(5),l=n(20),c=n(129),u=n(36),p=n(80),m=n(18),h=n(121),d=n(38),g=n(1),_=n(92),f=n(56),y=n(66),b=n(69),v=n(14),E=n(53),k=n(132),C=n(84),T=n(6),O=n(54),S=(n(65),n(72)),M=n(0),P=n(30),A=n(98),w=n(59),x=n(62),R=n(23),N=n(74),I=n(21),L=n(63),D=(n(19),n(40)),B=(n(35),n(29)),W=n(86),j=n(57),F=n(83),U=n(67),H=n(45),G=n(39),K=n(8),q=n(93),$=n(116),Y=n(12),z=n(3),V=n(10),J=n(64),X=n(175),Q=(n(9),n(151),n(70)),Z=n(90),ee=n(7),te=n(44),ne=n(4),ae=n(37),ie=n(26),re=n(206).sprintf,oe=n(206).vsprintf,se=!1,le=!1,ce=!1,ue=!1,pe=!1,me=!1,he=!1,de=1,ge=1,_e={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,shortStock:!0,sellShort:!0,purchase4SMarketData:!0,purchase4SMarketDataTixApi:!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,donateToFaction:!0,createProgram:!0,commitCrime:!0,startAction:!0,upgradeSkill:!0,setTeamSize:!0,joinBladeburnerFaction:!0,recruitMember:!0,setMemberTask:!0,purchaseEquipment:!0,setTerritoryWarfare:!0};function fe(){for(var e=0;e<M.a.sourceFiles.length;++e)3===M.a.sourceFiles[e].n&&(se=!0),4===M.a.sourceFiles[e].n&&(le=!0,de=M.a.sourceFiles[e].lvl),5===M.a.sourceFiles[e].n&&(ce=!0),6===M.a.sourceFiles[e].n&&(ue=!0),7===M.a.sourceFiles[e].n&&(pe=!0),8===M.a.sourceFiles[e].n&&(me=!0,ge=M.a.sourceFiles[e].lvl),11===M.a.sourceFiles[e].n&&(he=!0)}function ye(t){var n=function(e,n){if(t.dynamicLoadedFns[e])return;t.dynamicLoadedFns[e]=!0;const a=t.scriptRef.threads;if("number"!=typeof a&&(console.warn(`WorkerScript detected NaN for threadcount for ${t.name} on ${t.serverIp}`),a=1),t.dynamicRamUsage+=n*a,t.dynamicRamUsage>1.01*t.ramUsage)throw Object(K.d)(t,"Dynamic RAM usage calculated to be greater than initial RAM usage on fn: "+e+". This is probably because you somehow circumvented the static RAM calculation.<br><br>Please don't do that :(<br><br>Dynamic RAM Usage: "+t.dynamicRamUsage+"<br>Static RAM Usage: "+t.ramUsage)},se=function(e,n){return t.loadedFns[e]?0:(t.loadedFns[e]=!0,n)},ue=function(e,n=""){var a=Object(I.getServer)(e);if(null==a)throw Object(K.d)(t,`Invalid IP or hostname passed into ${n}() function`);return a},he=function(e){if(isNaN(e))throw Object(K.d)(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=M.a.hacknetNodes.length)throw Object(K.d)(t,"Index specified for Hacknet Node is out-of-bounds: "+e);return M.a.hacknetNodes[e]},fe=function(e,t){return ue(t,"getCodingContract").getContract(e)};return{hacknet:{numNodes:function(){return M.a.hacknetNodes.length},purchaseNode:function(){return Object(C.e)()},getPurchaseNodeCost:function(){return Object(C.c)()},getNodeStats:function(e){var t=he(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 he(e).purchaseLevelUpgrade(t)},upgradeRam:function(e,t){return he(e).purchaseRamUpgrade(t)},upgradeCore:function(e,t){return he(e).purchaseCoreUpgrade(t)},getLevelUpgradeCost:function(e,t){return he(e).calculateLevelUpgradeCost(t)},getRamUpgradeCost:function(e,t){return he(e).calculateRamUpgradeCost(t)},getCoreUpgradeCost:function(e,t){return he(e).calculateCoreUpgradeCost(t)}},sprintf:re,vsprintf:oe,scan:function(e=t.serverIp,a=!0){if(t.checkingRam)return se("scan",g.CONSTANTS.ScriptScanRamCost);n("scan",g.CONSTANTS.ScriptScanRamCost);var i=Object(I.getServer)(e);if(null==i)throw Object(K.d)(t,"Invalid IP or hostname passed into scan() command");for(var r=[],o=0;o<i.serversOnNetwork.length;o++){var s;null!=(s=a?Object(I.getServerOnNetwork)(i,o).hostname:Object(I.getServerOnNetwork)(i,o).ip)&&r.push(s)}return null==t.disableLogs.ALL&&null==t.disableLogs.scan&&t.scriptRef.log("scan() returned "+i.serversOnNetwork.length+" connections for "+i.hostname),r},hack:function(e){if(t.checkingRam)return se("hack",g.CONSTANTS.ScriptHackRamCost);if(n("hack",g.CONSTANTS.ScriptHackRamCost),void 0===e)throw Object(K.d)(t,"Hack() call has incorrect number of arguments. Takes 1 argument");var a=t.scriptRef.threads;(isNaN(a)||a<1)&&(a=1);var i=Object(I.getServer)(e);if(null==i)throw t.scriptRef.log("hack() error. Invalid IP or hostname passed in: "+e+". Stopping..."),Object(K.d)(t,"hack() error. Invalid IP or hostname passed in: "+e+". Stopping...");var r=Object(f.d)(i);if(0==i.hasAdminRights)throw t.scriptRef.log("Cannot hack this server ("+i.hostname+") because user does not have root access"),Object(K.d)(t,"Cannot hack this server ("+i.hostname+") because user does not have root access");if(i.requiredHackingSkill>M.a.hacking_skill)throw t.scriptRef.log("Cannot hack this server ("+i.hostname+") because user's hacking skill is not high enough"),Object(K.d)(t,"Cannot hack this server ("+i.hostname+") because user's hacking skill is not high enough");return null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Attempting to hack "+e+" in "+r.toFixed(3)+" seconds (t="+a+")"),Object(K.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(f.b)(i),n=Math.random(),r=Object(f.c)(i)*a,o=r/4;if(n<e){const e=Object(f.e)(i);let n=Math.ceil(1/e*(i.moneyAvailable/i.moneyMax));isNaN(n)&&(n=1e6);let s=Math.floor(i.moneyAvailable*e)*a;return s<=0&&(s=0,r=o),s>i.moneyAvailable&&(s=i.moneyAvailable),i.moneyAvailable-=s,i.moneyAvailable<0&&(i.moneyAvailable=0),M.a.gainMoney(s),t.scriptRef.onlineMoneyMade+=s,M.a.scriptProdSinceLastAug+=s,M.a.recordMoneySource(s,"hacking"),t.scriptRef.recordHack(i.ip,s,a),M.a.gainHackingExp(r),t.scriptRef.onlineExpGained+=r,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script SUCCESSFULLY hacked "+i.hostname+" for $"+Object(ee.formatNumber)(s,2)+" and "+Object(ee.formatNumber)(r,4)+" exp (t="+a+")"),i.fortify(g.CONSTANTS.ServerFortifyAmount*Math.min(a,n)),Promise.resolve(s)}return M.a.gainHackingExp(o),t.scriptRef.onlineExpGained+=o,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script FAILED to hack "+i.hostname+". Gained "+Object(ee.formatNumber)(o,4)+" exp (t="+a+")"),Promise.resolve(0)})},hackAnalyzeThreads:function(e,a){if(t.checkingRam)return se("hackAnalyzeThreads",g.CONSTANTS.ScriptHackAnalyzeRamCost);n("hackAnalyzeThreads",g.CONSTANTS.ScriptHackAnalyzeRamCost);const i=ue(e,"hackAnalyzeThreads");if(isNaN(a))throw Object(K.d)(t,`Invalid growth argument passed into hackAnalyzeThreads: ${a}. Must be numeric`);if(a<0||a>i.moneyAvailable)return-1;const r=Object(f.e)(i);return a/Math.floor(i.moneyAvailable*r)},hackAnalyzePercent:function(e){if(t.checkingRam)return se("hackAnalyzePercent",g.CONSTANTS.ScriptHackAnalyzeRamCost);n("hackAnalyzePercent",g.CONSTANTS.ScriptHackAnalyzeRamCost);const a=ue(e,"hackAnalyzePercent");return 100*Object(f.e)(a)},hackChance:function(e){if(t.checkingRam)return se("hackChance",g.CONSTANTS.ScriptHackAnalyzeRamCost);n("hackChance",g.CONSTANTS.ScriptHackAnalyzeRamCost);const a=ue(e,"hackChance");return Object(f.b)(a)},sleep:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(K.d)(t,"sleep() call has incorrect number of arguments. Takes 1 argument");return null==t.disableLogs.ALL&&null==t.disableLogs.sleep&&t.scriptRef.log("Sleeping for "+e+" milliseconds"),Object(K.e)(e,t).then(function(){return Promise.resolve(!0)})},grow:function(e){if(t.checkingRam)return se("grow",g.CONSTANTS.ScriptGrowRamCost);n("grow",g.CONSTANTS.ScriptGrowRamCost);var a=t.scriptRef.threads;if((isNaN(a)||a<1)&&(a=1),void 0===e)throw Object(K.d)(t,"grow() call has incorrect number of arguments. Takes 1 argument");var i=Object(I.getServer)(e);if(null==i)throw t.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot grow(). Invalid IP or hostname passed in: "+e);if(0==i.hasAdminRights)throw t.scriptRef.log("Cannot grow this server ("+i.hostname+") because user does not have root access"),Object(K.d)(t,"Cannot grow this server ("+i.hostname+") because user does not have root access");var r=Object(f.a)(i);return null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Executing grow() on server "+i.hostname+" in "+Object(ee.formatNumber)(r,3)+" seconds (t="+a+")"),Object(K.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=i.moneyAvailable<=0?1:i.moneyAvailable;i.moneyAvailable+=1*a;var n=Object(I.processSingleServerGrowth)(i,450*a,M.a);const r=i.moneyAvailable;t.scriptRef.recordGrow(i.ip,a);var o=Object(f.c)(i)*a;return 1==n&&(o=0),null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Available money on "+i.hostname+" grown by "+Object(ee.formatNumber)(r/e*100-100,6)+"%. Gained "+Object(ee.formatNumber)(o,4)+" hacking exp (t="+a+")"),t.scriptRef.onlineExpGained+=o,M.a.gainHackingExp(o),Promise.resolve(r/e)})},growthAnalyze:function(e,a){if(t.checkingRam)return se("growthAnalyze",g.CONSTANTS.ScriptGrowthAnalyzeRamCost);n("growthAnalyze",g.CONSTANTS.ScriptGrowthAnalyzeRamCost);const i=ue(e,"growthAnalyze");if(isNaN(a))throw Object(K.d)(t,`Invalid growth argument passed into growthAnalyze: ${a}. Must be numeric`);return Object(I.numCycleForGrowth)(i,Number(a),M.a)},weaken:function(e){if(t.checkingRam)return se("weaken",g.CONSTANTS.ScriptWeakenRamCost);n("weaken",g.CONSTANTS.ScriptWeakenRamCost);var a=t.scriptRef.threads;if((isNaN(a)||a<1)&&(a=1),void 0===e)throw Object(K.d)(t,"weaken() call has incorrect number of arguments. Takes 1 argument");var i=Object(I.getServer)(e);if(null==i)throw t.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot weaken(). Invalid IP or hostname passed in: "+e);if(0==i.hasAdminRights)throw t.scriptRef.log("Cannot weaken this server ("+i.hostname+") because user does not have root access"),Object(K.d)(t,"Cannot weaken this server ("+i.hostname+") because user does not have root access");var r=Object(f.f)(i);return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Executing weaken() on server "+i.hostname+" in "+Object(ee.formatNumber)(r,3)+" seconds (t="+a+")"),Object(K.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);i.weaken(g.CONSTANTS.ServerWeakenAmount*a),t.scriptRef.recordWeaken(i.ip,a);var e=Object(f.c)(i)*a;return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Server security level on "+i.hostname+" weakened to "+i.hackDifficulty+". Gained "+Object(ee.formatNumber)(e,4)+" hacking exp (t="+a+")"),t.scriptRef.onlineExpGained+=e,M.a.gainHackingExp(e),Promise.resolve(g.CONSTANTS.ServerWeakenAmount*a)})},print:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(K.d)(t,"print() call has incorrect number of arguments. Takes 1 argument");t.scriptRef.log(e.toString())},tprint:function(e){if(t.checkingRam)return 0;if(void 0===e||null==e)throw Object(K.d)(t,"tprint() call has incorrect number of arguments. Takes 1 argument");e.toString();Object(V.post)(t.scriptRef.filename+": "+e.toString())},clearLog:function(){if(t.checkingRam)return 0;t.scriptRef.clearLog()},disableLog:function(e){if(t.checkingRam)return 0;if(void 0===_e[e])throw Object(K.d)(t,"Invalid argument to disableLog: "+e);t.disableLogs[e]=!0,null==t.disableLogs.ALL&&null==t.disableLogs.disableLog&&t.scriptRef.log("Disabled logging for "+e)},enableLog:function(e){if(t.checkingRam)return 0;if(void 0===_e[e])throw Object(K.d)(t,"Invalid argument to enableLog: "+e);delete t.disableLogs[e],null==t.disableLogs.ALL&&null==t.disableLogs.enableLog&&t.scriptRef.log("Enabled logging for "+e)},isLogEnabled:function(e){if(t.checkingRam)return 0;if(void 0===_e[e])throw Object(K.d)(t,"Invalid argument to isLogEnabled: "+e);return!t.disableLogs[e]},getScriptLogs:function(e,n){if(t.checkingRam)return 0;if(null!=e&&"string"==typeof e){null==n&&(n=t.serverIp);const a=Object(I.getServer)(n);if(null==a)throw t.log(`getScriptLogs() failed. Invalid IP or hostname passed in: ${n}`),Object(K.d)(t,`getScriptLogs() failed. Invalid IP or hostname passed in: ${n}`);let i=[];for(let e=2;e<arguments.length;++e)i.push(arguments[e]);const r=Object(w.a)(e,i,a);return null==r?(t.scriptRef.log(`getScriptLogs() failed. No such script ${e} on ${a.hostname} with args: ${Object(Q.arrayToString)(i)}`),""):r.logs.slice()}return t.scriptRef.logs.slice()},nuke:function(e){if(t.checkingRam)return se("nuke",g.CONSTANTS.ScriptPortProgramRamCost);if(n("nuke",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(K.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot call nuke(). Invalid IP or hostname passed in: "+e);if(!M.a.hasProgram(P.Programs.NukeProgram.name))throw Object(K.d)(t,"You do not have the NUKE.exe virus!");if(a.openPortCount<a.numOpenPortsRequired)throw Object(K.d)(t,"Not enough ports opened to use NUKE.exe virus");return a.hasAdminRights?null==t.disableLogs.ALL&&null==t.disableLogs.nuke&&t.scriptRef.log("Already have root access to "+a.hostname):(a.hasAdminRights=!0,null==t.disableLogs.ALL&&null==t.disableLogs.nuke&&t.scriptRef.log("Executed NUKE.exe virus on "+a.hostname+" to gain root access")),!0},brutessh:function(e){if(t.checkingRam)return se("brutessh",g.CONSTANTS.ScriptPortProgramRamCost);if(n("brutessh",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(K.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("Cannot call brutessh(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot call brutessh(). Invalid IP or hostname passed in: "+e);if(!M.a.hasProgram(P.Programs.BruteSSHProgram.name))throw t.scriptRef.log("You do not have the BruteSSH.exe program!"),Object(K.d)(t,"You do not have the BruteSSH.exe program!");return a.sshPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.brutessh&&t.scriptRef.log("SSH Port (22) already opened on "+a.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.brutessh&&t.scriptRef.log("Executed BruteSSH.exe on "+a.hostname+" to open SSH port (22)"),a.sshPortOpen=!0,++a.openPortCount),!0},ftpcrack:function(e){if(t.checkingRam)return se("ftpcrack",g.CONSTANTS.ScriptPortProgramRamCost);if(n("ftpcrack",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(K.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("Cannot call ftpcrack(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot call ftpcrack(). Invalid IP or hostname passed in: "+e);if(!M.a.hasProgram(P.Programs.FTPCrackProgram.name))throw Object(K.d)(t,"You do not have the FTPCrack.exe program!");return a.ftpPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.ftpcrack&&t.scriptRef.log("FTP Port (21) already opened on "+a.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.ftpcrack&&t.scriptRef.log("Executed FTPCrack.exe on "+a.hostname+" to open FTP port (21)"),a.ftpPortOpen=!0,++a.openPortCount),!0},relaysmtp:function(e){if(t.checkingRam)return se("relaysmtp",g.CONSTANTS.ScriptPortProgramRamCost);if(n("relaysmtp",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(K.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("Cannot call relaysmtp(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot call relaysmtp(). Invalid IP or hostname passed in: "+e);if(!M.a.hasProgram(P.Programs.RelaySMTPProgram.name))throw Object(K.d)(t,"You do not have the relaySMTP.exe program!");return a.smtpPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.relaysmtp&&t.scriptRef.log("SMTP Port (25) already opened on "+a.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.relaysmtp&&t.scriptRef.log("Executed relaySMTP.exe on "+a.hostname+" to open SMTP port (25)"),a.smtpPortOpen=!0,++a.openPortCount),!0},httpworm:function(e){if(t.checkingRam)return se("httpworm",g.CONSTANTS.ScriptPortProgramRamCost);if(n("httpworm",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(K.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("Cannot call httpworm(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot call httpworm(). Invalid IP or hostname passed in: "+e);if(!M.a.hasProgram(P.Programs.HTTPWormProgram.name))throw Object(K.d)(t,"You do not have the HTTPWorm.exe program!");return a.httpPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.httpworm&&t.scriptRef.log("HTTP Port (80) already opened on "+a.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.httpworm&&t.scriptRef.log("Executed HTTPWorm.exe on "+a.hostname+" to open HTTP port (80)"),a.httpPortOpen=!0,++a.openPortCount),!0},sqlinject:function(e){if(t.checkingRam)return se("sqlinject",g.CONSTANTS.ScriptPortProgramRamCost);if(n("sqlinject",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(K.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("Cannot call sqlinject(). Invalid IP or hostname passed in: "+e),Object(K.d)(t,"Cannot call sqlinject(). Invalid IP or hostname passed in: "+e);if(!M.a.hasProgram(P.Programs.SQLInjectProgram.name))throw Object(K.d)(t,"You do not have the SQLInject.exe program!");return a.sqlPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.sqlinject&&t.scriptRef.log("SQL Port (1433) already opened on "+a.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.sqlinject&&t.scriptRef.log("Executed SQLInject.exe on "+a.hostname+" to open SQL port (1433)"),a.sqlPortOpen=!0,++a.openPortCount),!0},run:function(e,a=1){if(t.checkingRam)return se("run",g.CONSTANTS.ScriptRunRamCost);if(n("run",g.CONSTANTS.ScriptRunRamCost),void 0===e)throw Object(K.d)(t,"run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(a)||a<0)throw Object(K.d)(t,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var i=[],r=2;r<arguments.length;++r)i.push(arguments[r]);var o=Object(I.getServer)(t.serverIp);if(null==o)throw Object(K.d)(t,"Could not find server. This is a bug in the game. Report to game dev");return Object(K.f)(o,e,i,t,a)},exec:function(e,a,i=1){if(t.checkingRam)return se("exec",g.CONSTANTS.ScriptExecRamCost);if(n("exec",g.CONSTANTS.ScriptExecRamCost),void 0===e||void 0===a)throw Object(K.d)(t,"exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(i)||i<0)throw Object(K.d)(t,"Invalid argument for thread count passed into exec(). Must be numeric and greater than 0");for(var r=[],o=3;o<arguments.length;++o)r.push(arguments[o]);var s=Object(I.getServer)(a);if(null==s)throw Object(K.d)(t,"Invalid hostname/ip passed into exec() command: "+a);return Object(K.f)(s,e,r,t,i)},spawn:function(e,a){if(t.checkingRam)return se("spawn",g.CONSTANTS.ScriptSpawnRamCost);if(n("spawn",g.CONSTANTS.ScriptSpawnRamCost),null==e||null==a)throw Object(K.d)(t,"Invalid scriptname or numThreads argument passed to spawn()");Object(J.setTimeoutRef)(()=>{if(void 0===e)throw Object(K.d)(t,"spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");if(isNaN(a)||a<0)throw Object(K.d)(t,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var n=[],i=2;i<arguments.length;++i)n.push(arguments[i]);var r=Object(I.getServer)(t.serverIp);if(null==r)throw Object(K.d)(t,"Could not find server. This is a bug in the game. Report to game dev");return Object(K.f)(r,e,n,t,a)},2e4),null==t.disableLogs.ALL&&null==t.disableLogs.spawn&&t.scriptRef.log("spawn() will execute "+e+" in 20 seconds"),ye(t).exit()},kill:function(e,a){if(t.checkingRam)return se("kill",g.CONSTANTS.ScriptKillRamCost);if(n("kill",g.CONSTANTS.ScriptKillRamCost),void 0===e||void 0===a)throw Object(K.d)(t,"kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");var i=Object(I.getServer)(a);if(null==i)throw t.scriptRef.log("kill() failed. Invalid IP or hostname passed in: "+a),Object(K.d)(t,"kill() failed. Invalid IP or hostname passed in: "+a);for(var r=[],o=2;o<arguments.length;++o)r.push(arguments[o]);var s=Object(w.a)(e,r,i);return null==s?(t.scriptRef.log("kill() failed. No such script "+e+" on "+i.hostname+" with args: "+Object(Q.arrayToString)(r)),!1):Object(G.d)(s,i.ip)?(null==t.disableLogs.ALL&&null==t.disableLogs.kill&&t.scriptRef.log("Killing "+e+" on "+i.hostname+" with args: "+Object(Q.arrayToString)(r)+". May take up to a few minutes for the scripts to die..."),!0):(null==t.disableLogs.ALL&&null==t.disableLogs.kill&&t.scriptRef.log("kill() failed. No such script "+e+" on "+i.hostname+" with args: "+Object(Q.arrayToString)(r)),!1)},killall:function(e=t.serverIp){if(t.checkingRam)return se("killall",g.CONSTANTS.ScriptKillRamCost);if(n("killall",g.CONSTANTS.ScriptKillRamCost),void 0===e)throw Object(K.d)(t,"killall() call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("killall() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"killall() failed. Invalid IP or hostname passed in: "+e);for(var i=a.runningScripts.length>0,r=a.runningScripts.length-1;r>=0;--r)Object(G.d)(a.runningScripts[r],a.ip);return null==t.disableLogs.ALL&&null==t.disableLogs.killall&&t.scriptRef.log("killall(): Killing all scripts on "+a.hostname+". May take a few minutes for the scripts to die"),i},exit:function(){if(t.checkingRam)return 0;var e=Object(I.getServer)(t.serverIp);if(null==e)throw Object(K.d)(t,"Error getting Server for this script in exit(). This is a bug please contact game dev");Object(G.d)(t.scriptRef,e.ip)?t.scriptRef.log("Exiting..."):t.scriptRef.log("Exit failed(). This is a bug please contact game developer")},scp:function(e,a,i){if(t.checkingRam)return se("scp",g.CONSTANTS.ScriptScpRamCost);if(n("scp",g.CONSTANTS.ScriptScpRamCost),2!==arguments.length&&3!==arguments.length)throw Object(K.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(e&&e.constructor===Array){var r=!1;return e.forEach(function(e){ye(t).scp(e,a,i)&&(r=!0)}),r}if(!e.endsWith(".lit")&&!Object(x.isScriptFilename)(e)&&!e.endsWith("txt"))throw Object(K.d)(t,"ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");var o,s;if(null!=i){if(void 0===e||void 0===a||void 0===i)throw Object(K.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(I.getServer)(i)))throw Object(K.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${i}`);if(null==(s=Object(I.getServer)(a)))throw Object(K.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${a}`)}else{if(null==a)throw Object(K.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(void 0===e||void 0===a)throw Object(K.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(I.getServer)(a)))throw Object(K.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${a}`);if(null==(s=Object(I.getServer)(t.serverIp)))throw Object(K.d)(t,"Could not find server ip for this script. This is a bug please contact game developer")}if(e.endsWith(".lit")){for(var l=!1,c=0;c<s.messages.length;++c)if(!(s.messages[c]instanceof O.Message)&&s.messages[c]==e){l=!0;break}if(!l)return t.scriptRef.log(e+" does not exist. scp() failed"),!1;for(c=0;c<o.messages.length;++c)if(o.messages[c]===e)return null==t.disableLogs.ALL&&null==t.disableLogs.scp&&t.scriptRef.log(e+" copied over to "+o.hostname),!0;return o.messages.push(e),null==t.disableLogs.ALL&&null==t.disableLogs.scp&&t.scriptRef.log(e+" copied over to "+o.hostname),!0}if(e.endsWith(".txt")){var u;for(l=!1,c=0;c<s.textFiles.length;++c)if(s.textFiles[c].fn===e){l=!0,u=s.textFiles[c];break}if(!l)return t.scriptRef.log(e+" does not exist. scp() failed"),!1;for(c=0;c<o.textFiles.length;++c)if(o.textFiles[c].fn===e)return o.textFiles[c].text=u.text,null==t.disableLogs.ALL&&null==t.disableLogs.scp&&t.scriptRef.log(e+" copied over to "+o.hostname),!0;var p=new F.TextFile(u.fn,u.text);return o.textFiles.push(p),null==t.disableLogs.ALL&&null==t.disableLogs.scp&&t.scriptRef.log(e+" copied over to "+o.hostname),!0}var m=null;for(c=0;c<s.scripts.length;++c)if(e==s.scripts[c].filename){m=s.scripts[c];break}if(null==m)return t.scriptRef.log(e+" does not exist. scp() failed"),!1;for(c=0;c<o.scripts.length;++c)if(e==o.scripts[c].filename){null==t.disableLogs.ALL&&null==t.disableLogs.scp&&(t.scriptRef.log("WARNING: "+e+" already exists on "+o.hostname+" and it will be overwritten."),t.scriptRef.log(e+" overwritten on "+o.hostname));var h=o.scripts[c];return h.code=m.code,h.ramUsage=m.ramUsage,h.module="",!0}var d=new A.Script;return d.filename=e,d.code=m.code,d.ramUsage=m.ramUsage,d.server=o.ip,o.scripts.push(d),null==t.disableLogs.ALL&&null==t.disableLogs.scp&&t.scriptRef.log(e+" copied over to "+o.hostname),!0},ls:function(e,a){if(t.checkingRam)return se("ls",g.CONSTANTS.ScriptScanRamCost);if(n("ls",g.CONSTANTS.ScriptScanRamCost),void 0===e)throw Object(K.d)(t,"ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");var i=Object(I.getServer)(e);if(null==i)throw t.scriptRef.log("ls() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"ls() failed. Invalid IP or hostname passed in: "+e);var r=!1;arguments.length>=2&&(r=a.toString());for(var o=[],s=0;s<i.programs.length;s++)r?i.programs[s].includes(r)&&o.push(i.programs[s]):o.push(i.programs[s]);for(s=0;s<i.scripts.length;s++)r?i.scripts[s].filename.includes(r)&&o.push(i.scripts[s].filename):o.push(i.scripts[s].filename);for(s=0;s<i.messages.length;s++)r?i.messages[s]instanceof O.Message?i.messages[s].filename.includes(r)&&o.push(i.messages[s].filename):i.messages[s].includes(r)&&o.push(i.messages[s]):i.messages[s]instanceof O.Message?o.push(i.messages[s].filename):o.push(i.messages[s]);for(s=0;s<i.textFiles.length;s++)r?i.textFiles[s].fn.includes(r)&&o.push(i.textFiles[s].fn):o.push(i.textFiles[s].fn);for(s=0;s<i.contracts.length;++s)r?i.contracts[s].fn.includes(r)&&o.push(i.contracts[s].fn):o.push(i.contracts[s].fn);return o.sort(),o},ps:function(e=t.serverIp){if(t.checkingRam)return se("ps",g.CONSTANTS.ScriptScanRamCost);n("ps",g.CONSTANTS.ScriptScanRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("ps() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"ps() failed. Invalid IP or hostname passed in: "+e);const i=[];for(const e in a.runningScripts){const t=a.runningScripts[e];i.push({filename:t.filename,threads:t.threads,args:t.args.slice()})}return i},hasRootAccess:function(e){if(t.checkingRam)return se("hasRootAccess",g.CONSTANTS.ScriptHasRootAccessRamCost);if(n("hasRootAccess",g.CONSTANTS.ScriptHasRootAccessRamCost),void 0===e)throw Object(K.d)(t,"hasRootAccess() call has incorrect number of arguments. Takes 1 argument");var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("hasRootAccess() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"hasRootAccess() failed. Invalid IP or hostname passed in: "+e);return a.hasAdminRights},getIp:function(){if(t.checkingRam)return se("getIp",g.CONSTANTS.ScriptGetHostnameRamCost);n("getIp",g.CONSTANTS.ScriptGetHostnameRamCost);var e=Object(I.getServer)(t.serverIp);if(null==e)throw Object(K.d)(t,"Could not find server. This is a bug in the game. Report to game dev");return e.ip},getHostname:function(){if(t.checkingRam)return se("getHostname",g.CONSTANTS.ScriptGetHostnameRamCost);n("getHostname",g.CONSTANTS.ScriptGetHostnameRamCost);var e=Object(I.getServer)(t.serverIp);if(null==e)throw Object(K.d)(t,"Could not find server. This is a bug in the game. Report to game dev");return e.hostname},getHackingLevel:function(){return t.checkingRam?se("getHackingLevel",g.CONSTANTS.ScriptGetHackingLevelRamCost):(n("getHackingLevel",g.CONSTANTS.ScriptGetHackingLevelRamCost),M.a.updateSkillLevels(),null==t.disableLogs.ALL&&null==t.disableLogs.getHackingLevel&&t.scriptRef.log("getHackingLevel() returned "+M.a.hacking_skill),M.a.hacking_skill)},getHackingMultipliers:function(){return t.checkingRam?se("getHackingMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost):(n("getHackingMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost),{chance:M.a.hacking_chance_mult,speed:M.a.hacking_speed_mult,money:M.a.hacking_money_mult,growth:M.a.hacking_grow_mult})},getHacknetMultipliers:function(){return t.checkingRam?se("getHacknetMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost):(n("getHacknetMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost),{production:M.a.hacknet_node_money_mult,purchaseCost:M.a.hacknet_node_purchase_cost_mult,ramCost:M.a.hacknet_node_ram_cost_mult,coreCost:M.a.hacknet_node_core_cost_mult,levelCost:M.a.hacknet_node_level_cost_mult})},getBitNodeMultipliers:function(){if(t.checkingRam)return se("getBitNodeMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost);if(n("getBitNodeMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost),!ce)throw Object(K.d)(t,"Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");return Object.assign({},l.BitNodeMultipliers)},getServerMoneyAvailable:function(e){if(t.checkingRam)return se("getServerMoneyAvailable",g.CONSTANTS.ScriptGetServerRamCost);n("getServerMoneyAvailable",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerMoneyAvailable() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerMoneyAvailable() failed. Invalid IP or hostname passed in: "+e);return"home"==a.hostname?(null==t.disableLogs.ALL&&null==t.disableLogs.getServerMoneyAvailable&&t.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $"+Object(ee.formatNumber)(M.a.money.toNumber(),2)),M.a.money.toNumber()):(null==t.disableLogs.ALL&&null==t.disableLogs.getServerMoneyAvailable&&t.scriptRef.log("getServerMoneyAvailable() returned "+Object(ee.formatNumber)(a.moneyAvailable,2)+" for "+a.hostname),a.moneyAvailable)},getServerSecurityLevel:function(e){if(t.checkingRam)return se("getServerSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerSecurityLevel() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerSecurityLevel() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerSecurityLevel&&t.scriptRef.log("getServerSecurityLevel() returned "+Object(ee.formatNumber)(a.hackDifficulty,3)+" for "+a.hostname),a.hackDifficulty},getServerBaseSecurityLevel:function(e){if(t.checkingRam)return se("getServerBaseSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerBaseSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerBaseSecurityLevel&&t.scriptRef.log("getServerBaseSecurityLevel() returned "+Object(ee.formatNumber)(a.baseDifficulty,3)+" for "+a.hostname),a.baseDifficulty},getServerMinSecurityLevel:function(e){if(t.checkingRam)return se("getServerMinSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerMinSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerMinSecurityLevel&&t.scriptRef.log("getServerMinSecurityLevel() returned "+Object(ee.formatNumber)(a.minDifficulty,3)+" for "+a.hostname),a.minDifficulty},getServerRequiredHackingLevel:function(e){if(t.checkingRam)return se("getServerRequiredHackingLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerRequiredHackingLevel",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerRequiredHackingLevel&&t.scriptRef.log("getServerRequiredHackingLevel returned "+Object(ee.formatNumber)(a.requiredHackingSkill,0)+" for "+a.hostname),a.requiredHackingSkill},getServerMaxMoney:function(e){if(t.checkingRam)return se("getServerMaxMoney",g.CONSTANTS.ScriptGetServerRamCost);n("getServerMaxMoney",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerMaxMoney() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerMaxMoney&&t.scriptRef.log("getServerMaxMoney() returned "+Object(ee.formatNumber)(a.moneyMax,0)+" for "+a.hostname),a.moneyMax},getServerGrowth:function(e){if(t.checkingRam)return se("getServerGrowth",g.CONSTANTS.ScriptGetServerRamCost);n("getServerGrowth",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerGrowth() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerGrowth&&t.scriptRef.log("getServerGrowth() returned "+Object(ee.formatNumber)(a.serverGrowth,0)+" for "+a.hostname),a.serverGrowth},getServerNumPortsRequired:function(e){if(t.checkingRam)return se("getServerNumPortsRequired",g.CONSTANTS.ScriptGetServerRamCost);n("getServerNumPortsRequired",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerNumPortsRequired() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerNumPortsRequired&&t.scriptRef.log("getServerNumPortsRequired() returned "+Object(ee.formatNumber)(a.numOpenPortsRequired,0)+" for "+a.hostname),a.numOpenPortsRequired},getServerRam:function(e){if(t.checkingRam)return se("getServerRam",g.CONSTANTS.ScriptGetServerRamCost);n("getServerRam",g.CONSTANTS.ScriptGetServerRamCost);var a=Object(I.getServer)(e);if(null==a)throw t.scriptRef.log("getServerRam() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getServerRam() failed. Invalid IP or hostname passed in: "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.getServerRam&&t.scriptRef.log("getServerRam() returned ["+Object(ee.formatNumber)(a.maxRam,2)+"GB, "+Object(ee.formatNumber)(a.ramUsed,2)+"GB]"),[a.maxRam,a.ramUsed]},serverExists:function(e){return t.checkingRam?se("serverExists",g.CONSTANTS.ScriptGetServerRamCost):(n("serverExists",g.CONSTANTS.ScriptGetServerRamCost),null!==Object(I.getServer)(e))},fileExists:function(e,a=t.serverIp){if(t.checkingRam)return se("fileExists",g.CONSTANTS.ScriptFileExistsRamCost);if(n("fileExists",g.CONSTANTS.ScriptFileExistsRamCost),void 0===e)throw Object(K.d)(t,"fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");var i=Object(I.getServer)(a);if(null==i)throw t.scriptRef.log("fileExists() failed. Invalid IP or hostname passed in: "+a),Object(K.d)(t,"fileExists() failed. Invalid IP or hostname passed in: "+a);for(var r=0;r<i.scripts.length;++r)if(e==i.scripts[r].filename)return!0;for(r=0;r<i.programs.length;++r)if(e.toLowerCase()==i.programs[r].toLowerCase())return!0;for(r=0;r<i.messages.length;++r)if(!(i.messages[r]instanceof O.Message)&&e.toLowerCase()===i.messages[r])return!0;return null!=Object(F.getTextFile)(e,i)},isRunning:function(e,a){if(t.checkingRam)return se("isRunning",g.CONSTANTS.ScriptIsRunningRamCost);if(n("isRunning",g.CONSTANTS.ScriptIsRunningRamCost),void 0===e||void 0===a)throw Object(K.d)(t,"isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");var i=Object(I.getServer)(a);if(null==i)throw t.scriptRef.log("isRunning() failed. Invalid IP or hostname passed in: "+a),Object(K.d)(t,"isRunning() failed. Invalid IP or hostname passed in: "+a);for(var r=[],o=2;o<arguments.length;++o)r.push(arguments[o]);return null!=Object(w.a)(e,r,i)},getStockSymbols:function(){if(t.checkingRam)return se("getStockSymbols",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockSymbols",g.CONSTANTS.ScriptGetStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use getStockSymbols()");return Object.values(B.d)},getStockPrice:function(e){if(t.checkingRam)return se("getStockPrice",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockPrice",g.CONSTANTS.ScriptGetStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use getStockPrice()");var a=B.e[e];if(null==a)throw Object(K.d)(t,"Invalid stock symbol passed into getStockPrice()");return parseFloat(a.price.toFixed(3))},getStockPosition:function(e){if(t.checkingRam)return se("getStockPosition",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockPosition",g.CONSTANTS.ScriptGetStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use getStockPosition()");var a=B.e[e];if(null==a)throw Object(K.d)(t,"Invalid stock symbol passed into getStockPosition()");return[a.playerShares,a.playerAvgPx,a.playerShortShares,a.playerAvgShortPx]},getStockMaxShares:function(e){if(t.checkingRam)return se("getStockMaxShares",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockMaxShares",g.CONSTANTS.ScriptGetStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use getStockMaxShares()");const a=B.e[e];if(null==a)throw Object(K.d)(t,"Invalid stock symbol passed into getStockMaxShares()");return a.maxShares},buyStock:function(e,a){if(t.checkingRam)return se("buyStock",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("buyStock",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use buyStock()");var i=B.e[e];if(null==i)throw Object(K.d)(t,"Invalid stock symbol passed into buyStock()");if(a<0||isNaN(a))return t.scriptRef.log("ERROR: Invalid 'shares' argument passed to buyStock()"),0;if(0===(a=Math.round(a)))return 0;var r=i.price*a;if(M.a.money.lt(r+g.CONSTANTS.StockMarketCommission))return t.scriptRef.log("Not enough money to purchase "+Object(ee.formatNumber)(a,0)+" shares of "+e+". Need $"+Object(ee.formatNumber)(r+g.CONSTANTS.StockMarketCommission,2).toString()),0;if(a+i.playerShares+i.playerShortShares>i.maxShares)return t.scriptRef.log(`You cannot purchase this many shares. ${i.symbol} has a maximum of `+`${i.maxShares} shares.`),0;var o=i.playerShares*i.playerAvgPx;M.a.loseMoney(r+g.CONSTANTS.StockMarketCommission);var s=o+r;return i.playerShares+=a,i.playerAvgPx=s/i.playerShares,Y.routing.isOn(Y.Page.StockMarket)&&Object(B.r)(i),null==t.disableLogs.ALL&&null==t.disableLogs.buyStock&&t.scriptRef.log("Bought "+Object(ee.formatNumber)(a,0)+" shares of "+i.symbol+" at $"+Object(ee.formatNumber)(i.price,2)+" per share"),i.price},sellStock:function(e,a){if(t.checkingRam)return se("sellStock",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("sellStock",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use sellStock()");var i=B.e[e];if(null==i)throw Object(K.d)(t,"Invalid stock symbol passed into sellStock()");if(a<0||isNaN(a))return t.scriptRef.log("ERROR: Invalid 'shares' argument passed to sellStock()"),0;if((a=Math.round(a))>i.playerShares&&(a=i.playerShares),0===a)return 0;var r=i.price*a-g.CONSTANTS.StockMarketCommission;M.a.gainMoney(r);var o=(i.price-i.playerAvgPx)*a-g.CONSTANTS.StockMarketCommission;return isNaN(o)&&(o=0),t.scriptRef.onlineMoneyMade+=o,M.a.scriptProdSinceLastAug+=o,M.a.recordMoneySource(o,"stock"),i.playerShares-=a,0==i.playerShares&&(i.playerAvgPx=0),Y.routing.isOn(Y.Page.StockMarket)&&Object(B.r)(i),null==t.disableLogs.ALL&&null==t.disableLogs.sellStock&&t.scriptRef.log("Sold "+Object(ee.formatNumber)(a,0)+" shares of "+i.symbol+" at $"+Object(ee.formatNumber)(i.price,2)+" per share. Gained $"+Object(ee.formatNumber)(r,2)),i.price},shortStock(e,a){if(t.checkingRam)return se("shortStock",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("shortStock",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use shortStock()");if(8!==M.a.bitNodeN&&!(me&&ge>=2))throw Object(K.d)(t,"ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var i=B.e[e];if(null==i)throw Object(K.d)(t,"ERROR: Invalid stock symbol passed into shortStock()");return Object(B.p)(i,a,t)?i.price:0},sellShort(e,a){if(t.checkingRam)return se("sellShort",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("sellShort",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use sellShort()");if(8!==M.a.bitNodeN&&!(me&&ge>=2))throw Object(K.d)(t,"ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var i=B.e[e];if(null==i)throw Object(K.d)(t,"ERROR: Invalid stock symbol passed into sellShort()");return Object(B.n)(i,a,t)?i.price:0},placeOrder(e,a,i,r,o){if(t.checkingRam)return se("placeOrder",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("placeOrder",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use placeOrder()");if(8!==M.a.bitNodeN&&!(me&&ge>=3))throw Object(K.d)(t,"ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var s,l,c=B.e[e];if(null==c)throw Object(K.d)(t,"ERROR: Invalid stock symbol passed into placeOrder()");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=B.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=B.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=B.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(K.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=B.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=B.b.Long;else{if(!o.includes("s"))throw Object(K.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=B.b.Short}return Object(B.l)(c,a,i,s,l,t)},cancelOrder(e,a,i,r,o){if(t.checkingRam)return se("cancelOrder",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("cancelOrder",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use cancelOrder()");if(8!==M.a.bitNodeN&&!(me&&ge>=3))throw Object(K.d)(t,"ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var s,l,c=B.e[e];if(null==c)throw Object(K.d)(t,"ERROR: Invalid stock symbol passed into cancelOrder()");if(isNaN(a)||isNaN(i))throw Object(K.d)(t,"ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=B.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=B.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=B.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(K.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=B.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=B.b.Long;else{if(!o.includes("s"))throw Object(K.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=B.b.Short}var u={stock:c,shares:a,price:i,type:s,pos:l};return Object(B.f)(u,t)},getOrders:function(){if(t.checkingRam)return se("getOrders",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("getOrders",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use getOrders()");if(8!==M.a.bitNodeN&&!(me&&ge>=3))throw Object(K.d)(t,"ERROR: Cannot use getOrders(). You must either be in BitNode-8 or have Level 3 of Source-File 8");const e={},a=B.c.Orders;for(let t in a){const n=a[t];if(n.constructor===Array&&n.length>0){e[t]=[];for(let a=0;a<n.length;++a)e[t].push({shares:n[a].shares,price:n[a].price,type:n[a].type,position:n[a].pos})}}return e},getStockVolatility:function(e){if(t.checkingRam)return se("getStockVolatility",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("getStockVolatility",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.has4SDataTixApi)throw Object(K.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockVolatility()");var a=B.e[e];if(null==a)throw Object(K.d)(t,"ERROR: Invalid stock symbol passed into getStockVolatility()");return a.mv/100},getStockForecast:function(e){if(t.checkingRam)return se("getStockForecast",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("getStockForecast",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.has4SDataTixApi)throw Object(K.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockForecast()");var a=B.e[e];if(null==a)throw Object(K.d)(t,"ERROR: Invalid stock symbol passed into getStockForecast()");var i=50;return a.b?i+=a.otlkMag:i-=a.otlkMag,i/100},purchase4SMarketData:function(){if(t.checkingRam)return se("purchase4SMarketData",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("purchase4SMarketData",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use purchase4SMarketData()");return M.a.has4SData?(t.shouldLog("purchase4SMarketData")&&t.log("Already purchased 4S Market Data"),!0):M.a.money.lt(getStockMarket4SDataCost())?(t.shouldLog("purchase4SMarketData")&&t.log("Failed to purchase 4S Market Data - Not enough money"),!1):(M.a.has4SData=!0,M.a.loseMoney(getStockMarket4SDataCost()),t.shouldLog("purchase4SMarketData")&&t.log("Purchased 4S Market Data"),!0)},purchase4SMarketDataTixApi:function(){if(t.checkingRam)return se("purchase4SMarketDataTixApi",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("purchase4SMarketDataTixApi",g.CONSTANTS.ScriptBuySellStockRamCost),!M.a.hasTixApiAccess)throw Object(K.d)(t,"You don't have TIX API Access! Cannot use purchase4SMarketDataTixApi()");return M.a.has4SDataTixApi?(t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Already purchased 4S Market Data TIX API"),!0):M.a.money.lt(Object(W.getStockMarket4STixApiCost)())?(t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Failed to purchase 4S Market Data TIX API - Not enough money"),!1):(M.a.has4SDataTixApi=!0,M.a.loseMoney(Object(W.getStockMarket4STixApiCost)()),t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Purchased 4S Market Data TIX API"),!0)},getPurchasedServerLimit:function(){return t.checkingRam?se("getPurchasedServerLimit",g.CONSTANTS.ScriptGetPurchasedServerLimit):(n("getPurchasedServerLimit",g.CONSTANTS.ScriptGetPurchasedServerLimit),Object(L.b)())},getPurchasedServerMaxRam:function(){return t.checkingRam?se("getPurchasedServerMaxRam",g.CONSTANTS.ScriptGetPurchasedServerMaxRam):(n("getPurchasedServerMaxRam",g.CONSTANTS.ScriptGetPurchasedServerMaxRam),Object(L.c)())},getPurchasedServerCost:function(e){if(t.checkingRam)return se("getPurchasedServerCost",g.CONSTANTS.ScriptGetPurchaseServerRamCost);n("getPurchasedServerCost",g.CONSTANTS.ScriptGetPurchaseServerRamCost);const a=Object(L.a)(e);return a===1/0?(t.scriptRef.log("ERROR: 'getPurchasedServerCost()' failed due to an invalid 'ram' argument"),1/0):a},purchaseServer:function(e,a){if(t.checkingRam)return se("purchaseServer",g.CONSTANTS.ScriptPurchaseServerRamCost);n("purchaseServer",g.CONSTANTS.ScriptPurchaseServerRamCost);var i=String(e);if(""==(i=i.replace(/\s+/g,"")))return t.log("ERROR: Passed empty string for hostname argument of purchaseServer()"),"";if(M.a.purchasedServers.length>=Object(L.b)())return t.log(`ERROR: You have reached the maximum limit of ${Object(L.b)()} servers. You cannot purchase any more.`),"";const r=Object(L.a)(a);if(r===1/0)return t.log("ERROR: 'purchaseServer()' failed due to an invalid 'ram' argument"),1/0;if(M.a.money.lt(r))return t.log("ERROR: Not enough money to purchase server. Need $"+Object(ee.formatNumber)(r,2)),"";var o=new N.Server({ip:Object(Z.createRandomIp)(),hostname:i,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:a});Object(R.AddToAllServers)(o),M.a.purchasedServers.push(o.ip);var s=M.a.getHomeComputer();return s.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(s.ip),M.a.loseMoney(r),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseServer&&t.scriptRef.log("Purchased new server with hostname "+o.hostname+" for $"+Object(ee.formatNumber)(r,2)),o.hostname},deleteServer:function(e){if(t.checkingRam)return se("deleteServer",g.CONSTANTS.ScriptPurchaseServerRamCost);n("deleteServer",g.CONSTANTS.ScriptPurchaseServerRamCost);var a=String(e);a=a.replace(/\s\s+/g,"");var i=Object(I.GetServerByHostname)(a);if(null==i)return t.scriptRef.log("ERROR: Could not find server with hostname "+a+". deleteServer() failed"),!1;if(!i.purchasedByPlayer||"home"===i.hostname)return t.scriptRef.log("ERROR: Server "+i.hostname+" is not a purchased server. Cannot be deleted. deleteServer() failed"),!1;var r=i.ip;if(i.isConnectedTo)return t.scriptRef.log("ERROR: deleteServer() failed because you are currently connected to the server you are trying to delete"),!1;if(r===t.serverIp)return t.scriptRef.log("ERROR: Cannot call deleteServer() on self. deleteServer() failed"),!1;if(i.runningScripts.length>0)return t.scriptRef.log("ERROR: Cannot delete server "+i.hostname+" because it still has scripts running."),!1;for(var o=!1,s=0;s<M.a.purchasedServers.length;++s)if(r==M.a.purchasedServers[s]){o=!0,M.a.purchasedServers.splice(s,1);break}if(!o)return t.scriptRef.log("ERROR: Could not identify server "+i.hostname+"as a purchased server. This is likely a bug please contact game dev"),!1;delete R.AllServers[r],o=!1;var l=M.a.getHomeComputer();for(s=0;s<l.serversOnNetwork.length;++s)if(r==l.serversOnNetwork[s])return l.serversOnNetwork.splice(s,1),null==t.disableLogs.ALL&&null==t.disableLogs.deleteServer&&t.scriptRef.log("Deleted server "+a),!0;return t.scriptRef.log("ERROR: Could not find server "+i.hostname+"as a purchased server. This is likely a bug please contact game dev"),!1},getPurchasedServers:function(e=!0){if(t.checkingRam)return se("getPurchasedServers",g.CONSTANTS.ScriptPurchaseServerRamCost);n("getPurchasedServers",g.CONSTANTS.ScriptPurchaseServerRamCost);var a=[];return M.a.purchasedServers.forEach(function(n){if(e){var i=Object(I.getServer)(n);if(null==i)throw Object(K.d)(t,"ERROR: Could not find server in getPurchasedServers(). This is a bug please report to game dev");a.push(i.hostname)}else a.push(n)}),a},write:function(e,a="",i="a"){if(t.checkingRam)return se("write",g.CONSTANTS.ScriptReadWriteRamCost);if(n("write",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e)){if(Object(te.isString)(e)){var r=e,o=t.getServer();if(null==o)throw Object(K.d)(t,"Error getting Server for this script in write(). This is a bug please contact game dev");if(Object(x.isScriptFilename)(r)){let e=t.getScriptOnServer(r);if(null==e)return e=new A.Script(r,a,o.ip),o.scripts.push(e),!0;"w"===i?e.code=a:e.code+=a,e.updateRamUsage()}else{let e=Object(F.getTextFile)(r,o);if(null==e)return e=Object(F.createTextFile)(r,a,o),!0;"w"===i?e.write(a):e.append(a)}return!0}throw Object(K.d)(t,"Invalid argument passed in for write: "+e)}if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(K.d)(t,"ERROR: Trying to write to invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=G.a[e-1])||!(e instanceof q.a))throw Object(K.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.write(a)},tryWrite:function(e,a=""){if(t.checkingRam)return se("tryWrite",g.CONSTANTS.ScriptReadWriteRamCost);if(n("tryWrite",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(K.d)(t,"Invalid argument passed in for tryWrite: "+e);if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(K.d)(t,"ERROR: tryWrite() called on invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=G.a[e-1])||!(e instanceof q.a))throw Object(K.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.tryWrite(a)},read:function(e){if(t.checkingRam)return se("read",g.CONSTANTS.ScriptReadWriteRamCost);if(n("read",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e)){if(Object(te.isString)(e)){let n=e,a=Object(I.getServer)(t.serverIp);if(null==a)throw Object(K.d)(t,"Error getting Server for this script in read(). This is a bug please contact game dev");if(Object(x.isScriptFilename)(n)){let e=t.getScriptOnServer(n);return null==e?"":e.code}{let e=Object(F.getTextFile)(n,a);return null!==e?e.text:""}}throw Object(K.d)(t,"Invalid argument passed in for read(): "+e)}if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(K.d)(t,"ERROR: Trying to read from invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=G.a[e-1])||!(e instanceof q.a))throw Object(K.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.read()},peek:function(e){if(t.checkingRam)return se("peek",g.CONSTANTS.ScriptReadWriteRamCost);if(n("peek",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(K.d)(t,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+g.CONSTANTS.NumNetscriptPorts);if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(K.d)(t,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+g.CONSTANTS.NumNetscriptPorts);if(null==(e=G.a[e-1])||!(e instanceof q.a))throw Object(K.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.peek()},clear:function(e){if(t.checkingRam)return se("clear",g.CONSTANTS.ScriptReadWriteRamCost);if(n("clear",g.CONSTANTS.ScriptReadWriteRamCost),!isNaN(e)){if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(K.d)(t,"ERROR: Trying to clear invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid");if(null==(e=G.a[e-1])||!(e instanceof q.a))throw Object(K.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.clear()}if(!Object(te.isString)(e))throw Object(K.d)(t,"Invalid argument passed in for clear(): "+e);var a=e,i=Object(I.getServer)(t.serverIp);if(null==i)throw Object(K.d)(t,"Error getting Server for this script in clear(). This is a bug please contact game dev");var r=Object(F.getTextFile)(a,i);return null!=r&&r.write(""),0},getPortHandle:function(e){if(t.checkingRam)return se("getPortHandle",10*g.CONSTANTS.ScriptReadWriteRamCost);if(n("getPortHandle",10*g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(K.d)(t,"ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and "+g.CONSTANTS.NumNetscriptPorts);if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(K.d)(t,"ERROR: getPortHandle() called with invalid port number: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid");if(null==(e=G.a[e-1])||!(e instanceof q.a))throw Object(K.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e},rm:function(e,a){if(t.checkingRam)return se("rm",g.CONSTANTS.ScriptReadWriteRamCost);n("rm",g.CONSTANTS.ScriptReadWriteRamCost),null!=a&&""!==a||(a=t.serverIp);var i=Object(I.getServer)(a);if(null==i)throw Object(K.d)(t,`Invalid server specified for rm(): ${a}`);if(e.endsWith(".exe")){for(var r=0;r<i.programs.length;++r)if(i.programs[r]===e)return i.programs.splice(r,1),!0}else if(Object(x.isScriptFilename)(e)){for(r=0;r<i.scripts.length;++r)if(i.scripts[r].filename===e){for(var o=0;o<i.runningScripts.length;++o)if(i.runningScripts[o].filename===e)return t.scriptRef.log("Cannot delete a script that is currently running!"),!1;return i.scripts.splice(r,1),!0}}else if(e.endsWith(".lit"))for(r=0;r<i.messages.length;++r){var s=i.messages[r];if(!(s instanceof O.Message)&&Object(te.isString)(s)&&s===e)return i.messages.splice(r,1),!0}else if(e.endsWith(".txt")){for(r=0;r<i.textFiles.length;++r)if(i.textFiles[r].fn===e)return i.textFiles.splice(r,1),!0}else if(e.endsWith(".cct"))for(r=0;r<i.contracts.length;++r)if(i.contracts[r].fn===e)return i.contracts.splice(r,1),!0;return!1},scriptRunning:function(e,a){if(t.checkingRam)return se("scriptRunning",g.CONSTANTS.ScriptArbScriptRamCost);n("scriptRunning",g.CONSTANTS.ScriptArbScriptRamCost);var i=Object(I.getServer)(a);if(null==i)throw t.scriptRef.log("scriptRunning() failed. Invalid IP or hostname passed in: "+a),Object(K.d)(t,"scriptRunning() failed. Invalid IP or hostname passed in: "+a);for(var r=0;r<i.runningScripts.length;++r)if(i.runningScripts[r].filename==e)return!0;return!1},scriptKill:function(e,a){if(t.checkingRam)return se("scriptKill",g.CONSTANTS.ScriptArbScriptRamCost);n("scriptKill",g.CONSTANTS.ScriptArbScriptRamCost);var i=Object(I.getServer)(a);if(null==i)throw t.scriptRef.log("scriptKill() failed. Invalid IP or hostname passed in: "+a),Object(K.d)(t,"scriptKill() failed. Invalid IP or hostname passed in: "+a);for(var r=!1,o=0;o<i.runningScripts.length;++o)i.runningScripts[o].filename==e&&(Object(G.d)(i.runningScripts[o],i.ip),r=!0);return r},getScriptName:function(){return t.checkingRam?0:t.name},getScriptRam:function(e,a=t.serverIp){if(t.checkingRam)return se("getScriptRam",g.CONSTANTS.ScriptGetScriptRamCost);n("getScriptRam",g.CONSTANTS.ScriptGetScriptRamCost);var i=Object(I.getServer)(a);if(null==i)throw t.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: "+a),Object(K.d)(t,"getScriptRam() failed. Invalid IP or hostname passed in: "+a);for(var r=0;r<i.scripts.length;++r)if(i.scripts[r].filename==e)return i.scripts[r].ramUsage;return 0},getHackTime:function(e,a,i){if(t.checkingRam)return se("getHackTime",g.CONSTANTS.ScriptGetHackTimeRamCost);n("getHackTime",g.CONSTANTS.ScriptGetHackTimeRamCost);var r=Object(I.getServer)(e);if(null==r)throw t.scriptRef.log("getHackTime() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getHackTime() failed. Invalid IP or hostname passed in: "+e);return Object(f.d)(r,a,i)},getGrowTime:function(e,a,i){if(t.checkingRam)return se("getGrowTime",g.CONSTANTS.ScriptGetHackTimeRamCost);n("getGrowTime",g.CONSTANTS.ScriptGetHackTimeRamCost);var r=Object(I.getServer)(e);if(null==r)throw t.scriptRef.log("getGrowTime() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getGrowTime() failed. Invalid IP or hostname passed in: "+e);return Object(f.a)(r,a,i)},getWeakenTime:function(e,a,i){if(t.checkingRam)return se("getWeakenTime",g.CONSTANTS.ScriptGetHackTimeRamCost);n("getWeakenTime",g.CONSTANTS.ScriptGetHackTimeRamCost);var r=Object(I.getServer)(e);if(null==r)throw t.scriptRef.log("getWeakenTime() failed. Invalid IP or hostname passed in: "+e),Object(K.d)(t,"getWeakenTime() failed. Invalid IP or hostname passed in: "+e);return Object(f.f)(r,a,i)},getScriptIncome:function(e,i){if(t.checkingRam)return se("getScriptIncome",g.CONSTANTS.ScriptGetScriptRamCost);if(n("getScriptIncome",g.CONSTANTS.ScriptGetScriptRamCost),0===arguments.length){var r=[];return r.push(Object(a.c)()),r.push(M.a.scriptProdSinceLastAug/(M.a.playtimeSinceLastAug/1e3)),r}var o=Object(I.getServer)(i);if(null==o)throw t.scriptRef.log("getScriptIncome() failed. Invalid IP or hostnamed passed in: "+i),Object(K.d)(t,"getScriptIncome() failed. Invalid IP or hostnamed passed in: "+i);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(w.a)(e,s,o);return null==c?(t.scriptRef.log("getScriptIncome() failed. No such script "+e+" on "+o.hostname+" with args: "+Object(Q.arrayToString)(s)),-1):c.onlineMoneyMade/c.onlineRunningTime},getScriptExpGain:function(e,a){if(t.checkingRam)return se("getScriptExpGain",g.CONSTANTS.ScriptGetScriptRamCost);if(n("getScriptExpGain",g.CONSTANTS.ScriptGetScriptRamCost),0===arguments.length){for(var i=0,r=0;r<G.h.length;++r)i+=G.h[r].scriptRef.onlineExpGained/G.h[r].scriptRef.onlineRunningTime;return i}var o=Object(I.getServer)(a);if(null==o)throw t.scriptRef.log("getScriptExpGain() failed. Invalid IP or hostnamed passed in: "+a),Object(K.d)(t,"getScriptExpGain() failed. Invalid IP or hostnamed passed in: "+a);var s=[];for(r=2;r<arguments.length;++r)s.push(arguments[r]);var l=Object(w.a)(e,s,o);return null==l?(t.scriptRef.log("getScriptExpGain() failed. No such script "+e+" on "+o.hostname+" with args: "+Object(Q.arrayToString)(s)),-1):l.onlineExpGained/l.onlineRunningTime},nFormat:function(e,n){return t.checkingRam?0:isNaN(e)||isNaN(parseFloat(e))||"string"!=typeof n?"":z.numeralWrapper.format(parseFloat(e),n)},getTimeSinceLastAug:function(){return t.checkingRam?se("getTimeSinceLastAug",g.CONSTANTS.ScriptGetHackTimeRamCost):(n("getTimeSinceLastAug",g.CONSTANTS.ScriptGetHackTimeRamCost),M.a.playtimeSinceLastAug)},prompt:function(e){if(t.checkingRam)return 0;Object(te.isString)(e)||(e=String(e));const n=`prompt-popup-${e.slice(0,20)}`,a=Object(ne.createElement)("p",{innerHTML:e});return new Promise(function(e,t){const i=Object(ne.createElement)("button",{class:"popup-box-button",innerText:"Yes",clickListener:()=>{Object(ie.removeElementById)(n),e(!0)}}),r=Object(ne.createElement)("button",{class:"popup-box-button",innerText:"No",clickListener:()=>{Object(ie.removeElementById)(n),e(!1)}});Object(ae.createPopup)(n,[a,i,r])})},wget:async function(n,a,i=t.serverIp){if(t.checkingRam)return 0;if(!Object(x.isScriptFilename)(a)&&!a.endsWith(".txt"))return workerSript.log(`ERROR: wget() failed because of an invalid target file: ${a}. Target file must be a script or text file`),Promise.resolve(!1);var r=ue(i,"wget");return new Promise(function(o,s){e.get(n,function(e){let n;return(n=Object(x.isScriptFilename)(a)?r.writeToScriptFile(a,e):r.writeToTextFile(a,e)).success?n.overwritten?(t.log(`wget() successfully retrieved content and overwrote ${a} on ${i}`),o(!0)):(t.log(`wget successfully retrieved content to new file ${a} on ${i}`),o(!0)):(t.log("ERROR: wget() failed"),o(!1))},"text").fail(function(e){return t.log(`ERROR: wget() failed: ${JSON.stringify(e)}`),o(!1)})})},getFavorToDonate:function(){return t.checkingRam?se("getFavorToDonate",g.CONSTANTS.ScriptGetFavorToDonate):(n("getFavorToDonate",g.CONSTANTS.ScriptGetFavorToDonate),Math.floor(g.CONSTANTS.BaseFavorToDonate*l.BitNodeMultipliers.RepToDonateToFaction))},universityCourse:function(e,a){var i=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==M.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("universityCourse",i);if(n("universityCourse",i),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!S.c){if(M.a.isWorking){var r=M.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.universityCourse&&t.scriptRef.log(r)}var o,s,l;switch(e.toLowerCase()){case T.Locations.AevumSummitUniversity.toLowerCase():if(M.a.city!=T.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"),!1;M.a.location=T.Locations.AevumSummitUniversity,o=4,s=3;break;case T.Locations.Sector12RothmanUniversity.toLowerCase():if(M.a.city!=T.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"),!1;M.a.location=T.Locations.Sector12RothmanUniversity,o=3,s=2;break;case T.Locations.VolhavenZBInstituteOfTechnology.toLowerCase():if(M.a.city!=T.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"),!1;M.a.location=T.Locations.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.scriptRef.log("Invalid university name: "+e+". universityCourse() failed"),!1}switch(a.toLowerCase()){case"Study Computer Science".toLowerCase():l=g.CONSTANTS.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():l=g.CONSTANTS.ClassDataStructures;break;case"Networks".toLowerCase():l=g.CONSTANTS.ClassNetworks;break;case"Algorithms".toLowerCase():l=g.CONSTANTS.ClassAlgorithms;break;case"Management".toLowerCase():l=g.CONSTANTS.ClassManagement;break;case"Leadership".toLowerCase():l=g.CONSTANTS.ClassLeadership;break;default:return t.scriptRef.log("Invalid class name: "+a+". universityCourse() failed"),!1}return M.a.startClass(o,s,l),null==t.disableLogs.ALL&&null==t.disableLogs.universityCourse&&t.scriptRef.log("Started "+l+" at "+e),!0}t.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.")},gymWorkout:function(e,a){var i=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==M.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("gymWorkout",i);if(n("gymWorkout",i),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!S.c){if(M.a.isWorking){var r=M.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log(r)}var o,s;switch(e.toLowerCase()){case T.Locations.AevumCrushFitnessGym.toLowerCase():if(M.a.city!=T.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"),!1;M.a.location=T.Locations.AevumCrushFitnessGym,o=3,s=2;break;case T.Locations.AevumSnapFitnessGym.toLowerCase():if(M.a.city!=T.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"),!1;M.a.location=T.Locations.AevumSnapFitnessGym,o=10,s=5;break;case T.Locations.Sector12IronGym.toLowerCase():if(M.a.city!=T.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"),!1;M.a.location=T.Locations.Sector12IronGym,o=1,s=1;break;case T.Locations.Sector12PowerhouseGym.toLowerCase():if(M.a.city!=T.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"),!1;M.a.location=T.Locations.Sector12PowerhouseGym,o=20,s=10;break;case T.Locations.VolhavenMilleniumFitnessGym.toLowerCase():if(M.a.city!=T.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"),!1;M.a.location=T.Locations.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.scriptRef.log("Invalid gym name: "+e+". gymWorkout() failed"),!1}switch(a.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():M.a.startClass(o,s,g.CONSTANTS.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():M.a.startClass(o,s,g.CONSTANTS.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():M.a.startClass(o,s,g.CONSTANTS.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():M.a.startClass(o,s,g.CONSTANTS.ClassGymAgility);break;default:return t.scriptRef.log("Invalid stat: "+a+". gymWorkout() failed"),!1}return null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log("Started training "+a+" at "+e),!0}t.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.")},travelToCity(e){var a=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("travelToCity",a);if(n("travelToCity",a),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");switch(e){case T.Locations.Aevum:case T.Locations.Chongqing:case T.Locations.Sector12:case T.Locations.NewTokyo:case T.Locations.Ishima:case T.Locations.Volhaven:if(M.a.money.lt(g.CONSTANTS.TravelCost))throw t.scriptRef.log("ERROR: not enough money to travel with travelToCity()."),Object(K.d)(t,"ERROR: not enough money to travel with travelToCity().");return M.a.loseMoney(g.CONSTANTS.TravelCost),M.a.city=e,null==t.disableLogs.ALL&&null==t.disableLogs.travelToCity&&t.scriptRef.log("Traveled to "+e),!0;default:return t.scriptRef.log("ERROR: Invalid city name passed into travelToCity()."),!1}},purchaseTor(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("purchaseTor",e);if(n("purchaseTor",e),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null!=D.SpecialServerIps["Darkweb Server"])return t.scriptRef.log("You already have a TOR router! purchaseTor() failed"),!1;if(M.a.money.lt(g.CONSTANTS.TorRouterCost))return t.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"),!1;M.a.loseMoney(g.CONSTANTS.TorRouterCost);var a=new N.Server({ip:Object(Z.createRandomIp)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(R.AddToAllServers)(a),D.SpecialServerIps.addIp("Darkweb Server",a.ip);const i=document.getElementById("location-purchase-tor");return i.setAttribute("class","a-link-button-bought"),i.innerHTML="TOR Router - Purchased",M.a.getHomeComputer().serversOnNetwork.push(a.ip),a.serversOnNetwork.push(M.a.getHomeComputer().ip),M.a.gainIntelligenceExp(g.CONSTANTS.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseTor&&t.scriptRef.log("You have purchased a Tor router!"),!0},purchaseProgram(e){var a=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("purchaseProgram",a);if(n("purchaseProgram",a),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null==D.SpecialServerIps["Darkweb Server"])return t.scriptRef.log("ERROR: You do not have the TOR router. purchaseProgram() failed."),!1;e=e.toLowerCase();let i=null;for(const t in _.DarkWebItems){const n=_.DarkWebItems[t];n.program.toLowerCase()==e&&(i=n)}return null==i?(t.scriptRef.log("ERROR: Invalid program name passed into purchaseProgram()."),!1):M.a.money.lt(i.price)?(t.scriptRef.log("Not enough money to purchase "+i.program),!1):M.a.hasProgram(i.program)?(t.scriptRef.log("You already have the "+i.program+" program"),!0):(M.a.loseMoney(i.price),M.a.getHomeComputer().programs.push(i.program),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseProgram&&t.scriptRef.log("You have purchased the "+i.program+" program. The new program can be found on your home computer."),!0)},getStats:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getStats",e);if(n("getStats",e),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{hacking:M.a.hacking_skill,strength:M.a.strength,defense:M.a.defense,dexterity:M.a.dexterity,agility:M.a.agility,charisma:M.a.charisma,intelligence:M.a.intelligence}},getCharacterInformation:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getCharacterInformation",e);if(n("getCharacterInformation",e),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{bitnode:M.a.bitNodeN,city:M.a.city,factions:M.a.factions.slice(),hp:M.a.hp,jobs:Object.keys(M.a.jobs),jobTitles:Object.values(M.a.jobs),maxHp:M.a.max_hp,mult:{agility:M.a.agility_mult,agilityExp:M.a.agility_exp_mult,companyRep:M.a.company_rep_mult,crimeMoney:M.a.crime_money_mult,crimeSuccess:M.a.crime_success_mult,defense:M.a.defense_mult,defenseExp:M.a.defense_exp_mult,dexterity:M.a.dexterity_mult,dexterityExp:M.a.dexterity_exp_mult,factionRep:M.a.faction_rep_mult,hacking:M.a.hacking_mult,hackingExp:M.a.hacking_exp_mult,strength:M.a.strength_mult,strengthExp:M.a.strength_exp_mult,workMoney:M.a.work_money_mult},timeWorked:M.a.timeWorked,tor:D.SpecialServerIps.hasOwnProperty("Darkweb Server"),workHackExpGain:M.a.workHackExpGained,workStrExpGain:M.a.workStrExpGained,workDefExpGain:M.a.workDefExpGained,workDexExpGain:M.a.workDexExpGained,workAgiExpGain:M.a.workAgiExpGained,workChaExpGain:M.a.workChaExpGained,workRepGain:M.a.workRepGained,workMoneyGain:M.a.workMoneyGained}},isBusy:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("isBusy",e);if(n("isBusy",e),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return M.a.isWorking},stopAction:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/2;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("stopAction",e);if(n("stopAction",e),4!=M.a.bitNodeN&&!(le&&de>=1))throw Object(K.d)(t,"Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(M.a.isWorking){var a=M.a.singularityStopWork();return null==t.disableLogs.ALL&&null==t.disableLogs.stopAction&&t.scriptRef.log(a),!0}return!1},upgradeHomeRam:function(){var e=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("upgradeHomeRam",e);if(n("upgradeHomeRam",e),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");const a=M.a.getHomeComputer();if(a.maxRam>=g.CONSTANTS.HomeComputerMaxRam)return t.log("ERROR: upgradeHomeRam() failed because your home computer is at max RAM"),!1;const i=M.a.getUpgradeHomeRamCost();return M.a.money.lt(i)?(t.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"),!1):(a.maxRam*=2,M.a.loseMoney(i),M.a.gainIntelligenceExp(g.CONSTANTS.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.upgradeHomeRam&&t.scriptRef.log("Purchased additional RAM for home computer! It now has "+a.maxRam+"GB of RAM."),!0)},getUpgradeHomeRamCost:function(){var e=g.CONSTANTS.ScriptSingularityFn2RamCost/2;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getUpgradeHomeRamCost",e);if(n("getUpgradeHomeRamCost",e),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return M.a.getUpgradeHomeRamCost()},workForCompany:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("workForCompany",a);if(n("workForCompany",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(null==e&&(e=M.a.companyName),null==e||""===e||!(m.Companies[e]instanceof p.Company))return t.scriptRef.log(`ERROR: workForCompany() failed because of an invalid company specified: ${e}`),!1;if(!Object.keys(M.a.jobs).includes(e))return t.scriptRef.log(`ERROR: workForCompany() failed because you do not have a job at ${e}`),!1;if(S.c)return t.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission."),!1;const i=M.a.jobs[e],r=d.CompanyPositions[i];if(""===i||!(r instanceof h.CompanyPosition))return t.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"),!1;if(M.a.isWorking){var o=M.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.scriptRef.log(o)}return r.isPartTimeJob()?M.a.startWorkPartTime(e):M.a.startWork(e),null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.log(`Began working at ${M.a.companyName} as a ${i}`),!0},applyToCompany:function(e,a){var i,r=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(r*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("applyToCompany",r);if(n("applyToCompany",r),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(m.companyExists)(e))return t.scriptRef.log("ERROR: applyToCompany() failed because specified company "+e+" does not exist."),!1;switch(M.a.location=e,a.toLowerCase()){case"software":i=M.a.applyForSoftwareJob(!0);break;case"software consultant":i=M.a.applyForSoftwareConsultantJob(!0);break;case"it":i=M.a.applyForItJob(!0);break;case"security engineer":i=M.a.applyForSecurityEngineerJob(!0);break;case"network engineer":i=M.a.applyForNetworkEngineerJob(!0);break;case"business":i=M.a.applyForBusinessJob(!0);break;case"business consultant":i=M.a.applyForBusinessConsultantJob(!0);break;case"security":i=M.a.applyForSecurityJob(!0);break;case"agent":i=M.a.applyForAgentJob(!0);break;case"employee":i=M.a.applyForEmployeeJob(!0);break;case"part-time employee":i=M.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":i=M.a.applyForWaiterJob(!0);break;case"part-time waiter":i=M.a.applyForPartTimeWaiterJob(!0);break;default:return t.scriptRef.log("ERROR: Invalid job passed into applyToCompany: "+a+". applyToCompany() failed"),!1}return Object(te.isString)(i)?(t.scriptRef.log(i),!1):(i?null==t.disableLogs.ALL&&null==t.disableLogs.applyToCompany&&t.log(`You were offered a new job at ${e} as a ${M.a.jobs[e]}`):null==t.disableLogs.ALL&&null==t.disableLogs.applyToCompany&&t.log(`You failed to get a new job/promotion at ${e} in the ${a} field.`),i)},getCompanyRep:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost/2;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getCompanyRep",a);if(n("getCompanyRep",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var i=m.Companies[e];return null!=i&&i instanceof p.Company?i.playerReputation:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyRep(): "+e),-1)},getCompanyFavor:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getCompanyFavor",a);if(n("getCompanyFavor",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var i=m.Companies[e];return null!=i&&i instanceof p.Company?i.favor:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavor(): "+e),-1)},getCompanyFavorGain:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getCompanyFavorGain",a);if(n("getCompanyFavorGain",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run getCompanyFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var i=m.Companies[e];return null!=i&&i instanceof p.Company?i.getFavorGain()[0]:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavorGain(): "+e),-1)},checkFactionInvitations:function(){var e=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("checkFactionInvitations",e);if(n("checkFactionInvitations",e),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return M.a.factionInvitations.slice()},joinFaction:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("joinFaction",a);if(n("joinFaction",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(v.factionExists)(e))return t.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."),!1;if(!M.a.factionInvitations.includes(e))return t.scriptRef.log("ERROR: Cannot join "+e+" Faction because you have not been invited. joinFaction() failed"),!1;var i=v.Factions[e];Object(E.c)(i);for(var r=0;r<M.a.factionInvitations.length;++r)(M.a.factionInvitations[r]==e||v.Factions[M.a.factionInvitations[r]].isBanned)&&(M.a.factionInvitations.splice(r,1),r--);return M.a.gainIntelligenceExp(g.CONSTANTS.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.joinFaction&&t.scriptRef.log("Joined the "+e+" faction."),!0},workForFaction:function(e,a){var i=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("workForFaction",i);if(n("workForFaction",i),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(M.a.inGang()&&void 0!==y.a[e])t.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");else{if(!S.c){if(!Object(v.factionExists)(e))return t.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."),!1;if(!M.a.factions.includes(e))return t.scriptRef.log("ERROR: workForFaction() failed because you are not a member of "+e),!1;if(M.a.isWorking){var r=M.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForFaction&&t.scriptRef.log(r)}var o=v.Factions[e];switch(a.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","BitRunners","The Black Hand","NiteSec","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Netburners","Tian Di Hui","CyberSec"].includes(o.name)?(M.a.startFactionHackWork(o),t.scriptRef.log("Started carrying out hacking contracts for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot carry out hacking contracts for "+o.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(o.name)?(M.a.startFactionFieldWork(o),t.scriptRef.log("Started carrying out field missions for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot carry out field missions for "+o.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(o.name)?(M.a.startFactionSecurityWork(o),t.scriptRef.log("Started serving as security details for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot serve as security detail for "+o.name+". workForFaction() failed"),!1);default:t.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): "+a)}return!0}t.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.")}},getFactionRep:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getFactionRep",a);if(n("getFactionRep",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(v.factionExists)(e)?v.Factions[e].playerReputation:(t.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."),-1)},getFactionFavor:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getFactionFavor",a);if(n("getFactionFavor",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(v.factionExists)(e)?v.Factions[e].favor:(t.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist."),-1)},getFactionFavorGain:function(e){var a=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getFactionFavorGain",a);if(n("getFactionFavorGain",a),4!=M.a.bitNodeN&&!(le&&de>=2))throw Object(K.d)(t,"Cannot run getFactionFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(v.factionExists)(e)?v.Factions[e].getFavorGain()[0]:(t.scriptRef.log("ERROR: Faction specified in getFactionFavorGain() does not exist."),-1)},donateToFaction:function(e,a){var i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("donateToFaction",i);if(n("donateToFaction",i),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run donateToFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(v.factionExists)(e))return t.log(`ERROR: Faction specified in donateToFaction() does not exist: ${e}`),!1;if("number"!=typeof a||a<=0)return t.log(`ERROR: Invalid donation amount specified in donateToFaction(): ${a}. Must be numeric and positive`),!1;if(M.a.money.lt(a))return t.log(`ERROR: You do not have enough money to donate $${a} to ${e}`),!1;var r=Math.round(g.CONSTANTS.BaseFavorToDonate*l.BitNodeMultipliers.RepToDonateToFaction);if(v.Factions[e].favor<r)return t.log(`ERROR: You do not have enough favor to donate to this faction. Have ${v.Factions[e].favor}, need ${r}`),!1;var o=a/g.CONSTANTS.DonateMoneyToRepDivisor*M.a.faction_rep_mult;return v.Factions[e].playerReputation+=o,M.a.loseMoney(a),t.shouldLog("donateToFaction")&&t.log(`$${a} donated to ${e} for ${o} reputation`),!0},createProgram:function(e){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("createProgram",a);if(n("createProgram",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(S.c)return void t.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");if(M.a.isWorking){var i=M.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.createProgram&&t.scriptRef.log(i)}e=e.toLowerCase();let r=null;for(const t in P.Programs)P.Programs[t].name.toLowerCase()==e&&(r=P.Programs[t]);return null==r?(t.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: "+e),!1):M.a.hasProgram(r.name)?(t.scriptRef.log("ERROR: createProgram() failed because you already have the "+r.name+" program"),!1):r.create.req(M.a)?(M.a.startCreateProgramWork(r.name,r.create.time,r.create.level),null==t.disableLogs.ALL&&null==t.disableLogs.createProgram&&t.scriptRef.log("Began creating program: "+e),!0):(t.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create "+r.name+" (level "+r.create.level+" req)"),!1)},commitCrime:function(e){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("commitCrime",a);if(n("commitCrime",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(S.c)return void t.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");if(M.a.isWorking){var i=M.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log(i)}switch(M.a.city){case T.Locations.Aevum:M.a.location=T.Locations.AevumSlums;break;case T.Locations.Chongqing:M.a.location=T.Locations.ChongqingSlums;break;case T.Locations.Sector12:M.a.location=T.Locations.Sector12Slums;break;case T.Locations.NewTokyo:M.a.location=T.Locations.NewTokyoSlums;break;case T.Locations.Ishima:M.a.location=T.Locations.IshimaSlums;break;case T.Locations.Volhaven:M.a.location=T.Locations.VolhavenSlums;break;default:console.log("Invalid Player.city value")}const r=Object(c.findCrime)(e.toLowerCase());if(null==r)throw Object(K.d)(t,"Invalid crime passed into commitCrime(): "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log("Attempting to commit crime: "+r.name+"..."),r.commit(M.a,1,{workerscript:t})},getCrimeChance:function(e){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getCrimeChance",a);if(n("getCrimeChance",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");const i=Object(c.findCrime)(e.toLowerCase());if(null==i)throw Object(K.d)(t,"Invalid crime passed into getCrimeChance(): "+i);return i.successRate(M.a)},getOwnedAugmentations:function(e=!1){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getOwnedAugmentations",a);if(n("getOwnedAugmentations",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");for(var i=[],r=0;r<M.a.augmentations.length;++r)i.push(M.a.augmentations[r].name);if(e)for(r=0;r<M.a.queuedAugmentations.length;++r)i.push(M.a.queuedAugmentations[r].name);return i},getOwnedSourceFiles:function(){let e=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getOwnedSourceFiles",e);if(n("getOwnedSourceFiles",e),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run getOwnedSourceFiles(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");let a=[];for(let e=0;e<M.a.sourceFiles.length;++e)a.push({n:M.a.sourceFiles[e].n,lvl:M.a.sourceFiles[e].lvl});return a},getAugmentationsFromFaction:function(e){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getAugmentationsFromFaction",a);if(n("getAugmentationsFromFaction",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(v.factionExists)(e))return t.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): "+e),[];for(var i=v.Factions[e],r=[],o=0;o<i.augmentations.length;++o)r.push(i.augmentations[o]);return r},getAugmentationPrereq:function(e){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getAugmentationPrereq",a);if(n("getAugmentationPrereq",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run getAugmentationPrereq(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return Object(o.b)(e)?r.Augmentations[e].prereqs.slice():(t.scriptRef.log("ERROR: getAugmentationPrereq() failed. Invalid Augmentation name passed in (note: this is case-sensitive): "+e),[])},getAugmentationCost:function(e){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("getAugmentationCost",a);if(n("getAugmentationCost",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(o.b)(e))return t.scriptRef.log("ERROR: getAugmentationCost() failed. Invalid Augmentation name passed in (note: this is case-sensitive): "+e),[-1,-1];var i=r.Augmentations[e];return[i.baseRepRequirement,i.baseCost]},purchaseAugmentation:function(e,a){var o=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(o*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("purchaseAugmentation",o);if(n("purchaseAugmentation",o),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");var l=v.Factions[e];if(null==l||!(l instanceof b.Faction))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: "+e),!1;if(!l.augmentations.includes(a))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because the faction "+e+" does not contain the "+a+" augmentation"),!1;var c=r.Augmentations[a];if(null==c||!(c instanceof i.Augmentation))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid augmentation name: "+a),!1;var u=!1;if(c.name===s.AugmentationNames.NeuroFluxGovernor&&(u=!0),!u){for(var p=0;p<M.a.queuedAugmentations.length;++p)if(M.a.queuedAugmentations[p].name===c.name)return t.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have "+a),!1;for(p=0;p<M.a.augmentations.length;++p)if(M.a.augmentations[p].name===c.name)return t.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have "+a),!1}if(l.playerReputation<c.baseRepRequirement)return t.scriptRef.log("ERROR: purchaseAugmentation() failed because you do not have enough reputation with "+l.name),!1;var m=Object(E.e)(c,l,!0);return t.scriptRef.log(m),!(!Object(te.isString)(m)||!m.startsWith("You purchased"))&&(M.a.gainIntelligenceExp(g.CONSTANTS.IntelligenceSingFnBaseExpGain),!0)},installAugmentations:function(e){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==M.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return se("installAugmentations",a);if(n("installAugmentations",a),4!=M.a.bitNodeN&&!(le&&de>=3))throw Object(K.d)(t,"Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return 0===M.a.queuedAugmentations.length?(t.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"),!1):(M.a.gainIntelligenceExp(g.CONSTANTS.IntelligenceSingFnBaseExpGain),t.scriptRef.log("Installing Augmentations. This will cause this script to be killed"),Object(o.e)(e),!0)},gang:{getMemberNames:function(){if(t.checkingRam)return se("getMemberNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getMemberNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4),H.a(t,"getMemberNames");try{const e=[];for(const t of M.a.gang.members)e.push(t.name);return e}catch(e){throw Object(K.d)(t,H.b("getMemberNames",e))}},getGangInformation:function(){if(t.checkingRam)return se("getGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"getGangInformation");try{return{faction:M.a.gang.facName,isHacking:M.a.gang.isHackingGang,moneyGainRate:M.a.gang.moneyGainRate,power:M.a.gang.getPower(),respect:M.a.gang.respect,respectGainRate:M.a.gang.respectGainRate,territory:M.a.gang.getTerritory(),territoryClashChance:M.a.gang.territoryClashChance,territoryWarfareEngaged:M.a.gang.territoryWarfareEngaged,wantedLevel:M.a.gang.wanted,wantedLevelGainRate:M.a.gang.wantedGainRate}}catch(e){throw Object(K.d)(t,H.b("getGangInformation",e))}},getOtherGangInformation:function(){if(t.checkingRam)return se("getOtherGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getOtherGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"getOtherGangInformation");try{return Object.assign(y.a)}catch(e){throw Object(K.d)(t,H.b("getOtherGangInformation",e))}},getMemberInformation:function(e){if(t.checkingRam)return se("getMemberInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getMemberInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"getMemberInformation");try{for(const t of M.a.gang.members)if(t.name===e)return{agility:t.agi,agilityEquipMult:t.agi_mult,agilityAscensionMult:t.agi_asc_mult,augmentations:t.augmentations.slice(),charisma:t.cha,charismaEquipMult:t.cha_mult,charismaAscensionMult:t.cha_asc_mult,defense:t.def,defenseEquipMult:t.def_mult,defenseAscensionMult:t.def_asc_mult,dexterity:t.dex,dexterityEquipMult:t.dex_mult,dexterityAscensionMult:t.dex_asc_mult,equipment:t.upgrades.slice(),hacking:t.hack,hackingEquipMult:t.hack_mult,hackingAscensionMult:t.hack_asc_mult,strength:t.str,strengthEquipMult:t.str_mult,strengthAscensionMult:t.str_asc_mult,task:t.task};return t.log(`Invalid argument passed to gang.getMemberInformation(). No gang member could be found with name ${e}`),{}}catch(e){throw Object(K.d)(t,H.b("getMemberInformation",e))}},canRecruitMember:function(){if(t.checkingRam)return se("canRecruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("canRecruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/4),H.a(t,"canRecruitMember");try{return M.a.gang.canRecruitMember()}catch(e){throw Object(K.d)(t,H.b("canRecruitMember",e))}},recruitMember:function(e){if(t.checkingRam)return se("recruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("recruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"recruitMember");try{const n=M.a.gang.recruitMember(e);return t.shouldLog("recruitMember")&&(n?t.log(`Successfully recruited Gang Member ${e}`):t.log(`Failed to recruit Gang Member ${e}`)),n}catch(e){throw Object(K.d)(t,H.b("recruitMember",e))}},getTaskNames:function(){if(t.checkingRam)return se("getTaskNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getTaskNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4),H.a(t,"getTaskNames");try{const e=M.a.gang.getAllTaskNames();return e.unshift("Unassigned"),e}catch(e){throw Object(K.d)(t,H.b("getTaskNames",e))}},setMemberTask:function(e,a){if(t.checkingRam)return se("setMemberTask",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("setMemberTask",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"setMemberTask");try{for(const n of M.a.gang.members)if(n.name===e){const i=n.assignToTask(a);return t.shouldLog("setMemberTask")&&(i?t.log(`Successfully assigned Gang Member ${e} to ${a} task`):t.log(`Failed to assign Gang Member ${e} to ${a} task. ${e} is now Unassigned`)),i}return t.log(`Invalid argument passed to gang.setMemberTask(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(K.d)(t,H.b("setMemberTask",e))}},getEquipmentNames:function(){if(t.checkingRam)return se("getEquipmentNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getEquipmentNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4),H.a(t,"getEquipmentNames");try{return M.a.gang.getAllUpgradeNames()}catch(e){throw Object(K.d)(t,H.b("getEquipmentNames",e))}},getEquipmentCost:function(e){if(t.checkingRam)return se("getEquipmentCost",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getEquipmentCost",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"getEquipmentCost");try{return M.a.gang.getUpgradeCost(e)}catch(e){throw Object(K.d)(t,H.b("getEquipmentCost",e))}},getEquipmentType:function(e){if(t.checkingRam)return se("getEquipmentType",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getEquipmentType",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"getEquipmentType");try{return M.a.gang.getUpgradeType(e)}catch(e){throw Object(K.d)(t,H.b("getEquipmentType",e))}},purchaseEquipment:function(e,a){if(t.checkingRam)return se("purchaseEquipment",g.CONSTANTS.ScriptGangApiBaseRamCost);n("purchaseEquipment",g.CONSTANTS.ScriptGangApiBaseRamCost),H.a(t,"purchaseEquipment");try{for(const n of M.a.gang.members)if(n.name===e){const i=n.buyUpgrade(a,M.a,M.a.gang);return t.shouldLog("purchaseEquipment")&&(i?t.log(`Purchased ${a} for Gang member ${e}`):t.log(`Failed to purchase ${a} for Gang member ${e}`)),i}return t.log(`Invalid argument passed to gang.purchaseEquipment(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(K.d)(t,H.b("purchaseEquipment",e))}},ascendMember:function(e){if(t.checkingRam)return se("ascendMember",g.CONSTANTS.ScriptGangApiBaseRamCost);n("ascendMember",g.CONSTANTS.ScriptGangApiBaseRamCost),H.a(t,"ascendMember");try{for(const n of M.a.gang.members)if(n.name===e)return M.a.gang.ascendMember(n,t);return t.log(`Invalid argument passed to gang.ascendMember(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(K.d)(t,H.b("ascendMember",e))}},setTerritoryWarfare:function(e){if(t.checkingRam)return se("setTerritoryWarfare",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("setTerritoryWarfare",g.CONSTANTS.ScriptGangApiBaseRamCost/2),H.a(t,"setTerritoryWarfare");try{e?(M.a.gang.territoryWarfareEngaged=!0,t.shouldLog("setTerritoryWarfare")&&t.log("Engaging in Gang Territory Warfare")):(M.a.gang.territoryWarfareEngaged=!1,t.shouldLog("setTerritoryWarfare")&&t.log("Disengaging in Gang Territory Warfare"))}catch(e){throw Object(K.d)(t,H.b("setTerritoryWarfare",e))}},getChanceToWinClash:function(e){if(t.checkingRam)return se("getChanceToWinClash",g.CONSTANTS.ScriptGangApiBaseRamCost);n("getChanceToWinClash",g.CONSTANTS.ScriptGangApiBaseRamCost),H.a(t,"getChanceToWinClash");try{if(null==y.a[e])return t.log(`Invalid gang specified in gang.getChanceToWinClash() : ${e}`),0;const n=y.a[M.a.gang.facName].power;return n/(y.a[e].power+n)}catch(e){throw Object(K.d)(t,H.b("getChanceToWinClash",e))}},getBonusTime:function(){if(t.checkingRam)return 0;H.a(t,"getBonusTime");try{return Math.round(M.a.gang.storedCycles/5)}catch(e){throw Object(K.d)(t,H.b("getBonusTime",e))}}},bladeburner:{getContractNames:function(){if(t.checkingRam)return se("getContractNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getContractNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.getContractNamesNetscriptFn();throw Object(K.d)(t,"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(t.checkingRam)return se("getOperationNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getOperationNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.getOperationNamesNetscriptFn();throw Object(K.d)(t,"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(t.checkingRam)return se("getBlackOpNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getBlackOpNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.getBlackOpNamesNetscriptFn();throw Object(K.d)(t,"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")},getBlackOpRank:function(e=""){if(t.checkingRam)return se("getBlackOpRank",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2);if(n("getBlackOpRank",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe)){const t=M.a.bladeburner.getActionIdFromTypeAndName("blackops",e);if(!t)return-1;const n=M.a.bladeburner.getActionObject(t);return n?n.reqdRank:-1}throw Object(K.d)(t,"getBlackOpRank() 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(t.checkingRam)return se("getGeneralActionNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getGeneralActionNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.getGeneralActionNamesNetscriptFn();throw Object(K.d)(t,"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(t.checkingRam)return se("getSkillNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getSkillNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.getSkillNamesNetscriptFn();throw Object(K.d)(t,"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(e="",a=""){if(t.checkingRam)return se("startAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("startAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.startActionNetscriptFn(e,a,t)}catch(e){throw Object(K.d)(t,"Bladeburner.startAction() failed with exception: "+e)}throw Object(K.d)(t,"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(t.checkingRam)return se("stopBladeburnerAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2);if(n("stopBladeburnerAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.resetAction();throw Object(K.d)(t,"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(t.checkingRam)return se("getCurrentAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/4);if(n("getCurrentAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/4),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.getTypeAndNameFromActionId(M.a.bladeburner.action);throw Object(K.d)(t,"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(e="",a=""){if(t.checkingRam)return se("getActionTime",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionTime",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getActionTimeNetscriptFn(e,a,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getActionTime() failed with exception: "+e)}throw Object(K.d)(t,"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(e="",a=""){if(t.checkingRam)return se("getActionEstimatedSuccessChance",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionEstimatedSuccessChance",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(e,a,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getActionEstimatedSuccessChance() failed with exception: "+e)}throw Object(K.d)(t,"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")},getActionRepGain:function(e="",a="",i){if(t.checkingRam)return se("getActionRepGain",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionRepGain",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(U.a)(t,"getActionRepGain");try{var r=Object(U.b)("getActionAutolevel",e,a);const n=M.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(r),-1;const s=M.a.bladeburner.getActionObject(n);return null==s?(t.log(r),-1):(o=null==i||isNaN(i)?Math.pow(s.rewardFac,s.level-1):Math.pow(s.rewardFac,i-1),s.rankGain*o*l.BitNodeMultipliers.BladeburnerRank);var o}catch(e){throw Object(K.d)(t,Object(U.c)("getActionAutolevel",e))}},getActionCountRemaining:function(e="",a=""){if(t.checkingRam)return se("getActionCountRemaining",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionCountRemaining",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getActionCountRemainingNetscriptFn(e,a,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getActionCountRemaining() failed with exception: "+e)}throw Object(K.d)(t,"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(e="",a=""){if(t.checkingRam)return se("getActionMaxLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionMaxLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(U.a)(t,"getActionMaxLevel");try{var i=Object(U.b)("getActionMaxLevel",e,a);const n=M.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(i),-1;const r=M.a.bladeburner.getActionObject(n);return null==r?(t.log(i),-1):r.maxLevel}catch(e){throw Object(K.d)(t,Object(U.c)("getActionMaxLevel",e))}},getActionCurrentLevel:function(e="",a=""){if(t.checkingRam)return se("getActionCurrentLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionCurrentLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(U.a)(t,"getActionCurrentLevel");try{var i=Object(U.b)("getActionCurrentLevel",e,a);const n=M.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(i),-1;const r=M.a.bladeburner.getActionObject(n);return null==r?(t.log(i),-1):r.level}catch(e){throw Object(K.d)(t,Object(U.c)("getActionCurrentLevel",e))}},getActionAutolevel:function(e="",a=""){if(t.checkingRam)return se("getActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(U.a)(t,"getActionAutolevel");try{var i=Object(U.b)("getActionAutolevel",e,a);const n=M.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(i),!1;const r=M.a.bladeburner.getActionObject(n);return null==r?(t.log(i),!1):r.autoLevel}catch(e){throw Object(K.d)(t,Object(U.c)("getActionAutolevel",e))}},setActionAutolevel:function(e="",a="",i=!0){if(t.checkingRam)return se("setActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("setActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(U.a)(t,"setActionAutolevel");try{var r=Object(U.b)("setActionAutolevel",e,a);const n=M.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return void t.log(r);const o=M.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);o.autoLevel=i}catch(e){throw Object(K.d)(t,Object(U.c)("setActionAutolevel",e))}},setActionLevel:function(e="",a="",i=1){if(t.checkingRam)return se("setActionLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("setActionLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(U.a)(t,"setActionLevel");try{var r=Object(U.b)("setActionLevel",e,a);const n=M.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return void t.log(r);const o=M.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);if(i>o.maxLevel)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level exceeds max level for given action.`);if(i<1)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level is below 1.`);o.level=i}catch(e){throw Object(K.d)(t,Object(U.c)("setActionLevel",e))}},getRank:function(){if(t.checkingRam)return se("getRank",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getRank",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.rank;throw Object(K.d)(t,"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(t.checkingRam)return se("getSkillPoints",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillPoints",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.skillPoints;throw Object(K.d)(t,"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(e=""){if(t.checkingRam)return se("getSkillLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getSkillLevel() failed with exception: "+e)}throw Object(K.d)(t,"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")},getSkillUpgradeCost:function(e=""){if(t.checkingRam)return se("getSkillUpgradeCost",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillUpgradeCost",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getSkillUpgradeCost() failed with exception: "+e)}throw Object(K.d)(t,"getSkillUpgradeCost() 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(e){if(t.checkingRam)return se("upgradeSkill",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("upgradeSkill",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw Object(K.d)(t,"Bladeburner.upgradeSkill() failed with exception: "+e)}throw Object(K.d)(t,"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(e="",a=""){if(t.checkingRam)return se("getTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getTeamSizeNetscriptFn(e,a,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getTeamSize() failed with exception: "+e)}throw Object(K.d)(t,"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(e="",a="",i){if(t.checkingRam)return se("setTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("setTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.setTeamSizeNetscriptFn(e,a,i,t)}catch(e){throw Object(K.d)(t,"Bladeburner.setTeamSize() failed with exception: "+e)}throw Object(K.d)(t,"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(e){if(t.checkingRam)return se("getCityEstimatedPopulation",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedPopulation",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getCityEstimatedPopulationNetscriptFn(e,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getCityEstimatedPopulation() failed with exception: "+e)}throw Object(K.d)(t,"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(e){if(t.checkingRam)return se("getCityEstimatedCommunities",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedCommunities",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getCityEstimatedCommunitiesNetscriptFn(e,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getCityEstimatedCommunities() failed with exception: "+e)}throw Object(K.d)(t,"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(e){if(t.checkingRam)return se("getCityChaos",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityChaos",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.getCityChaosNetscriptFn(e,t)}catch(e){throw Object(K.d)(t,"Bladeburner.getCityChaos() failed with exception: "+e)}throw Object(K.d)(t,"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")},getCity:function(){if(t.checkingRam)return se("getCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.city}catch(e){throw Object(K.d)(t,"Bladeburner.getCity() failed with exception: "+e)}throw Object(K.d)(t,"getCity() 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(e){if(t.checkingRam)return se("switchCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("switchCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))try{return M.a.bladeburner.switchCityNetscriptFn(e,t)}catch(e){throw Object(K.d)(t,"Bladeburner.switchCity() failed with exception: "+e)}throw Object(K.d)(t,"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(t.checkingRam)return se("getStamina",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getStamina",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return[M.a.bladeburner.stamina,M.a.bladeburner.maxStamina];throw Object(K.d)(t,"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(t.checkingRam)return se("joinBladeburnerFaction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerFaction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),M.a.bladeburner instanceof u.a&&(7===M.a.bitNodeN||pe))return M.a.bladeburner.joinBladeburnerFactionNetscriptFn(t);throw Object(K.d)(t,"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(t.checkingRam)return se("joinBladeburnerDivision",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerDivision",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),7===M.a.bitNodeN||pe)return M.a.bladeburner instanceof u.a||(M.a.strength>=100&&M.a.defense>=100&&M.a.dexterity>=100&&M.a.agility>=100?(M.a.bladeburner=new u.a({new:!0}),t.log("You have been accepted into the Bladeburner division"),!0):(t.log("You do not meet the requirements for joining the Bladeburner division"),!1));throw Object(K.d)(t,"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")},getBonusTime:function(){if(t.checkingRam)return 0;if(7===M.a.bitNodeN||pe)return Math.round(M.a.bladeburner.storedCycles/5);throw Object(K.d)(t,"getBonusTime() 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")}},codingcontract:{attempt:function(e,a,i=t.serverIp){if(t.checkingRam)return se("attempt",g.CONSTANTS.ScriptCodingContractBaseRamCost);n("attempt",g.CONSTANTS.ScriptCodingContractBaseRamCost);const r=fe(a,i);if(null==r)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${a} on server ${i}`),!1;if(Object(X.is2DArray)(e)){let t=[];for(let n=0;n<e.length;++n)t.push(["[",e[n].toString(),"]"].join(""));e=t.join(",")}else e=String(e);const o=ue(i,"codingcontract.attempt()");if(r.isSolution(e)){const e=M.a.gainCodingContractReward(r.reward,r.getDifficulty());return t.log(`Successfully completed Coding Contract ${a}. Reward: ${e}`),o.removeContract(a),!0}return++r.tries,r.tries>=r.getMaxNumTries()?(t.log(`Coding Contract ${a} failed. Contract is now self-destructing`),o.removeContract(a)):t.log(`Coding Contract ${a} failed. ${r.getMaxNumTries()-r.tries} attempts remaining`),!1},getContractType:function(e,a=t.serverIp){if(t.checkingRam)return se("getContractType",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getContractType",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);let i=fe(e,a);return null==i?(t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${a}`),null):i.getType()},getData:function(e,a=t.serverIp){if(t.checkingRam)return se("getData",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getData",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);let i=fe(e,a);if(null==i)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${a}`),null;let r=i.getData();if(r.constructor===Array){const e=r.slice();for(let t=0;t<e.length;++t)r[t].constructor===Array&&(e[t]=r[t].slice());return e}return r},getDescription:function(e,a=t.serverIp){if(t.checkingRam)return se("getDescription",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getDescription",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);var i=fe(e,a);return null==i?(t.log(`ERROR: codingcontract.getDescription() failed because it could find the specified contract ${e} on server ${a}`),""):i.getDescription()},getNumTriesRemaining:function(e,a=t.serverIp){if(t.checkingRam)return se("getNumTriesRemaining",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getNumTriesRemaining",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);var i=fe(e,a);return null==i?(t.log(`ERROR: codingcontract.getNumTriesRemaining() failed because it could find the specified contract ${e} on server ${a}`),-1):i.getMaxNumTries()-i.tries}},sleeve:{getNumSleeves:function(){if(t.checkingRam)return se("getNumSleeves",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"getNumSleeves() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");return n("getNumSleeves",g.CONSTANTS.ScriptSleeveBaseRamCost),M.a.sleeves.length},setToShockRecovery:function(e=0){if(t.checkingRam)return se("setToShockRecovery",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"setToShockRecovery() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");return n("setToShockRecovery",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0?(t.log(`ERROR: sleeve.setToShockRecovery(${e}) failed because it is an invalid sleeve number.`),!1):M.a.sleeves[e].shockRecovery(M.a)},setToSynchronize:function(e=0){if(t.checkingRam)return se("setToSynchronize",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"setToSynchronize() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");return n("setToSynchronize",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0?(t.log(`ERROR: sleeve.setToSynchronize(${e}) failed because it is an invalid sleeve number.`),!1):M.a.sleeves[e].synchronize(M.a)},setToCommitCrime:function(e=0,a=""){if(t.checkingRam)return se("setToCommitCrime",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"setToCommitCrime() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");return n("setToCommitCrime",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0?(t.log(`ERROR: sleeve.setToCommitCrime(${e}) failed because it is an invalid sleeve number.`),!1):M.a.sleeves[e].commitCrime(M.a,a)},setToUniversityCourse:function(e=0,a="",i=""){if(t.checkingRam)return se("setToUniversityCourse",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"setToUniversityCourse() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");return n("setToUniversityCourse",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0?(t.log(`ERROR: sleeve.setToUniversityCourse(${e}) failed because it is an invalid sleeve number.`),!1):M.a.sleeves[e].takeUniversityCourse(M.a,a,i)},travel:function(e=0,a=""){if(t.checkingRam)return se("travel",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"travel() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");return n("travel",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0?(t.log(`ERROR: sleeve.travel(${e}) failed because it is an invalid sleeve number.`),!1):M.a.sleeves[e].travel(M.a,a)},setToCompanyWork:function(e=0,a=""){if(t.checkingRam)return se("setToCompanyWork",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"setToCompanyWork() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");if(n("setToCompanyWork",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0)return t.log(`ERROR: sleeve.setToCompanyWork(${e}) failed because it is an invalid sleeve number.`),!1;for(let n=0;n<M.a.sleeves.length;++n){if(n===e)continue;const i=M.a.sleeves[n];if(i.currentTask===$.SleeveTaskType.Company&&i.currentTaskLocation===a)return t.log(`ERROR: sleeve.setToCompanyWork() failed for Sleeve ${e} because Sleeve ${n} is doing the same task`),!1}return M.a.sleeves[e].workForCompany(M.a,a)},setToFactionWork:function(e=0,a="",i=""){if(t.checkingRam)return se("setToFactionWork",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"setToFactionWork() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");if(n("setToFactionWork",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0)return t.log(`ERROR: sleeve.setToFactionWork(${e}) failed because it is an invalid sleeve number.`),!1;for(let n=0;n<M.a.sleeves.length;++n){if(n===e)continue;const i=M.a.sleeves[n];if(i.currentTask===$.SleeveTaskType.Faction&&i.currentTaskLocation===a)return t.log(`ERROR: sleeve.setToFactionWork() failed for Sleeve ${e} because Sleeve ${n} is doing the same task`),!1}return M.a.sleeves[e].workForFaction(M.a,a,i)},setToGymWorkout:function(e=0,a="",i=""){if(t.checkingRam)return se("setToGymWorkout",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"setToGymWorkout() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");return n("setToGymWorkout",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0?(t.log(`ERROR: sleeve.setToGymWorkout(${e}) failed because it is an invalid sleeve number.`),!1):M.a.sleeves[e].workoutAtGym(M.a,a,i)},getSleeveStats:function(e=0){if(t.checkingRam)return se("workoutAtGym",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"getStats() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");if(n("workoutAtGym",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0)return t.log(`ERROR: sleeve.workoutAtGym(${e}) failed because it is an invalid sleeve number.`),!1;const a=M.a.sleeves[e];return{shock:100-a.shock,sync:a.sync,hacking_skill:a.hacking_skill,strength:a.strength,defense:a.defense,dexterity:a.dexterity,agility:a.agility,charisma:a.charisma}},getTask:function(e=0){if(t.checkingRam)return se("getTask",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"getTask() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");if(n("getTask",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0)return t.log(`ERROR: sleeve.getTask(${e}) failed because it is an invalid sleeve number.`),!1;const a=M.a.sleeves[e];return{task:$.SleeveTaskType[a.currentTask],crime:a.crimeType,location:a.currentTaskLocation,gymStatType:a.gymStatType,factionWorkType:k.FactionWorkType[a.factionWorkType]}},getInformation:function(e=0){if(t.checkingRam)return se("getInformation",g.CONSTANTS.ScriptSleeveBaseRamCost);if(10!==M.a.bitNodeN&&!j.SourceFileFlags[10])throw Object(K.d)(t,"getInformation() failed because you do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10");if(n("getInformation",g.CONSTANTS.ScriptSleeveBaseRamCost),e>=M.a.sleeves.length||e<0)return t.log(`ERROR: sleeve.getInformation(${e}) failed because it is an invalid sleeve number.`),!1;const a=M.a.sleeves[e];return{city:a.city,hp:a.hp,jobs:Object.keys(M.a.jobs),jobTitle:Object.values(M.a.jobs),maxHp:a.max_hp,tor:D.SpecialServerIps.hasOwnProperty("Darkweb Server"),mult:{agility:a.agility_mult,agilityExp:a.agility_exp_mult,companyRep:a.company_rep_mult,crimeMoney:a.crime_money_mult,crimeSuccess:a.crime_success_mult,defense:a.defense_mult,defenseExp:a.defense_exp_mult,dexterity:a.dexterity_mult,dexterityExp:a.dexterity_exp_mult,factionRep:a.faction_rep_mult,hacking:a.hacking_mult,hackingExp:a.hacking_exp_mult,strength:a.strength_mult,strengthExp:a.strength_exp_mult,workMoney:a.work_money_mult},timeWorked:a.currentTaskTime,earningsForSleeves:{workHackExpGain:a.earningsForSleeves.hack,workStrExpGain:a.earningsForSleeves.str,workDefExpGain:a.earningsForSleeves.def,workDexExpGain:a.earningsForSleeves.dex,workAgiExpGain:a.earningsForSleeves.agi,workChaExpGain:a.earningsForSleeves.cha,workMoneyGain:a.earningsForSleeves.money},earningsForPlayer:{workHackExpGain:a.earningsForPlayer.hack,workStrExpGain:a.earningsForPlayer.str,workDefExpGain:a.earningsForPlayer.def,workDexExpGain:a.earningsForPlayer.dex,workAgiExpGain:a.earningsForPlayer.agi,workChaExpGain:a.earningsForPlayer.cha,workMoneyGain:a.earningsForPlayer.money},earningsForTask:{workHackExpGain:a.earningsForTask.hack,workStrExpGain:a.earningsForTask.str,workDefExpGain:a.earningsForTask.def,workDexExpGain:a.earningsForTask.dex,workAgiExpGain:a.earningsForTask.agi,workChaExpGain:a.earningsForTask.cha,workMoneyGain:a.earningsForTask.money},workRepGain:a.getRepGain()}}}}}}).call(this,n(79))},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 p}),n.d(t,"h",function(){return m}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s});var a=n(10);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.post)("alias "+e+"="+i[e]);for(var e in r)r.hasOwnProperty(e)&&Object(a.post)("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 p(e){return i.hasOwnProperty(e)?(delete i[e],!0):!!r.hasOwnProperty(e)&&(delete r[e],!0)}function m(e){var t=e.split(" ");if(t.length>0){if("unalias"===t[0])return t.join(" ");if(null!=(a=function(e){return i.hasOwnProperty(e)?i[e]:null}(t[0])))t[0]=a;else null!=(a=u(t[0]))&&(t[0]=a);for(var n=0;n<t.length;++n){var a;null!=(a=u(t[n]))&&(t[n]=a)}}return t.join(" ")}},,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 M}),n.d(t,"d",function(){return I}),n.d(t,"e",function(){return R});var a=n(13),i=n(101),r=n(5),o=n(20),s=n(1),l=n(11),c=n(69),u=n(14),p=(n(150),n(125),n(72)),m=n(0),h=n(47),d=n(19),g=n(57),_=n(179),f=n(12),y=n(3),b=n(9),v=n(178),E=n(33),k=n(4),C=(n(17),n(7)),T=n(25);function O(e){d.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,m.a.factionInvitations.push(e.name),f.routing.isOn(f.Page.Factions)&&l.Engine.loadFactionsContent()):Object(v.a)(e)}function S(e){e.isMember=!0,m.a.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];u.Factions[n]instanceof c.Faction&&(u.Factions[n].isBanned=!0)}}function M(e){var t=u.Factions[e];if(null==t)throw new Error("Invalid factionName passed into displayFactionContent: "+e);if(!t.isMember)throw new Error("Not a member of this faction, cannot display faction information");var n=t.getInfo();Object(E.removeChildrenFromElement)(l.Engine.Display.factionContent);var a=[];a.push(Object(k.createElement)("h1",{innerText:e})),a.push(Object(k.createElement)("pre",{innerHTML:"<i>"+n.infoText+"</i>"})),a.push(Object(k.createElement)("p",{innerText:"---------------"}));var i=t.getFavorGain();2!=i.length&&(i=0),i=i[0],a.push(Object(k.createElement)("p",{innerText:"Reputation: "+Object(C.formatNumber)(t.playerReputation,4),tooltip:"You will earn "+Object(C.formatNumber)(i,0)+" faction favor upon resetting after installing an Augmentation"})),a.push(Object(k.createElement)("p",{innerText:"---------------"})),a.push(Object(k.createElement)("p",{innerText:"Faction Favor: "+Object(C.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(k.createElement)("p",{innerText:"---------------"})),a.push(Object(k.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(k.createElement)("br"));var r=Object(k.createElement)("div",{class:"faction-work-div"}),c=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});r.appendChild(c),c.appendChild(Object(k.createElement)("a",{class:"a-link-button",innerText:"Hacking Mission",clickListener:()=>{l.Engine.loadMissionContent();var e=new p.a(t.playerReputation,t);return Object(p.d)(!0,e),e.init(),!1}})),c.appendChild(Object(k.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(r);var h=Object(k.createElement)("div",{class:"faction-work-div"}),d=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});h.appendChild(d),d.appendChild(Object(k.createElement)("a",{class:"std-button",innerText:"Hacking Contracts",clickListener:()=>(m.a.startFactionHackWork(t),!1)})),d.appendChild(Object(k.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(h);var f=Object(k.createElement)("div",{class:"faction-work-div"}),v=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});f.appendChild(v),v.appendChild(Object(k.createElement)("a",{class:"std-button",innerText:"Field Work",clickListener:()=>(m.a.startFactionFieldWork(t),!1)})),v.appendChild(Object(k.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(f);var O=Object(k.createElement)("div",{class:"faction-work-div"}),S=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});O.appendChild(S),S.appendChild(Object(k.createElement)("a",{class:"std-button",innerText:"Security Work",clickListener:()=>(m.a.startFactionSecurityWork(t),!1)})),S.appendChild(Object(k.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 A=Object(k.createElement)("div",{class:"faction-work-div"}),w=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});A.appendChild(w);var x=Object(k.createElement)("p",{innerText:"This donation will result in 0.000 reputation gain"}),R=Object(k.createElement)("input",{class:"text-input",placeholder:"Donation amount",inputListener:()=>{let e=0;if(""!==R.value&&(e=parseFloat(R.value)),isNaN(e))x.innerText="Invalid donate amount entered!";else{var t=e/s.CONSTANTS.DonateMoneyToRepDivisor*m.a.faction_rep_mult;x.innerText="This donation will result in "+Object(C.formatNumber)(t,3)+" reputation gain"}}});w.appendChild(Object(k.createElement)("a",{class:"std-button",innerText:"Donate Money",clickListener:()=>{var n=parseFloat(R.value);if(isNaN(n)||n<0)Object(b.dialogBoxCreate)("Invalid amount entered!");else if(m.a.money.lt(n))Object(b.dialogBoxCreate)("You cannot afford to donate this much money!");else{m.a.loseMoney(n);var a=n/s.CONSTANTS.DonateMoneyToRepDivisor*m.a.faction_rep_mult;t.playerReputation+=a,Object(b.dialogBoxCreate)("You just donated "+y.numeralWrapper.format(n,"$0.000a")+" to "+t.name+" to gain "+Object(C.formatNumber)(a,3)+" reputation"),M(e)}}})),w.appendChild(R),w.appendChild(x),a.push(A);const N=Object(k.createElement)("div",{class:"faction-work-div",display:"inline"}),I=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});if(N.appendChild(I),I.appendChild(Object(k.createElement)("a",{class:"std-button",innerText:"Purchase Augmentations",margin:"5px",clickListener:()=>(l.Engine.hideAllContent(),l.Engine.Display.factionAugmentationsContent.style.display="block",P(e),!1)})),I.appendChild(Object(k.createElement)("pre",{innerHTML:"<br>As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.<br><br>"})),a.push(N),2!=m.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("The Covenant"===e&&m.a.bitNodeN>=10&&g.SourceFileFlags[10]){const e=Object(k.createElement)("div",{class:"faction-work-div",display:"inline"}),t=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});e.appendChild(t),t.appendChild(Object(k.createElement)("a",{class:"std-button",innerText:"Purchase Duplicate Sleeves",clickListener:()=>{Object(_.createPurchaseSleevesFromCovenantPopup)(m.a)}})),t.appendChild(Object(k.createElement)("p",{innerText:"Purchase Duplicate Sleeves. These are permanent! You can purchase up to 5 total."})),a.push(e)}A.style.display=t.favor>=Math.floor(s.CONSTANTS.BaseFavorToDonate*o.BitNodeMultipliers.RepToDonateToFaction)?"inline":"none",r.style.display=n.offerHackingMission?"inline":"none",h.style.display=n.offerHackingWork?"inline":"none",f.style.display=n.offerFieldWork?"inline":"none",O.style.display=n.offerSecurityWork?"inline":"none";for(B=0;B<a.length;++B)l.Engine.Display.factionContent.appendChild(a[B])}else{r.style.display="none",h.style.display="none",f.style.display="none",O.style.display="none",A.style.display="none";var L=Object(k.createElement)("div",{id:"faction-gang-div",class:"faction-work-div",display:"inline"}),D=Object(k.createElement)("div",{class:"faction-work-div-wrapper"});L.appendChild(D),D.appendChild(Object(k.createElement)("a",{class:"a-link-button",innerText:"Manage Gang",clickListener:()=>{if(m.a.inGang())l.Engine.loadGangContent();else{let a=!1;"NiteSec"!==e&&"The Black Hand"!==e||(a=!0);var t=Object(T.yesNoBoxGetYesButton)(),n=Object(T.yesNoBoxGetNoButton)();t.innerHTML="Create Gang",n.innerHTML="Cancel",t.addEventListener("click",()=>{m.a.startGang(e,a),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),l.Engine.loadGangContent(),Object(T.yesNoBoxClose)()}),n.addEventListener("click",()=>{Object(T.yesNoBoxClose)()});let i="";i=a?"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare is not as important.<br><br>":"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. Compared to hacking gangs, progression with combat gangs can be more difficult as territory management is more important. However, well-managed combat gangs can progress faster than hacking ones.<br><br>",Object(T.yesNoBoxCreate)(`Would you like to create a new Gang with ${e}?<br><br>`+"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed.<br><br>"+i+"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.")}}})),D.appendChild(Object(k.createElement)("p",{innerText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation."})),a.splice(7,1,L),m.a.inGang()&&m.a.gang.facName!=e&&(L.style.display="none");for(var B=0;B<a.length;++B)l.Engine.Display.factionContent.appendChild(a[B])}}function P(e){var t=u.Factions[e];if(null==t)throw new Error("Could not find faction "+e+" in displayFactionAugmentations");Object(E.removeChildrenFromElement)(l.Engine.Display.factionAugmentationsContent);var n=[];n.push(Object(k.createElement)("a",{innerText:"Back",class:"a-link-button",clickListener:()=>(l.Engine.loadFactionContent(),M(e),!1)})),n.push(Object(k.createElement)("h1",{innerText:"Faction Augmentations"})),n.push(Object(k.createElement)("p",{id:"faction-augmentations-page-desc",innerHTML:"Lists all Augmentations that are available to purchase from "+e+"<br><br>Augmentations are powerful upgrades that will enhance your abilities."})),n.push(Object(k.createElement)("br")),n.push(Object(k.createElement)("br"));var i=Object(k.createElement)("ul");const r=Object(k.createElement)("a",{innerText:"Sort by Cost",class:"a-link-button",clickListener:()=>{d.Settings.PurchaseAugmentationsOrder=h.PurchaseAugmentationsOrderSetting.Cost;var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.Augmentations[e],i=a.Augmentations[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseCost-i.baseCost}),Object(E.removeChildrenFromElement)(i),A(i,e,t)}}),o=Object(k.createElement)("a",{innerText:"Sort by Reputation",class:"a-link-button",clickListener:()=>{d.Settings.PurchaseAugmentationsOrder=h.PurchaseAugmentationsOrderSetting.Reputation;var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.Augmentations[e],i=a.Augmentations[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-i.baseRepRequirement}),Object(E.removeChildrenFromElement)(i),A(i,e,t)}}),s=Object(k.createElement)("a",{innerText:"Sort by Default Order",class:"a-link-button",clickListener:()=>{d.Settings.PurchaseAugmentationsOrder=h.PurchaseAugmentationsOrderSetting.Default,Object(E.removeChildrenFromElement)(i),A(i,t.augmentations,t)}});switch(n.push(r),n.push(o),n.push(s),d.Settings.PurchaseAugmentationsOrder){case h.PurchaseAugmentationsOrderSetting.Cost:r.click();break;case h.PurchaseAugmentationsOrderSetting.Reputation:o.click();break;default:s.click()}n.push(i);for(var c=0;c<n.length;++c)l.Engine.Display.factionAugmentationsContent.appendChild(n[c])}function A(e,t,n){const i=n.getInfo();for(var o=0;o<t.length;++o)!function(){var s=a.Augmentations[t[o]];if(null==s)throw new Error("Invalid Augmentation when trying to create Augmentation display Elements");for(var l=!1,c=0;c<m.a.queuedAugmentations.length;++c)if(m.a.queuedAugmentations[c].name==s.name){l=!0;break}for(c=0;c<m.a.augmentations.length;++c)if(m.a.augmentations[c].name==s.name){l=!0;break}var u=Object(k.createElement)("li"),p=Object(k.createElement)("span",{display:"inline-block",margin:"4px",padding:"4px"}),h=Object(k.createElement)("div",{tooltip:s.info}),g=Object(k.createElement)("a",{innerText:s.name,display:"inline",clickListener:()=>(d.Settings.SuppressBuyAugmentationConfirmation?R(s,n):w(s,n),!1)});s.name==r.AugmentationNames.NeuroFluxGovernor&&(g.innerText+=" - Level "+N());var _=Object(k.createElement)("p",{display:"inline"}),f=s.baseRepRequirement*i.augmentationRepRequirementMult;x(s)?s.name!=r.AugmentationNames.NeuroFluxGovernor&&(s.owned||l)?(g.setAttribute("class","a-link-button-inactive"),_.innerHTML="ALREADY OWNED"):n.playerReputation>=f?(g.setAttribute("class","a-link-button"),_.innerHTML="UNLOCKED - "+y.numeralWrapper.format(s.baseCost*i.augmentationPriceMult,"$0.000a")):(g.setAttribute("class","a-link-button-inactive"),_.innerHTML="LOCKED (Requires "+Object(C.formatNumber)(f,1)+" faction reputation) - "+y.numeralWrapper.format(s.baseCost*i.augmentationPriceMult,"$0.000a"),_.style.color="red"):(g.setAttribute("class","a-link-button-inactive"),_.innerHTML="LOCKED (Requires "+s.prereqs.join(",")+" as prerequisite(s))",_.style.color="red"),h.appendChild(g),p.appendChild(h),p.appendChild(_),u.appendChild(p),e.appendChild(u)}()}function w(e,t){const n=t.getInfo();var a=Object(T.yesNoBoxGetYesButton)(),i=Object(T.yesNoBoxGetNoButton)();a.innerHTML="Purchase",i.innerHTML="Cancel",a.addEventListener("click",function(){R(e,t)}),i.addEventListener("click",function(){Object(T.yesNoBoxClose)()}),Object(T.yesNoBoxCreate)("<h2>"+e.name+"</h2><br>"+e.info+"<br><br><br>Would you like to purchase the "+e.name+" Augmentation for $"+Object(C.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function x(e){var t=!0;if(e.prereqs&&e.prereqs.length>0)for(var n=0;n<e.prereqs.length;++n){var i=a.Augmentations[e.prereqs[n]];if(null!=i){if(!1===i.owned){t=!1;for(var r=0;r<m.a.queuedAugmentations.length;++r)if(m.a.queuedAugmentations[r].name===i.name){t=!0;break}}}else console.log("ERROR: Invalid prereq Augmentation: "+e.prereqs[n])}return t}function R(e,t,n=!1){const l=t.getInfo();if(x(e))if(0!==e.baseCost&&m.a.money.lt(e.baseCost*l.augmentationPriceMult)){let t="You don't have enough money to purchase "+e.name;if(n)return t;Object(b.dialogBoxCreate)(t)}else if(t.playerReputation<e.baseRepRequirement){let t="You don't have enough faction reputation to purchase "+e.name;if(n)return t;Object(b.dialogBoxCreate)(t)}else if(0===e.baseCost||m.a.money.gte(e.baseCost*l.augmentationPriceMult)){!1===m.a.firstAugPurchased&&(m.a.firstAugPurchased=!0,document.getElementById("augmentations-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var c=new i.PlayerOwnedAugmentation(e.name);if(e.name==r.AugmentationNames.NeuroFluxGovernor&&(c.level=N()),m.a.queuedAugmentations.push(c),m.a.loseMoney(e.baseCost*l.augmentationPriceMult),e.name==r.AugmentationNames.NeuroFluxGovernor){var u=N();--u;var p=Math.pow(s.CONSTANTS.NeuroFluxGovernorLevelMult,u);e.baseRepRequirement=500*p*s.CONSTANTS.AugmentationRepMultiplier*o.BitNodeMultipliers.AugmentationRepCost,e.baseCost=75e4*p*s.CONSTANTS.AugmentationCostMultiplier*o.BitNodeMultipliers.AugmentationMoneyCost;for(var h=0;h<m.a.queuedAugmentations.length-1;++h)e.baseCost*=s.CONSTANTS.MultipleAugMultiplier}for(var g in a.Augmentations)a.Augmentations.hasOwnProperty(g)&&(a.Augmentations[g].baseCost*=s.CONSTANTS.MultipleAugMultiplier);if(n)return"You purchased "+e.name;d.Settings.SuppressBuyAugmentationConfirmation||Object(b.dialogBoxCreate)("You purchased "+e.name+". It's enhancements will not take effect until they are installed. To install your augmentations, go to the 'Augmentations' tab on the left-hand navigation menu. Purchasing additional augmentations will now be more expensive."),P(t.name)}else Object(b.dialogBoxCreate)("Hmm, something went wrong when trying to purchase an Augmentation. Please report this to the game developer with an explanation of how to reproduce this.");else{var _="You must first purchase or install "+e.prereqs.join(",")+" before you can purchase this one.";if(n)return _;Object(b.dialogBoxCreate)(_)}Object(T.yesNoBoxClose)()}function N(){let e=0;for(var t=0;t<m.a.augmentations.length;++t)m.a.augmentations[t].name===r.AugmentationNames.NeuroFluxGovernor&&(e=m.a.augmentations[t].level);for(t=0;t<m.a.queuedAugmentations.length;++t)m.a.queuedAugmentations[t].name==r.AugmentationNames.NeuroFluxGovernor&&++e;return e+1}function I(e){var t=e/600*m.a.faction_rep_mult;for(var n in u.Factions)if(u.Factions.hasOwnProperty(n)){var a=u.Factions[n];a.isMember&&(a.playerReputation+=t*o.BitNodeMultipliers.FactionPassiveRepGain)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(17);class i{constructor(e="",t=""){this.filename="",this.msg="",this.recvd=!1,this.filename=e,this.msg=t,this.recvd=!1}static fromJSON(e){return a.Generic_fromJSON(i,e.data)}toJSON(){return a.Generic_toJSON("Message",this)}}t.Message=i,a.Reviver.constructors.Message=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(4),i=n(75);t.createPopupCloseButton=function(e,t){let n;function r(e){27===e.keyCode&&n.click()}return n=a.createElement("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText,clickListener:()=>{if(e instanceof Element)i.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&i.removeElement(t)}catch(e){console.error(`createPopupCloseButton() threw: ${e}`)}return document.removeEventListener("keydown",r),!1}}),document.addEventListener("keydown",r),n}},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return c}),n.d(t,"f",function(){return u});var a=n(20),i=n(0);n(74);function r(e){const 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 o(e){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);var t=3;return(t+=e.baseDifficulty*i.a.hacking_exp_mult*.3)*a.BitNodeMultipliers.HackExpGain}function s(e){const 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.BitNodeMultipliers.ScriptHackMoney}function l(e,t,n){const a=e.requiredHackingSkill*e.hackDifficulty;null==t&&(t=i.a.hacking_skill),null==n&&(n=i.a.intelligence);var r=2.5*a+500;return 5*(r/=t+50+.1*n)/i.a.hacking_speed_mult}function c(e,t,n){return 3.2*l(e,t,n)}function u(e,t,n){return 4*l(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1);t.SourceFileFlags=Array(a.CONSTANTS.TotalNumBitNodes+1),t.updateSourceFileFlags=function(e){for(let e=0;e<t.SourceFileFlags.length;++e)t.SourceFileFlags[e]=0;for(let n=0;n<e.sourceFiles.length;++n){const a=e.sourceFiles[n];t.SourceFileFlags[a.n]=a.lvl}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(4);t.createOptionElement=function(e,t=""){let n=t;return""===n&&(n=e),a.createElement("option",{text:e,value:n})}},function(e,t,n){"use strict";(function(e){n.d(t,"d",function(){return S}),n.d(t,"b",function(){return M}),n.d(t,"e",function(){return P}),n.d(t,"c",function(){return w}),n.d(t,"a",function(){return R});var a=n(98),i=n(153),r=n(62),o=n(1),s=n(11),l=n(107),c=(n(34),n(41)),u=n(39),p=n(0),m=n(104),h=n(103),d=n(23),g=n(21),_=n(19),f=n(47),y=n(83),b=n(12),v=n(3),E=n(9),k=(n(17),n(126)),C=n(4),T=null,O=null;function S(){const e=document.getElementById("script-editor-buttons-wrapper");if(null==e)return console.error("Could not find 'script-editor-buttons-wrapper'"),!1;const t=Object(C.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Beautify",clickListener:()=>{let e=M();return null!=e&&e.beautifyScript(),!1}});O=Object(C.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});const n=Object(C.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"});(T=Object(C.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;const a=Object(C.createElement)("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/index.html",innerText:"Netscript Documentation",target:"_blank"}),i=Object(C.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(A(),!1)});e.appendChild(t),e.appendChild(i),e.appendChild(O),e.appendChild(T),e.appendChild(n),e.appendChild(a);const r={saveAndCloseFn:A,quitFn:s.Engine.loadTerminalContent};m.a.init(r),h.a.init(r);const o=document.getElementById("script-editor-option-editor");if(null==o)return console.error("Could not find DOM Element for editor selector (id=script-editor-option-editor)"),!1;for(let e=0;e<o.options.length;++e)if(o.options[e].value===_.Settings.Editor){o.selectedIndex=e;break}o.onchange=(()=>{const e=o.value;switch(e){case f.EditorSetting.Ace:const t=h.a.getCode(),n=h.a.getFilename();m.a.create(),h.a.setInvisible(),m.a.openScript(n,t);break;case f.EditorSetting.CodeMirror:const a=m.a.getCode(),i=m.a.getFilename();h.a.create(),m.a.setInvisible(),h.a.openScript(i,a);break;default:return void console.error(`Unrecognized Editor Setting: ${e}`)}_.Settings.Editor=e}),o.onchange()}function M(){switch(_.Settings.Editor){case f.EditorSetting.Ace:return m.a;case f.EditorSetting.CodeMirror:return h.a;default:throw console.log(`Invalid Editor Setting: ${_.Settings.Editor}`),new Error(`Invalid Editor Setting: ${_.Settings.Editor}`)}}async function P(){var e=document.getElementById("script-editor-filename").value;if(null==T||!T.checked||!Object(r.isScriptFilename)(e))return void(O.innerText="N/A");let t;try{t=M().getCode()}catch(e){return void(O.innerText="RAM: ERROR")}var n=t.repeat(1),a=await Object(i.calculateRamUsage)(n);O.innerText=-1!==a?"RAM: "+v.numeralWrapper.format(a,"0.00")+" GB":"RAM: Syntax Error"}function A(){var e=document.getElementById("script-editor-filename").value;let t;try{t=M().getCode()}catch(e){return void Object(E.dialogBoxCreate)("Something went wrong when trying to save (getCurrentEditor().getCode()). Please report to game developer with details")}if(c.a.isRunning&&c.a.currStep===c.d.TerminalTypeScript){if("foodnstuff.script"!==e)return void Object(E.dialogBoxCreate)("Leave the script name as 'foodnstuff'!");if(-1==(t=t.replace(/\s/g,"")).indexOf("while(true){hack('foodnstuff');}"))return void Object(E.dialogBoxCreate)("Please copy and paste the code from the tutorial!");let i=p.a.getCurrentServer();for(var n=0;n<i.scripts.length;n++)if(e==i.scripts[n].filename)return i.scripts[n].saveScript(M().getCode(),p.a),s.Engine.loadTerminalContent(),Object(c.b)();let r=new a.Script;return r.saveScript(M().getCode(),p.a),i.scripts.push(r),Object(c.b)()}if(""!=e)if(0!=function(e){if(e.match(/^[.a-zA-Z0-9_-]+$/))return!0;return!1}(e)){var i=p.a.getCurrentServer();if(".fconf"===e)try{Object(l.c)(t)}catch(e){return void Object(E.dialogBoxCreate)(`Invalid .fconf file: ${e}`)}else if(Object(r.isScriptFilename)(e)){for(n=0;n<i.scripts.length;n++)if(e==i.scripts[n].filename)return i.scripts[n].saveScript(M().getCode(),p.a),void s.Engine.loadTerminalContent();const t=new a.Script;t.saveScript(M().getCode(),p.a),i.scripts.push(t)}else{if(!e.endsWith(".txt"))return void Object(E.dialogBoxCreate)("Invalid filename. Must be either a script (.script) or or text file (.txt)");for(n=0;n<i.textFiles.length;++n)if(i.textFiles[n].fn===e)return i.textFiles[n].write(t),void s.Engine.loadTerminalContent();var o=new y.TextFile(e,t);i.textFiles.push(o)}s.Engine.loadTerminalContent()}else Object(E.dialogBoxCreate)("Script filename can contain only alphanumerics, hyphens, and underscores");else Object(E.dialogBoxCreate)("You must specify a filename!")}function w(){var e=0;let t=-1!==window.location.href.toLowerCase().indexOf("?noscripts");for(var n in t&&console.info("Skipping the load of any scripts during startup"),d.AllServers)if(d.AllServers.hasOwnProperty(n)){var a=d.AllServers[n];a.ramUsed=0;for(var i=0;i<a.scripts.length;++i)a.scripts[i].module="";if(t)a.runningScripts.length=0;else for(var r=0;r<a.runningScripts.length;++r)Object(u.c)(a.runningScripts[r],a),e+=x(a.runningScripts[r])}return e}function x(e){var t=((new Date).getTime()-p.a.lastUpdate)/1e3,n=e.onlineRunningTime/14400;for(var a in n>=1&&(n=1),e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][2]||null==e.dataMap[a][2])continue;if(null==(m=d.AllServers[a]))continue;var i=Math.round(.5*e.dataMap[a][2]/e.onlineRunningTime*t);console.log(e.filename+" called grow() on "+m.hostname+" "+i+" times while offline"),e.log("Called grow() on "+m.hostname+" "+i+" times while offline");var r=Object(g.processSingleServerGrowth)(m,450*i,p.a);e.log(m.hostname+" grown by "+v.numeralWrapper.format(100*r-100,"0.000000%")+" from grow() calls made while offline")}var s=0;for(var a in e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][0]||null==e.dataMap[a][0])continue;if(null==(m=d.AllServers[a]))continue;var l=.5*e.dataMap[a][0]/e.onlineRunningTime*t;(l*=n)>m.moneyAvailable&&(l=m.moneyAvailable),s+=l,p.a.gainMoney(l),p.a.recordMoneySource(l,"hacking"),console.log(e.filename+" generated $"+l+" while offline by hacking "+m.hostname),e.log(e.filename+" generated $"+l+" while offline by hacking "+m.hostname),m.moneyAvailable-=l,m.moneyAvailable<0&&(m.moneyAvailable=0),isNaN(m.moneyAvailable)&&(m.moneyAvailable=0)}var c=e.onlineExpGained/e.onlineRunningTime*.5*t;for(var a in c*=n,p.a.gainHackingExp(c),e.offlineMoneyMade+=s,e.offlineRunningTime+=t,e.offlineExpGained+=c,e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][1]||null==e.dataMap[a][1])continue;if(null==(m=d.AllServers[a]))continue;var u=Math.round(.5*e.dataMap[a][1]/e.onlineRunningTime*t);console.log(e.filename+" hacked "+m.hostname+" "+u+" times while offline"),e.log("Hacked "+m.hostname+" "+u+" times while offline"),m.fortify(o.CONSTANTS.ServerFortifyAmount*u)}for(var a in e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][3]||null==e.dataMap[a][3])continue;var m;if(null==(m=d.AllServers[a]))continue;var h=Math.round(.5*e.dataMap[a][3]/e.onlineRunningTime*t);console.log(e.filename+" called weaken() on "+m.hostname+" "+h+" times while offline"),e.log("Called weaken() on "+m.hostname+" "+h+" times while offline"),m.weaken(o.CONSTANTS.ServerWeakenAmount*h)}return s}function R(e,t,n){for(var a=0;a<n.runningScripts.length;++a)if(n.runningScripts[a].filename==e&&Object(k.compareArrays)(n.runningScripts[a].args,t))return n.runningScripts[a];return null}e(document).keydown(function(e){!0!==_.Settings.DisableHotkeys&&b.routing.isOn(b.Page.ScriptEditor)&&66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),A())})}).call(this,n(79))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n(2);const i=n.n(a).a.Component;class r extends i{corp(){return this.props.corp}eventHandler(){return this.props.eventHandler}routing(){return this.props.routing}render(){}}},function(e,t,n){!function(e){"use strict";var t={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},n="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",a={5:n,6:n+" const class extends export import super"},i="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",o=new RegExp("["+i+"]"),s=new RegExp("["+i+r+"]");i=r=null;var l=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],c=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function u(e,t){for(var n=65536,a=0;a<t.length;a+=2){if((n+=t[a])>e)return!1;if((n+=t[a+1])>=e)return!0}}function p(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 m(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 h=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 d(e,t){return new h(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},_={startsExpr:!0},f={};function y(e,t){return void 0===t&&(t={}),t.keyword=e,f[e]=new h(e,t)}var b={num:new h("num",_),regexp:new h("regexp",_),string:new h("string",_),name:new h("name",_),eof:new h("eof"),bracketL:new h("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new h("]"),braceL:new h("{",{beforeExpr:!0,startsExpr:!0}),braceR:new h("}"),parenL:new h("(",{beforeExpr:!0,startsExpr:!0}),parenR:new h(")"),comma:new h(",",g),semi:new h(";",g),colon:new h(":",g),dot:new h("."),question:new h("?",g),arrow:new h("=>",g),template:new h("template"),ellipsis:new h("...",g),backQuote:new h("`",_),dollarBraceL:new h("${",{beforeExpr:!0,startsExpr:!0}),eq:new h("=",{beforeExpr:!0,isAssign:!0}),assign:new h("_=",{beforeExpr:!0,isAssign:!0}),incDec:new h("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new h("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:d("||",1),logicalAND:d("&&",2),bitwiseOR:d("|",3),bitwiseXOR:d("^",4),bitwiseAND:d("&",5),equality:d("==/!=",6),relational:d("</>",7),bitShift:d("<</>>",8),plusMin:new h("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:d("%",10),star:d("*",10),slash:d("/",10),starstar:new h("**",{beforeExpr:!0}),_break:y("break"),_case:y("case",g),_catch:y("catch"),_continue:y("continue"),_debugger:y("debugger"),_default:y("default",g),_do:y("do",{isLoop:!0,beforeExpr:!0}),_else:y("else",g),_finally:y("finally"),_for:y("for",{isLoop:!0}),_function:y("function",_),_if:y("if"),_return:y("return",g),_switch:y("switch"),_throw:y("throw",g),_try:y("try"),_var:y("var"),_const:y("const"),_while:y("while",{isLoop:!0}),_with:y("with"),_new:y("new",{beforeExpr:!0,startsExpr:!0}),_this:y("this",_),_super:y("super",_),_class:y("class"),_extends:y("extends",g),_export:y("export"),_import:y("import"),_null:y("null",_),_true:y("true",_),_false:y("false",_),_in:y("in",{beforeExpr:!0,binop:7}),_instanceof:y("instanceof",{beforeExpr:!0,binop:7}),_typeof:y("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},v=/\r\n?|\n|\u2028|\u2029/,E=new RegExp(v.source,"g");function k(e){return 10===e||13===e||8232===e||8233===e}var C=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,T=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,O=Object.prototype,S=O.hasOwnProperty,M=O.toString;function P(e,t){return S.call(e,t)}var A=Array.isArray||function(e){return"[object Array]"===M.call(e)},w=function(e,t){this.line=e,this.column=t};w.prototype.offset=function(e){return new w(this.line,this.column+e)};var x=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function R(e,t){for(var n=1,a=0;;){E.lastIndex=a;var i=E.exec(e);if(!(i&&i.index<t))return new w(n,t-a);++n,a=i.index+i[0].length}}var N={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}};function I(e){var t={};for(var n in N)t[n]=e&&P(e,n)?e[n]:N[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),A(t.onToken)){var a=t.onToken;t.onToken=function(e){return a.push(e)}}return A(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 x(this,o,s)),e.ranges&&(l.range=[i,r]),t.push(l)}}(t,t.onComment)),t}var L={};function D(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}var B=function(e,n,i){this.options=e=I(e),this.sourceFile=e.sourceFile,this.keywords=D(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=D(r);var s=(r?r+" ":"")+t.strict;this.reservedWordsStrict=D(s),this.reservedWordsStrictBind=D(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(v).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=b.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()};B.prototype.isKeyword=function(e){return this.keywords.test(e)},B.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},B.prototype.extend=function(e,t){this[e]=t(this[e])},B.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])}},B.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var W=B.prototype,j=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;W.strictDirective=function(e){for(;;){T.lastIndex=e,e+=T.exec(this.input)[0].length;var t=j.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},W.eat=function(e){return this.type===e&&(this.next(),!0)},W.isContextual=function(e){return this.type===b.name&&this.value===e},W.eatContextual=function(e){return this.value===e&&this.eat(b.name)},W.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},W.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||v.test(this.input.slice(this.lastTokEnd,this.start))},W.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},W.semicolon=function(){this.eat(b.semi)||this.insertSemicolon()||this.unexpected()},W.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},W.expect=function(e){this.eat(e)||this.unexpected()},W.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var F=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};W.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")}},W.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")},W.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},W.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var U=B.prototype;U.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==b.eof;){var n=this.parseStatement(!0,!0,t);e.body.push(n)}return this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var H={kind:"loop"},G={kind:"switch"};U.isLet=function(){if(this.type!==b.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;T.lastIndex=this.pos;var e=T.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(p(n,!0)){for(var a=t+1;m(this.input.charCodeAt(a),!0);)++a;var i=this.input.slice(t,a);if(!this.isKeyword(i))return!0}return!1},U.isAsyncFunction=function(){if(this.type!==b.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;T.lastIndex=this.pos;var e=T.exec(this.input),t=this.pos+e[0].length;return!(v.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&m(this.input.charAt(t+8)))},U.parseStatement=function(e,t,n){var a,i=this.type,r=this.startNode();switch(this.isLet()&&(i=b._var,a="let"),i){case b._break:case b._continue:return this.parseBreakContinueStatement(r,i.keyword);case b._debugger:return this.parseDebuggerStatement(r);case b._do:return this.parseDoStatement(r);case b._for:return this.parseForStatement(r);case b._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1);case b._class:return e||this.unexpected(),this.parseClass(r,!0);case b._if:return this.parseIfStatement(r);case b._return:return this.parseReturnStatement(r);case b._switch:return this.parseSwitchStatement(r);case b._throw:return this.parseThrowStatement(r);case b._try:return this.parseTryStatement(r);case b._const:case b._var:return a=a||this.value,e||"var"==a||this.unexpected(),this.parseVarStatement(r,a);case b._while:return this.parseWhileStatement(r);case b._with:return this.parseWithStatement(r);case b.braceL:return this.parseBlock();case b.semi:return this.parseEmptyStatement(r);case b._export:case b._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===b._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===b.name&&"Identifier"===s.type&&this.eat(b.colon)?this.parseLabeledStatement(r,o,s):this.parseExpressionStatement(r,s)}},U.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(b.semi)||this.insertSemicolon()?e.label=null:this.type!==b.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a<this.labels.length;++a){var i=this.labels[a];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return a===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},U.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},U.parseDoStatement=function(e){return this.next(),this.labels.push(H),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(b._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(b.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},U.parseForStatement=function(e){if(this.next(),this.labels.push(H),this.enterLexicalScope(),this.expect(b.parenL),this.type===b.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===b._var||this.type===b._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===b._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 F,r=this.parseExpression(!0,i);return this.type===b._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))},U.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},U.isFunction=function(){return this.type===b._function||this.isAsyncFunction()},U.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(b._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},U.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(b.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},U.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(b.braceL),this.labels.push(G),this.enterLexicalScope();for(var n=!1;this.type!=b.braceR;)if(this.type===b._case||this.type===b._default){var a=this.type===b._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(b.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")},U.parseThrowStatement=function(e){return this.next(),v.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 K=[];U.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===b._catch){var t=this.startNode();this.next(),this.expect(b.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(b.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(b._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},U.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},U.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(H),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},U.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")},U.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},U.parseLabeledStatement=function(e,t,n){for(var a=0;a<this.labels.length;++a)this.labels[a].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var i=this.type.isLoop?"loop":this.type===b._switch?"switch":null,r=this.labels.length-1;r>=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")},U.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},U.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(b.braceL),e&&this.enterLexicalScope();!this.eat(b.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},U.parseFor=function(e,t){return e.init=t,this.expect(b.semi),e.test=this.type===b.semi?null:this.parseExpression(),this.expect(b.semi),e.update=this.type===b.parenR?null:this.parseExpression(),this.expect(b.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},U.parseForIn=function(e,t){var n=this.type===b._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(b.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},U.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var a=this.startNode();if(this.parseVarId(a,n),this.eat(b.eq)?a.init=this.parseMaybeAssign(t):"const"!==n||this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==a.id.type||t&&(this.type===b._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(b.comma))break}return e},U.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},U.parseFunction=function(e,t,n,a){this.initFunction(e),this.options.ecmaVersion>=6&&!a&&(e.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&&(e.id="nullableID"===t&&this.type!=b.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==b.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")},U.parseFunctionParams=function(e){this.expect(b.parenL),e.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},U.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),a=!1;for(n.body=[],this.expect(b.braceL);!this.eat(b.braceR);)if(!this.eat(b.semi)){var i=this.startNode(),r=this.eat(b.star),o=!1,s=this.type===b.name&&"static"===this.value;this.parsePropertyName(i),i.static=s&&this.type!==b.parenL,i.static&&(r&&this.unexpected(),r=this.eat(b.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!r&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==b.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===b.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 p=i.value.start;"get"===i.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"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")},U.parseClassMethod=function(e,t,n,a){t.value=this.parseMethod(n,a),e.body.push(this.finishNode(t,"MethodDefinition"))},U.parseClassId=function(e,t){e.id=this.type===b.name?this.parseIdent():!0===t?this.unexpected():null},U.parseClassSuper=function(e){e.superClass=this.eat(b._extends)?this.parseExprSubscripts():null},U.parseExport=function(e,t){if(this.next(),this.eat(b.star))return this.expectContextual("from"),e.source=this.type===b.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(b._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===b._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===b._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===b.string?this.parseExprAtom():this.unexpected();else{for(var r=0;r<e.specifiers.length;r++)(this.keywords.test(e.specifiers[r].local.name)||this.reservedWords.test(e.specifiers[r].local.name))&&this.unexpected(e.specifiers[r].local.start);e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},U.checkExport=function(e,t,n){e&&(P(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},U.checkPatternExport=function(e,t){var n=t.type;if("Identifier"==n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"==n)for(var a=0;a<t.properties.length;++a)this.checkPatternExport(e,t.properties[a].value);else if("ArrayPattern"==n)for(var i=0;i<t.elements.length;++i){var r=t.elements[i];r&&this.checkPatternExport(e,r)}else"AssignmentPattern"==n?this.checkPatternExport(e,t.left):"ParenthesizedExpression"==n&&this.checkPatternExport(e,t.expression)},U.checkVariableExport=function(e,t){if(e)for(var n=0;n<t.length;n++)this.checkPatternExport(e,t[n].id)},U.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},U.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(b.braceL);!this.eat(b.braceR);){if(n)n=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var a=this.startNode();a.local=this.parseIdent(!0),a.exported=this.eatContextual("as")?this.parseIdent(!0):a.local,this.checkExport(e,a.exported.name,a.exported.start),t.push(this.finishNode(a,"ExportSpecifier"))}return t},U.parseImport=function(e){return this.next(),this.type===b.string?(e.specifiers=K,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===b.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},U.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===b.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,"let"),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(b.comma))return e}if(this.type===b.star){var a=this.startNode();return this.next(),this.expectContextual("as"),a.local=this.parseIdent(),this.checkLVal(a.local,"let"),e.push(this.finishNode(a,"ImportNamespaceSpecifier")),e}for(this.expect(b.braceL);!this.eat(b.braceR);){if(t)t=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(i.local=i.imported,this.isKeyword(i.local.name)&&this.unexpected(i.local.start),this.reservedWordsStrict.test(i.local.name)&&this.raiseRecoverable(i.local.start,"The keyword '"+i.local.name+"' is reserved")),this.checkLVal(i.local,"let"),e.push(this.finishNode(i,"ImportSpecifier"))}return e};var q=B.prototype;q.toAssignable=function(e,t){if(this.options.ecmaVersion>=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<e.properties.length;n++){var a=e.properties[n];"init"!==a.kind&&this.raise(a.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(a.value,t)}break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t);break;case"AssignmentExpression":if("="!==e.operator){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break}e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":e.expression=this.toAssignable(e.expression,t);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},q.toAssignableList=function(e,t){var n=e.length;if(n){var a=e[n-1];if(a&&"RestElement"==a.type)--n;else if(a&&"SpreadElement"==a.type){a.type="RestElement";var i=a.argument;this.toAssignable(i,t),"Identifier"!==i.type&&"MemberExpression"!==i.type&&"ArrayPattern"!==i.type&&this.unexpected(i.start),--n}t&&a&&"RestElement"===a.type&&"Identifier"!==a.argument.type&&this.unexpected(a.argument.start)}for(var r=0;r<n;r++){var o=e[r];o&&this.toAssignable(o,t)}return e},q.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},q.parseRest=function(e){var t=this.startNode();return this.next(),t.argument=e?this.type===b.name?this.parseIdent():this.unexpected():this.type===b.name||this.type===b.bracketL?this.parseBindingAtom():this.unexpected(),this.finishNode(t,"RestElement")},q.parseBindingAtom=function(){if(this.options.ecmaVersion<6)return this.parseIdent();switch(this.type){case b.name:return this.parseIdent();case b.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(b.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case b.braceL:return this.parseObj(!0);default:this.unexpected()}},q.parseBindingList=function(e,t,n,a){for(var i=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(b.comma),t&&this.type===b.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===b.ellipsis){var o=this.parseRest(a);this.parseBindingListItem(o),i.push(o),this.type===b.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),i.push(s)}return i},q.parseBindingListItem=function(e){return e},q.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(b.eq))return n;var a=this.startNodeAt(e,t);return a.left=n,a.right=this.parseMaybeAssign(),this.finishNode(a,"AssignmentPattern")},q.checkLVal=function(e,t,n){switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(P(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t&&"none"!==t&&(("var"===t&&!this.canDeclareVarName(e.name)||"var"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,"Identifier '"+e.name+"' has already been declared"),"var"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));break;case"MemberExpression":t&&this.raiseRecoverable(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var a=0;a<e.properties.length;a++)this.checkLVal(e.properties[a].value,t,n);break;case"ArrayPattern":for(var i=0;i<e.elements.length;i++){var r=e.elements[i];r&&this.checkLVal(r,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var $=B.prototype;$.checkPropClash=function(e,t){if(!(this.options.ecmaVersion>=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}}},$.parseExpression=function(e,t){var n=this.start,a=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===b.comma){var r=this.startNodeAt(n,a);for(r.expressions=[i];this.eat(b.comma);)r.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(r,"SequenceExpression")}return i},$.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 F,a=!0);var o=this.start,s=this.startLoc;this.type!=b.parenL&&this.type!=b.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||F.call(t);var c=this.startNodeAt(o,s);return c.operator=this.value,c.left=this.type===b.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},$.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(b.question)){var r=this.startNodeAt(n,a);return r.test=i,r.consequent=this.parseMaybeAssign(),this.expect(b.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return i},$.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)},$.parseExprOp=function(e,t,n,a,i){var r=this.type.binop;if(null!=r&&(!i||this.type!==b._in)&&r>a){var o=this.type===b.logicalOR||this.type===b.logicalAND,s=this.value;this.next();var l=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1),l,c,r,i),p=this.buildBinary(t,n,e,u,s,o);return this.parseExprOp(p,t,n,a,i)}return e},$.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")},$.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===b.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(b.starstar)?this.buildBinary(a,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},$.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},$.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(b.bracketL))||this.eat(b.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=i?this.parseExpression():this.parseIdent(!0),o.computed=!!i,i&&this.expect(b.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!a&&this.eat(b.parenL)){var s=new F,l=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var u=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1,s);if(r&&!this.canInsertSemicolon()&&this.eat(b.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 p=this.startNodeAt(t,n);p.callee=e,p.arguments=u,e=this.finishNode(p,"CallExpression")}else{if(this.type!==b.backQuote)return e;var m=this.startNodeAt(t,n);m.tag=e,m.quasi=this.parseTemplate(),e=this.finishNode(m,"TaggedTemplateExpression")}},$.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case b._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case b._this:var a=this.type===b._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,a);case b.name:var i=this.start,r=this.startLoc,o=this.parseIdent(this.type!==b.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(b._function))return this.parseFunction(this.startNodeAt(i,r),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(i,r),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===b.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(b.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,r),[o],!0)}return o;case b.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case b.num:case b.string:return this.parseLiteral(this.value);case b._null:case b._true:case b._false:return(t=this.startNode()).value=this.type===b._null?null:this.type===b._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case b.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 b.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(b.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case b.braceL:return this.parseObj(!1,e);case b._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case b._class:return this.parseClass(this.startNode(),!1);case b._new:return this.parseNew();case b.backQuote:return this.parseTemplate();default:this.unexpected()}},$.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")},$.parseParenExpression=function(){this.expect(b.parenL);var e=this.parseExpression();return this.expect(b.parenR),e},$.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,p=!1,m=new F,h=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==b.parenR;){if(u?u=!1:this.expect(b.comma),i&&this.afterTrailingComma(b.parenR,!0)){p=!0;break}if(this.type===b.ellipsis){r=this.start,c.push(this.parseParenItem(this.parseRest())),this.type===b.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==b.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,m,this.parseParenItem))}var g=this.start,_=this.startLoc;if(this.expect(b.parenR),e&&!this.canInsertSemicolon()&&this.eat(b.arrow))return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=h,this.awaitPos=d,this.parseParenArrowList(n,a,c);c.length&&!p||this.unexpected(this.lastTokStart),r&&this.unexpected(r),this.checkExpressionErrors(m,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=d||this.awaitPos,c.length>1?((t=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(t,"SequenceExpression",g,_)):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},$.parseParenItem=function(e){return e},$.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Y=[];$.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(b.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(b.parenL)?e.arguments=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Y,this.finishNode(e,"NewExpression")},$.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===b.backQuote,this.finishNode(e,"TemplateElement")},$.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(b.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(b.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},$.parseObj=function(e,t){var n=this.startNode(),a=!0,i={};for(n.properties=[],this.next();!this.eat(b.braceR);){if(a)a=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.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(b.star))),this.parsePropertyName(c),e||!(this.options.ecmaVersion>=8)||r||c.computed||"Identifier"!==c.key.type||"async"!==c.key.name||this.type===b.parenL||this.type===b.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")},$.parsePropertyValue=function(e,t,n,a,i,r,o){if((n||a)&&this.type===b.colon&&this.unexpected(),this.eat(b.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===b.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!=b.comma&&this.type!=b.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===b.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()},$.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(b.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(b.bracketR),e.key;e.computed=!1}return e.key=this.type===b.num||this.type===b.string?this.parseExprAtom():this.parseIdent(!0)},$.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},$.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(b.parenL),n.params=this.parseBindingList(b.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")},$.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")},$.parseFunctionBody=function(e,t){var n=t&&this.type!==b.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},$.isSimpleParamList=function(e){for(var t=0;t<e.length;t++)if("Identifier"!==e[t].type)return!1;return!0},$.checkParams=function(e,t){for(var n={},a=0;a<e.params.length;a++)this.checkLVal(e.params[a],"var",t?null:n)},$.parseExprList=function(e,t,n,a){for(var i=[],r=!0;!this.eat(e);){if(r)r=!1;else if(this.expect(b.comma),t&&this.afterTrailingComma(e))break;var o;n&&this.type===b.comma?o=null:this.type===b.ellipsis?(o=this.parseSpread(a),a&&this.type===b.comma&&a.trailingComma<0&&(a.trailingComma=this.start)):o=this.parseMaybeAssign(!1,a),i.push(o)}return i},$.parseIdent=function(e){var t=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===b.name?(!e&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(this.value)&&(this.options.ecmaVersion>=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")},$.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==b.semi||this.canInsertSemicolon()||this.type!=b.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(b.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},$.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=B.prototype;z.raise=function(e,t){var n=R(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 w(this.curLine,this.pos-this.lineStart)};var V=B.prototype,J=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var a=0;a<t.length;a++){var i=t[a];for(var r in i)P(i,r)&&(e[r]=i[r])}return e};V.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},V.exitFunctionScope=function(){this.scopeStack.pop()},V.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),J(t.parentLexical,e.lexical,e.parentLexical)},V.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];J(t.childVar,e.var,e.childVar)},V.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!P(t.lexical,e)&&!P(t.parentLexical,e)},V.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!P(t.lexical,e)&&!P(t.var,e)&&!P(t.childVar,e)},V.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},V.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var X=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new x(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Q=B.prototype;function Z(e,t,n,a){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=a),this.options.ranges&&(e.range[1]=n),e}Q.startNode=function(){return new X(this,this.start,this.startLoc)},Q.startNodeAt=function(e,t){return new X(this,e,t)},Q.finishNode=function(e,t){return Z.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Q.finishNodeAt=function(e,t,n,a){return Z.call(this,e,t,n,a)};var ee=function(e,t,n,a,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=a,this.generator=!!i},te={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!0),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,function(e){return e.readTmplToken()}),f_expr:new ee("function",!0),f_expr_gen:new ee("function",!0,!1,null,!0),f_gen:new ee("function",!1,!1,null,!0)},ne=B.prototype;ne.initialContext=function(){return[te.b_stat]},ne.braceIsBlock=function(e){if(e===b.colon){var t=this.curContext();if(t===te.b_stat||t===te.b_expr)return!t.isExpr}return e===b._return?v.test(this.input.slice(this.lastTokEnd,this.start)):e===b._else||e===b.semi||e===b.eof||e===b.parenR||e==b.arrow||(e==b.braceL?this.curContext()===te.b_stat:!this.exprAllowed)},ne.inGeneratorContext=function(){for(var e=this.context.length-1;e>=0;e--)if(this.context[e].generator)return!0;return!1},ne.updateContext=function(e){var t,n=this.type;n.keyword&&e==b.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},b.parenR.updateContext=b.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},b.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0},b.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0},b.parenL.updateContext=function(e){var t=e===b._if||e===b._for||e===b._with||e===b._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0},b.incDec.updateContext=function(){},b._function.updateContext=function(e){e.beforeExpr&&e!==b.semi&&e!==b._else&&(e!==b.colon&&e!==b.braceL||this.curContext()!==te.b_stat)&&this.context.push(te.f_expr),this.exprAllowed=!1},b.backQuote.updateContext=function(){this.curContext()===te.q_tmpl?this.context.pop():this.context.push(te.q_tmpl),this.exprAllowed=!1},b.star.updateContext=function(e){e==b._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},b.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 x(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ie=B.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===b.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(b.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ie.readToken=function(e){return p(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(E.lastIndex=n;(e=E.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,a),n,this.pos,t,this.curPosition())},ie.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),a=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&10!==a&&13!==a&&8232!==a&&8233!==a;)++this.pos,a=this.input.charCodeAt(this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},ie.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&C.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(b.ellipsis)):(++this.pos,this.finishToken(b.dot))},ie.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(b.assign,2):this.finishOp(b.slash,1)},ie.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,a=42===e?b.star:b.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,a=b.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(b.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?b.logicalOR:b.logicalAND,2):61===t?this.finishOp(b.assign,2):this.finishOp(124===e?b.bitwiseOR:b.bitwiseAND,1)},ie.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(b.assign,2):this.finishOp(b.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)&&v.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(b.incDec,2):61===t?this.finishOp(b.assign,2):this.finishOp(b.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(b.assign,n+1):this.finishOp(b.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(b.relational,n))},ie.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(b.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(b.arrow)):this.finishOp(61===e?b.eq:b.prefix,1)},ie.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(b.parenL);case 41:return++this.pos,this.finishToken(b.parenR);case 59:return++this.pos,this.finishToken(b.semi);case 44:return++this.pos,this.finishToken(b.comma);case 91:return++this.pos,this.finishToken(b.bracketL);case 93:return++this.pos,this.finishToken(b.bracketR);case 123:return++this.pos,this.finishToken(b.braceL);case 125:return++this.pos,this.finishToken(b.braceR);case 58:return++this.pos,this.finishToken(b.colon);case 63:return++this.pos,this.finishToken(b.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(b.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(b.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(v.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(b.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<r;++i){var o,s=this.input.charCodeAt(this.pos);if((o=s>=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),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(b.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),p(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(b.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):(k(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(b.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===b.template?36===n?(this.pos+=2,this.finishToken(b.dollarBraceL)):(++this.pos,this.finishToken(b.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(b.template,e));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(k(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.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(m(i,a))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var r=this.pos;117!=this.input.charCodeAt(++this.pos)&&this.raise(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?p:m)(o,a)||this.raise(r,"Invalid Unicode escape"),e+=le(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},ie.readWord=function(){var e=this.readWord1(),t=b.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=f[e]),this.finishToken(t,e)},e.version="5.0.3",e.parse=function(e,t){return new B(t,e).parse()},e.parseExpressionAt=function(e,t,n){var a=new B(n,e,t);return a.nextToken(),a.parseExpression()},e.tokenizer=function(e,t){return new B(t,e)},e.addLooseExports=function(t,n,a){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=a},e.Parser=B,e.plugins=L,e.defaultOptions=N,e.Position=w,e.SourceLocation=x,e.getLineInfo=R,e.Node=X,e.TokenType=h,e.tokTypes=b,e.keywordTypes=f,e.TokContext=ee,e.tokContexts=te,e.isIdentifierChar=m,e.isIdentifierStart=p,e.Token=ae,e.isNewLine=k,e.lineBreak=v,e.lineBreakG=E,e.nonASCIIwhitespace=C,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScriptFilename=function(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}},function(e,t,n){"use strict";n.d(t,"a",function(){return m}),n.d(t,"b",function(){return h}),n.d(t,"c",function(){return d}),n.d(t,"e",function(){return g}),n.d(t,"d",function(){return _});var a=n(20),i=n(1),r=n(0),o=n(23),s=n(74),l=n(9),c=n(90),u=n(25),p=n(151);function m(e){const t=Math.round(e);return isNaN(t)||!Object(p.isPowerOfTwo)(t)?1/0:t>d()?1/0:t*i.CONSTANTS.BaseCostFor1GBOfRamServer*a.BitNodeMultipliers.PurchasedServerCost}function h(){return Math.round(i.CONSTANTS.PurchasedServerLimit*a.BitNodeMultipliers.PurchasedServerLimit)}function d(){const e=Math.round(i.CONSTANTS.PurchasedServerMaxRam*a.BitNodeMultipliers.PurchasedServerMaxRam);return 1<<31-Math.clz32(e)}function g(e){const t=m(e);if(r.a.money.lt(t))Object(l.dialogBoxCreate)("You don't have enough money to purchase this server!");else if(r.a.purchasedServers.length>=h())Object(l.dialogBoxCreate)("You have reached the maximum limit of "+h()+" 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(u.yesNoTxtInpBoxGetInput)();if(""!=n){var a=new s.Server({ip:Object(c.createRandomIp)(),hostname:n,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:e});Object(o.AddToAllServers)(a),r.a.purchasedServers.push(a.ip);var i=r.a.getHomeComputer();i.serversOnNetwork.push(a.ip),a.serversOnNetwork.push(i.ip),r.a.loseMoney(t),Object(l.dialogBoxCreate)("Server successfully purchased with hostname "+n)}else Object(l.dialogBoxCreate)("You must enter a hostname for your new server!")}}function _(e){if(r.a.money.lt(e))return void Object(l.dialogBoxCreate)("You do not have enough money to purchase additional RAM for your home computer");const t=r.a.getHomeComputer();t.maxRam>=i.CONSTANTS.HomeComputerMaxRam?Object(l.dialogBoxCreate)("You cannot upgrade your home computer RAM because it is at its maximum possible value"):(t.maxRam*=2,r.a.loseMoney(e),Object(l.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}),t.setTimeoutRef=window.setTimeout.bind(window)},function(e,t,n){"use strict";n.d(t,"a",function(){return f}),n.d(t,"b",function(){return g}),n.d(t,"e",function(){return d}),n.d(t,"d",function(){return y}),n.d(t,"c",function(){return v});var a=n(54),i=(n(16),n(13)),r=n(5),o=n(30),s=n(72),l=n(0),c=n(77),u=n(21),p=n(19),m=n(9);function h(e,t=!1){e.recvd=!0,!t&&p.Settings.SuppressMessages||d(e),function(e,t){var n=Object(u.GetServerByHostname)(t);if(null==n)return void console.log("WARNING: Did not locate "+t);for(var a=0;a<n.messages.length;++a)if(n.messages[a].filename===e.filename)return;n.messages.push(e)}(e,"home")}function d(e){var t="Message received from unknown sender: <br><br><i>"+e.msg+"</i><br><br>This message was saved as "+e.filename+" onto your home computer.";Object(m.dialogBoxCreate)(t)}function g(){var e=f[b.Jumper0],t=f[b.Jumper1],n=f[b.Jumper2],a=f[b.Jumper3],u=f[b.Jumper4],p=f[b.CyberSecTest],d=f[b.NiteSecTest],g=f[b.BitRunnersTest],_=f[b.RedPill],y=!1;i.Augmentations[r.AugmentationNames.TheRedPill].owned&&(y=!0),_&&y&&0===l.a.sourceFiles.length&&!c.b&&!s.c?m.dialogBoxOpened||h(_,!0):_&&y?c.b||s.c||m.dialogBoxOpened||h(_):e&&!e.recvd&&l.a.hacking_skill>=25?(h(e),l.a.getHomeComputer().programs.push(o.Programs.Flight.name)):t&&!t.recvd&&l.a.hacking_skill>=40?h(t):p&&!p.recvd&&l.a.hacking_skill>=50?h(p):n&&!n.recvd&&l.a.hacking_skill>=175?h(n):d&&!d.recvd&&l.a.hacking_skill>=200?h(d):a&&!a.recvd&&l.a.hacking_skill>=350?h(a):u&&!u.recvd&&l.a.hacking_skill>=490?h(u):g&&!g.recvd&&l.a.hacking_skill>=500&&h(g)}function _(e){f[e.filename]=e}let f={};function y(e){f=JSON.parse(e,Reviver)}let b={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 v(){f={},_(new a.Message(b.Jumper0,"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer. <br><br>It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.<br><br>Use this program to track your progress<br><br>The fl1ght.exe program was added to your home computer<br><br>-jump3R")),_(new a.Message(b.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search. <br><br>You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.<br><br>-jump3R")),_(new a.Message(b.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec.<br><br>-jump3R")),_(new a.Message(b.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand. <br><br>I.I.I.I <br><br>-jump3R")),_(new a.Message(b.Jumper4,"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.<br><br>-jump3R")),_(new a.Message(b.CyberSecTest,"We've been watching you. Your skills are very impressive. But you're wasting your talents. If you join us, you can put your skills to good use and change the world for the better. If you join us, we can unlock your full potential. <br><br>But first, you must pass our test. Find and hack our server using the Terminal. <br><br>-CyberSec")),_(new a.Message(b.NiteSecTest,"People say that the corrupted governments and corporations rule the world. Yes, maybe they do. But do you know who everyone really fears? People like us. Because they can't hide from us. Because they can't fight shadows and ideas with bullets. <br><br>Join us, and people will fear you, too. <br><br>Find and hack our hidden server using the Terminal. Then, we will contact you again.<br><br>-NiteSec")),_(new a.Message(b.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for. <br><br> We can help you find the answers.<br><br>run4theh111z")),_(new a.Message(b.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return T}),n.d(t,"d",function(){return O}),n.d(t,"c",function(){return S}),n.d(t,"b",function(){return M});var a=n(177),i=n(176),r=n(11),o=n(69),s=n(14),l=n(53),c=n(3),u=n(9),p=n(17),m=n(31),h=n(99),d=n(4),g=n(37),_=n(12),f=n(7),y=n(43),b=n(15),v=n(33),E=n(75),k=n(26);e(document).keydown(function(e){if(_.routing.isOn(_.Page.Gang)&&e.altKey){if(null!=N.gangMemberFilter&&N.gangMemberFilter===document.activeElement)return;e.keyCode===m.KEY[1]?"block"===N.gangTerritorySubpage.style.display&&N.managementButton.click():e.keyCode===m.KEY[2]&&"block"===N.gangManagementSubpage.style.display&&N.territoryButton.click()}}),e(document).mousedown(function(t){N.gangMemberUpgradeBoxOpened&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(E.removeElement)(N.gangMemberUpgradeBox),N.gangMemberUpgradeBox=null,N.gangMemberUpgradeBoxContent=null,N.gangMemberUpgradeBoxOpened=!1,N.gangMemberUpgradeBoxElements=null)});let C=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"],T={"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(){T={"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 S(e){T=JSON.parse(e,p.Reviver)}function M(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}function P(e){this.name=e,this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.hack_asc_mult=1,this.str_asc_mult=1,this.def_asc_mult=1,this.dex_asc_mult=1,this.agi_asc_mult=1,this.cha_asc_mult=1,this.upgrades=[],this.augmentations=[]}function A(e="",t="",n=!1,a=!1,i={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.isHacking=n,this.isCombat=a,this.baseRespect=i.baseRespect?i.baseRespect:0,this.baseWanted=i.baseWanted?i.baseWanted:0,this.baseMoney=i.baseMoney?i.baseMoney:0,this.hackWeight=i.hackWeight?i.hackWeight:0,this.strWeight=i.strWeight?i.strWeight:0,this.defWeight=i.defWeight?i.defWeight:0,this.dexWeight=i.dexWeight?i.dexWeight:0,this.agiWeight=i.agiWeight?i.agiWeight:0,this.chaWeight=i.chaWeight?i.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=i.difficulty?i.difficulty:1,this.territory=i.territory?i.territory:{money:1,respect:1,wanted:1}}M.prototype.getPower=function(){return T[this.facName].power},M.prototype.getTerritory=function(){return T[this.facName].territory},M.prototype.process=function(e=1,t){const n=1e3/r.Engine._idleSpeed;if(isNaN(e)&&console.error(`NaN passed into Gang.process(): ${e}`),this.storedCycles+=e,this.storedCycles<2*n)return;const a=Math.min(this.storedCycles,5*n);try{this.processGains(a,t),this.processExperienceGains(a),this.processTerritoryAndPowerGains(a),this.storedCycles-=a}catch(e){Object(y.exceptionAlert)(`Exception caught when processing Gang: ${e}`)}},M.prototype.processGains=function(e=1,t){for(var n=0,a=0,i=0,r=0;r<this.members.length;++r)a+=this.members[r].calculateRespectGain(this),i+=this.members[r].calculateWantedLevelGain(this),n+=this.members[r].calculateMoneyGain(this);if(this.respectGainRate=a,this.wantedGainRate=i,this.moneyGainRate=n,"number"==typeof a){const n=a*e;this.respect+=n;const i=s.Factions[this.facName];if(i instanceof o.Faction){var l=1+i.favor/100;i.playerReputation+=t.faction_rep_mult*n*l/5}else Object(u.dialogBoxCreate)("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev");for(let t=0;t<this.members.length;++t)this.members[t].recordEarnedRespect(e,this)}else console.warn("respectGains calculated to be NaN");if("number"==typeof i)if(1===this.wanted&&i<0);else{const t=this.wanted;let n=t+i*e;i<=0&&n>t&&(n=1),this.wanted=n,this.wanted<1&&(this.wanted=1)}else console.warn("ERROR: wantedLevelGains is NaN");"number"==typeof n?(t.gainMoney(n*e),t.recordMoneySource(n*e,"gang")):console.warn("ERROR: respectGains is NaN")},M.prototype.processTerritoryAndPowerGains=function(e=1){if(this.storedTerritoryAndPowerCycles+=e,!(this.storedTerritoryAndPowerCycles<100)){this.storedTerritoryAndPowerCycles-=100;var t=this.facName;for(const e in T)if(T.hasOwnProperty(e))if(e==t)T[e].power+=this.calculatePower();else{const t=Math.random();if(t<.5){const t=.005*T[e].power;T[e].power+=Math.min(.85,t)}else{const n=.75*t*T[e].territory;T[e].power+=n}}this.territoryWarfareEngaged?this.territoryClashChance=1:this.territoryClashChance>0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));for(var n=0;n<C.length;++n){const e=C.filter(e=>e!==n),a=Object(b.getRandomInt)(0,e.length-1),i=C[n],r=e[a];if(!(i!==t&&r!==t||Math.random()<this.territoryClashChance))continue;const o=T[i].power,s=o/(o+T[r].power);if(Math.random()<s){if(T[r].territory<=0)return;T[i].territory+=1e-4,T[r].territory-=1e-4,i===t?this.clash(!0):r===t?this.clash(!1):T[r].power*=1/1.01}else{if(T[i].territory<=0)return;T[i].territory-=1e-4,T[r].territory+=1e-4,i===t?this.clash(!1):r===t?this.clash(!0):T[i].power*=1/1.01}}}},M.prototype.canRecruitMember=function(){return!(this.members.length>=30)&&this.respect>=this.getRespectNeededToRecruitMember()},M.prototype.getRespectNeededToRecruitMember=function(){if(this.members.length<3)return 0;const e=this.members.length-2;return Math.round(.9*Math.pow(e,3)+Math.pow(e,2))},M.prototype.recruitMember=function(e){if(""===(e=String(e))||!this.canRecruitMember())return!1;if(this.members.filter(t=>t.name===e).length>=1)return!1;let t=new P(e);return this.members.push(t),_.routing.isOn(_.Page.Gang)&&(this.createGangMemberDisplayElement(t),this.updateGangContent()),!0},M.prototype.getWantedPenalty=function(){return this.respect/(this.respect+this.wanted)},M.prototype.processExperienceGains=function(e=1){for(var t=0;t<this.members.length;++t)this.members[t].gainExperience(e),this.members[t].updateSkillLevels()},M.prototype.calculatePower=function(){for(var e=0,t=0;t<this.members.length;++t)if(w.hasOwnProperty(this.members[t].task)&&"Territory Warfare"==this.members[t].task){e+=this.members[t].calculatePower()}return.015*this.getTerritory()*e},M.prototype.clash=function(e=!1){let t=.01;if(e&&(t/=2),e||(T[this.facName].power*=1/1.008),!(Math.random()<.65))for(let e=this.members.length-1;e>=0;--e){const n=this.members[e];if("Territory Warfare"!==n.task)continue;const a=t/Math.pow(n.def,.6);Math.random()<a&&this.killMember(n)}},M.prototype.killMember=function(e){this.facName;const t=this.respect,n=.05*t+e.earnedRespect;this.respect=Math.max(0,t-n);for(let t=0;t<this.members.length;++t)if(e.name===this.members[t].name){this.members.splice(t,1);break}this.notifyMemberDeath&&Object(u.dialogBoxCreate)(`${e.name} was killed in a gang clash! You lost ${n} respect`),_.routing.isOn(_.Page.Gang)&&this.displayGangMemberList()},M.prototype.ascendMember=function(e,t){try{const n=e.ascend();return this.respect=Math.max(1,this.respect-n.respect),null==t?Object(u.dialogBoxCreate)([`You ascended ${e.name}!`,"",`Your gang lost ${c.numeralWrapper.format(n.respect,"0.000a")} respect`,"",`${e.name} gained the following stat multipliers for ascending:`,`Hacking: ${c.numeralWrapper.format(n.hack,"0.000%")}`,`Strength: ${c.numeralWrapper.format(n.str,"0.000%")}`,`Defense: ${c.numeralWrapper.format(n.def,"0.000%")}`,`Dexterity: ${c.numeralWrapper.format(n.dex,"0.000%")}`,`Agility: ${c.numeralWrapper.format(n.agi,"0.000%")}`,`Charisma: ${c.numeralWrapper.format(n.cha,"0.000%")}`].join("<br>")):t.log(`Ascended Gang member ${e.name}`),_.routing.isOn(_.Page.Gang)&&this.displayGangMemberList(),n}catch(e){if(null!=t)throw e;Object(y.exceptionAlert)(e)}},M.prototype.getDiscount=function(){const e=this.getPower(),t=this.respect,n=Math.pow(t,.01)+t/5e6+Math.pow(e,.01)+e/1e6-1;return Math.max(1,n)},M.prototype.getAllTaskNames=function(){let e=[];const t=Object.keys(w);return e=this.isHackingGang?t.filter(e=>{let t=w[e];return null!=t&&("Unassigned"!==e&&t.isHacking)}):t.filter(e=>{let t=w[e];return null!=t&&("Unassigned"!==e&&t.isCombat)})},M.prototype.getAllUpgradeNames=function(){return Object.keys(R)},M.prototype.getUpgradeCost=function(e){return null==R[e]?1/0:R[e].getCost(this)},M.prototype.getUpgradeType=function(e){const t=R[e];if(null==t)return"";switch(t.type){case"w":return"Weapon";case"a":return"Armor";case"v":return"Vehicle";case"r":return"Rootkit";case"g":return"Augmentation";default:return""}},M.prototype.toJSON=function(){return Object(p.Generic_toJSON)("Gang",this)},M.fromJSON=function(e){return Object(p.Generic_fromJSON)(M,e.data)},p.Reviver.constructors.Gang=M,P.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},P.prototype.updateSkillLevels=function(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.hack_asc_mult),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.str_asc_mult),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.def_asc_mult),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.dex_asc_mult),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.agi_asc_mult),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.cha_asc_mult)},P.prototype.calculatePower=function(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95},P.prototype.assignToTask=function(e){return w.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)},P.prototype.unassignFromTask=function(){this.task="Unassigned"},P.prototype.getTask=function(){return this.task instanceof A&&(this.task=this.task.name),w.hasOwnProperty(this.task)?w[this.task]:w.Unassigned},P.prototype.calculateRespectGain=function(e){const t=this.getTask();if(null==t||!(t instanceof A)||0===t.baseRespect)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const a=Math.pow(100*T[e.facName].territory,t.territory.respect)/100;if(isNaN(a)||a<=0)return 0;var i=e.getWantedPenalty();return 11*t.baseRespect*n*a*i},P.prototype.calculateWantedLevelGain=function(e){const t=this.getTask();if(null==t||!(t instanceof A)||0===t.baseWanted)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const a=Math.pow(100*T[e.facName].territory,t.territory.wanted)/100;return isNaN(a)||a<=0?0:t.baseWanted<0?.5*t.baseWanted*n*a:7*t.baseWanted/Math.pow(3*n*a,.8)},P.prototype.calculateMoneyGain=function(e){const t=this.getTask();if(null==t||!(t instanceof A)||0===t.baseMoney)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const a=Math.pow(100*T[e.facName].territory,t.territory.money)/100;if(isNaN(a)||a<=0)return 0;var i=e.getWantedPenalty();return 5*t.baseMoney*n*a*i},P.prototype.gainExperience=function(e=1){const t=this.getTask();if(null==t||!(t instanceof A)||t===w.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e;this.hack_exp+=t.hackWeight/1500*n,this.str_exp+=t.strWeight/1500*n,this.def_exp+=t.defWeight/1500*n,this.dex_exp+=t.dexWeight/1500*n,this.agi_exp+=t.agiWeight/1500*n,this.cha_exp+=t.chaWeight/1500*n},P.prototype.recordEarnedRespect=function(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e},P.prototype.ascend=function(){const e=this.getAscensionResults(),t=e.hack,n=e.str,a=e.def,i=e.dex,r=e.agi,o=e.cha;this.hack_asc_mult+=t,this.str_asc_mult+=n,this.def_asc_mult+=a,this.dex_asc_mult+=i,this.agi_asc_mult+=r,this.cha_asc_mult+=o,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e<this.augmentations.length;++e){R[this.augmentations[e]].apply(this)}this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.updateSkillLevels();const s=this.earnedRespect;return this.earnedRespect=0,{respect:s,hack:t,str:n,def:a,dex:i,agi:r,cha:o}},P.prototype.getAscensionResults=function(){let e=1,t=1,n=1,a=1,i=1,r=1;for(let o=0;o<this.upgrades.length;++o){let s=R[this.upgrades[o]];null!=s.mults.hack&&(e*=s.mults.hack),null!=s.mults.str&&(t*=s.mults.str),null!=s.mults.def&&(n*=s.mults.def),null!=s.mults.dex&&(a*=s.mults.dex),null!=s.mults.agi&&(i*=s.mults.agi),null!=s.mults.cha&&(r*=s.mults.cha)}return{hack:.15*Math.max(0,e-1),str:.15*Math.max(0,t-1),def:.15*Math.max(0,n-1),dex:.15*Math.max(0,a-1),agi:.15*Math.max(0,i-1),cha:.15*Math.max(0,r-1)}},P.prototype.buyUpgrade=function(e,t,n){if("string"==typeof e&&(e=R[e]),!(e instanceof x))return!1;if(this.augmentations.includes(e.name)||this.upgrades.includes(e.name))return!1;if(t.money.lt(e.getCost(n)))return!1;if(t.loseMoney(e.getCost(n)),"g"===e.type?this.augmentations.push(e.name):this.upgrades.push(e.name),e.apply(this),_.routing.isOn(_.Page.Gang)&&N.gangMemberUpgradeBoxOpened){var a=N.gangMemberUpgradeBoxFilter.value.toString();n.createGangMemberUpgradeBox(t,a)}return!0},P.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMember",this)},P.fromJSON=function(e){return Object(p.Generic_fromJSON)(P,e.data)},p.Reviver.constructors.GangMember=P,A.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberTask",this)},A.fromJSON=function(e){return Object(p.Generic_fromJSON)(A,e.data)},p.Reviver.constructors.GangMemberTask=A;const w={};function x(e="",t=0,n="w",a={}){this.name=e,this.cost=t,this.type=n,this.mults=a,this.createDescription()}a.gangMemberTasksMetadata.forEach(e=>{!function(e,t,n,a,i){w[e]=new A(e,t,n,a,i)}(e.name,e.desc,e.isHacking,e.isCombat,e.params)}),x.prototype.getCost=function(e){const t=e.getDiscount();return this.cost/t},x.prototype.createDescription=function(){const e=["Increases:"];null!=this.mults.str&&e.push(`* Strength by ${Math.round(100*(this.mults.str-1))}%`),null!=this.mults.def&&e.push(`* Defense by ${Math.round(100*(this.mults.def-1))}%`),null!=this.mults.dex&&e.push(`* Dexterity by ${Math.round(100*(this.mults.dex-1))}%`),null!=this.mults.agi&&e.push(`* Agility by ${Math.round(100*(this.mults.agi-1))}%`),null!=this.mults.cha&&e.push(`* Charisma by ${Math.round(100*(this.mults.cha-1))}%`),null!=this.mults.hack&&e.push(`* Hacking by ${Math.round(100*(this.mults.hack-1))}%`),this.desc=e.join("<br>")},x.prototype.apply=function(e){null!=this.mults.str&&(e.str_mult*=this.mults.str),null!=this.mults.def&&(e.def_mult*=this.mults.def),null!=this.mults.dex&&(e.dex_mult*=this.mults.dex),null!=this.mults.agi&&(e.agi_mult*=this.mults.agi),null!=this.mults.cha&&(e.cha_mult*=this.mults.cha),null!=this.mults.hack&&(e.hack_mult*=this.mults.hack)},x.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberUpgrade",this)},x.fromJSON=function(e){return Object(p.Generic_fromJSON)(x,e.data)},p.Reviver.constructors.GangMemberUpgrade=x;const R={};i.gangMemberUpgradesMetadata.forEach(e=>{!function(e,t,n,a){R[e]=new x(e,t,n,a)}(e.name,e.cost,e.upgType,e.mults)}),M.prototype.createGangMemberUpgradeBox=function(e,t=""){const n="gang-member-upgrade-popup-box";if(N.gangMemberUpgradeBoxOpened){if(null==N.gangMemberUpgradeBoxElements||null==N.gangMemberUpgradeBox||null==N.gangMemberUpgradeBoxContent)return void console.error("Refreshing Gang member upgrade box throws error because required elements are null");for(var a=2;a<N.gangMemberUpgradeBoxElements.length;++a)Object(E.removeElement)(N.gangMemberUpgradeBoxElements[a]);N.gangMemberUpgradeBoxElements=[N.gangMemberUpgradeBoxFilter,N.gangMemberUpgradeBoxDiscount];var i=N.gangMemberUpgradeBoxFilter.value.toString();for(a=0;a<this.members.length;++a)if(this.members[a].name.indexOf(i)>-1||this.members[a].task.indexOf(i)>-1){var r=this.members[a].createGangMemberUpgradePanel(this,e);N.gangMemberUpgradeBoxContent.appendChild(r),N.gangMemberUpgradeBoxElements.push(r)}}else{N.gangMemberUpgradeBoxFilter=Object(d.createElement)("input",{type:"text",placeholder:"Filter gang members",value:t,onkeyup:()=>{var t=N.gangMemberUpgradeBoxFilter.value.toString();this.createGangMemberUpgradeBox(e,t)}}),N.gangMemberUpgradeBoxDiscount=Object(d.createElement)("p",{innerText:"Discount: -"+c.numeralWrapper.format(1-1/this.getDiscount(),"0.00%"),marginLeft:"6px",tooltip:"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts."}),N.gangMemberUpgradeBoxElements=[N.gangMemberUpgradeBoxFilter,N.gangMemberUpgradeBoxDiscount];for(i=N.gangMemberUpgradeBoxFilter.value.toString(),a=0;a<this.members.length;++a)(this.members[a].name.indexOf(i)>-1||this.members[a].task.indexOf(i)>-1)&&N.gangMemberUpgradeBoxElements.push(this.members[a].createGangMemberUpgradePanel(this,e));N.gangMemberUpgradeBox=Object(g.createPopup)(n,N.gangMemberUpgradeBoxElements),N.gangMemberUpgradeBoxContent=document.getElementById(n+"-content"),N.gangMemberUpgradeBoxOpened=!0}},P.prototype.createGangMemberUpgradePanel=function(e,t){var n=Object(d.createElement)("div",{border:"1px solid white"}),a=Object(d.createElement)("h1",{innerText:this.name+" ("+this.task+")"});n.appendChild(a);var i=Object(d.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+this.hack+" (x"+Object(f.formatNumber)(this.hack_mult*this.hack_asc_mult,2)+")\nStr: "+this.str+" (x"+Object(f.formatNumber)(this.str_mult*this.str_asc_mult,2)+")\nDef: "+this.def+" (x"+Object(f.formatNumber)(this.def_mult*this.def_asc_mult,2)+")\nDex: "+this.dex+" (x"+Object(f.formatNumber)(this.dex_mult*this.dex_asc_mult,2)+")\nAgi: "+this.agi+" (x"+Object(f.formatNumber)(this.agi_mult*this.agi_asc_mult,2)+")\nCha: "+this.cha+" (x"+Object(f.formatNumber)(this.cha_mult*this.cha_asc_mult,2)+")\n"});const r=[];function o(e){const t=R[e];null!=t?r.push(Object(d.createElement)("div",{class:"gang-owned-upgrade",innerText:e,tooltip:t.desc})):console.error(`Could not find GangMemberUpgrade object for name ${e}`)}for(const e of this.upgrades)o(e);for(const e of this.augmentations)o(e);var s=Object(d.createElement)("div",{class:"gang-owned-upgrades-div",innerText:"Purchased Upgrades:"});for(const e of r)s.appendChild(e);n.appendChild(i),n.appendChild(s),n.appendChild(Object(d.createElement)("br",{}));const l=[],u=[],p=[],m=[],h=[];for(let n in R)if(R.hasOwnProperty(n)){let a=R[n];if(t.money.lt(a.getCost(e)))continue;if(this.upgrades.includes(n)||this.augmentations.includes(n))continue;switch(a.type){case"w":l.push(a);break;case"a":u.push(a);break;case"v":p.push(a);break;case"r":m.push(a);break;case"g":h.push(a);break;default:console.error(`ERROR: Invalid Gang Member Upgrade Type: ${a.type}`)}}const g=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),_=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),y=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),b=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),v=Object(d.createElement)("div",{width:"20%",display:"inline-block"});g.appendChild(Object(d.createElement)("h2",{innerText:"Weapons"})),_.appendChild(Object(d.createElement)("h2",{innerText:"Armor"})),y.appendChild(Object(d.createElement)("h2",{innerText:"Vehicles"})),b.appendChild(Object(d.createElement)("h2",{innerText:"Rootkits"})),v.appendChild(Object(d.createElement)("h2",{innerText:"Augmentations"}));const E=[l,u,p,m,h],k=[g,_,y,b,v];for(let n=0;n<E.length;++n){let a=E[n],i=k[n];for(let r=0;r<a.length;++r){!function(n,a,i,r,o){let s={innerText:n.name+" - "+c.numeralWrapper.format(n.getCost(o),"$0.000a"),class:"a-link-button",margin:"2px",padding:"2px",display:"block",fontSize:"11px",clickListener:()=>(i.buyUpgrade(n,t,e),!1)};r>=3?s.tooltipleft=n.desc:s.tooltip=n.desc,a.appendChild(Object(d.createElement)("a",s))}(a[r],i,this,n,e)}}return n.appendChild(g),n.appendChild(_),n.appendChild(y),n.appendChild(b),n.appendChild(v),n};const N={gangContentCreated:!1,gangContainer:null,managementButton:null,territoryButton:null,gangManagementSubpage:null,gangTerritorySubpage:null,gangDesc:null,gangInfo:null,gangRecruitMemberButton:null,gangRecruitRequirementText:null,gangExpandAllButton:null,gangCollapseAllButton:null,gangMemberFilter:null,gangManageEquipmentButton:null,gangMemberList:null,gangMemberPanels:{},gangMemberUpgradeBoxOpened:!1,gangMemberUpgradeBox:null,gangMemberUpgradeBoxContent:null,gangMemberUpgradeBoxFilter:null,gangMemberUpgradeBoxDiscount:null,gangMemberUpgradeBoxElements:null,gangTerritoryDescText:null,gangTerritoryWarfareCheckbox:null,gangTerritoryWarfareCheckboxLabel:null,gangTerritoryWarfareClashChance:null,gangTerritoryDeathNotifyCheckbox:null,gangTerritoryDeathNotifyCheckboxLabel:null,gangTerritoryInfoText:null};M.prototype.displayGangContent=function(e){if(!N.gangContentCreated||null==N.gangContainer){N.gangContentCreated=!0,N.gangContainer=Object(d.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var t=this.facName;this.members,this.wanted,this.respect;N.gangContainer.appendChild(Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(r.Engine.loadFactionContent(),Object(l.a)(t),!1)})),N.managementButton=Object(d.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (Alt+1)",clickListener:()=>(N.gangManagementSubpage.style.display="block",N.gangTerritorySubpage.style.display="none",N.managementButton.classList.toggle("a-link-button-inactive"),N.managementButton.classList.toggle("a-link-button"),N.territoryButton.classList.toggle("a-link-button-inactive"),N.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),N.territoryButton=Object(d.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (Alt+2)",clickListener:()=>(N.gangManagementSubpage.style.display="none",N.gangTerritorySubpage.style.display="block",N.managementButton.classList.toggle("a-link-button-inactive"),N.managementButton.classList.toggle("a-link-button"),N.territoryButton.classList.toggle("a-link-button-inactive"),N.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),N.gangContainer.appendChild(N.managementButton),N.gangContainer.appendChild(N.territoryButton),N.gangManagementSubpage=Object(d.createElement)("div",{display:"block",id:"gang-management-subpage"});var n="";n=this.isHackingGang?"Ethical Hacking":"Vigilante Justice",N.gangDesc=Object(d.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.<br><br>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 '"+n+"' task to lower your wanted level. <br><br>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.<br><br>You can also manage your gang programmatically through Netscript using the Gang API"}),N.gangManagementSubpage.appendChild(N.gangDesc),N.gangInfo=Object(d.createElement)("p",{id:"gang-info",width:"70%"}),N.gangManagementSubpage.appendChild(N.gangInfo),N.gangRecruitMemberButton=Object(d.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{const e="recruit-gang-member-popup";let t;const n=Object(d.createElement)("p",{innerText:"Please enter a name for your new Gang member:"}),a=Object(d.createElement)("br"),i=Object(d.createElement)("input",{onkeyup:e=>{e.keyCode===m.KEY.ENTER&&t.click()},placeholder:"Name must be unique",type:"text"});t=Object(d.createElement)("a",{class:"std-button",clickListener:()=>{let t=i.value;return""===t?(Object(u.dialogBoxCreate)("You must enter a name for your Gang member!"),!1):this.canRecruitMember()?this.recruitMember(t)?(Object(k.removeElementById)(e),!1):(Object(u.dialogBoxCreate)("You already have a gang member with this name!"),!1):(Object(u.dialogBoxCreate)("You cannot recruit another Gang member!"),!1)},innerText:"Recruit Gang Member"});const r=Object(d.createElement)("a",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(e),!1),innerText:"Cancel"});Object(g.createPopup)(e,[n,a,i,t,r])}}),N.gangManagementSubpage.appendChild(N.gangRecruitMemberButton),N.gangRecruitRequirementText=Object(d.createElement)("p",{color:"red",id:"gang-recruit-requirement-text",margin:"10px"}),N.gangManagementSubpage.appendChild(N.gangRecruitRequirementText),N.gangManagementSubpage.appendChild(Object(d.createElement)("br",{})),N.gangExpandAllButton=Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=N.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")||n.click()}return!1}}),N.gangCollapseAllButton=Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Collapse All",clickListener:()=>{for(var e=N.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")&&n.click()}return!1}}),N.gangMemberFilter=Object(d.createElement)("input",{type:"text",placeholder:"Filter gang members",margin:"5px",padding:"5px",onkeyup:()=>{this.displayGangMemberList()}}),N.gangManageEquipmentButton=Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{this.createGangMemberUpgradeBox(e)}}),N.gangManagementSubpage.appendChild(N.gangExpandAllButton),N.gangManagementSubpage.appendChild(N.gangCollapseAllButton),N.gangManagementSubpage.appendChild(N.gangMemberFilter),N.gangManagementSubpage.appendChild(N.gangManageEquipmentButton),N.gangMemberList=Object(d.createElement)("ul",{id:"gang-member-list"}),this.displayGangMemberList(),N.gangManagementSubpage.appendChild(N.gangMemberList),N.gangTerritorySubpage=Object(d.createElement)("div",{id:"gang-territory-subpage",display:"none"}),N.gangTerritoryDescText=Object(d.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.<br><br>Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash<br><br>NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.<br><br>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.<br><br>"}),N.gangTerritorySubpage.appendChild(N.gangTerritoryDescText),N.gangTerritoryWarfareCheckbox=Object(d.createElement)("input",{display:"inline-block",id:"gang-management-territory-warfare-checkbox",changeListener:()=>{this.territoryWarfareEngaged=N.gangTerritoryWarfareCheckbox.checked},margin:"2px",type:"checkbox"}),N.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,N.gangTerritoryWarfareCheckboxLabel=Object(d.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-territory-warfare-checkbox",innerText:"Engage in Territory Warfare",tooltip:"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%"}),N.gangTerritorySubpage.appendChild(N.gangTerritoryWarfareCheckbox),N.gangTerritorySubpage.appendChild(N.gangTerritoryWarfareCheckboxLabel),N.gangTerritorySubpage.appendChild(Object(d.createElement)("br")),N.gangTerritoryWarfareClashChance=Object(d.createElement)("p",{display:"inline-block"}),N.gangTerritorySubpage.appendChild(N.gangTerritoryWarfareClashChance),N.gangTerritorySubpage.appendChild(Object(d.createElement)("div",{class:"help-tip",display:"inline-block",innerText:"?",clickListener:()=>{Object(u.dialogBoxCreate)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}})),N.gangTerritoryDeathNotifyCheckbox=Object(d.createElement)("input",{display:"inline-block",id:"gang-management-notify-member-death-checkbox",changeListener:()=>{this.notifyMemberDeath=N.gangTerritoryDeathNotifyCheckbox.checked},margin:"2px",type:"checkbox"}),N.gangTerritoryDeathNotifyCheckbox.checked=this.notifyMemberDeath,N.gangTerritoryDeathNotifyCheckboxLabel=Object(d.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-notify-member-death-checkbox",innerText:"Notify about Gang Member Deaths",tooltip:"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash."}),N.gangTerritorySubpage.appendChild(Object(d.createElement)("br")),N.gangTerritorySubpage.appendChild(N.gangTerritoryDeathNotifyCheckbox),N.gangTerritorySubpage.appendChild(N.gangTerritoryDeathNotifyCheckboxLabel),N.gangTerritorySubpage.appendChild(Object(d.createElement)("br"));var a=Object(d.createElement)("fieldset",{display:"block",margin:"6px",width:"50%"});N.gangTerritoryInfoText=Object(d.createElement)("p"),a.appendChild(N.gangTerritoryInfoText),N.gangTerritorySubpage.appendChild(a),N.gangContainer.appendChild(N.gangTerritorySubpage),N.gangContainer.appendChild(N.gangManagementSubpage),document.getElementById("entire-game-container").appendChild(N.gangContainer)}N.gangContainer.style.display="block",this.updateGangContent()},M.prototype.displayGangMemberList=function(){Object(v.removeChildrenFromElement)(N.gangMemberList),N.gangMemberPanels={};const e=this.members,t=N.gangMemberFilter.value.toString();for(var n=0;n<e.length;++n)(e[n].name.indexOf(t)>-1||e[n].task.indexOf(t)>-1)&&this.createGangMemberDisplayElement(e[n])},M.prototype.updateGangContent=function(){if(N.gangContentCreated)if(N.gangMemberUpgradeBoxOpened&&(N.gangMemberUpgradeBoxDiscount.childNodes[0].nodeValue="Discount: -"+c.numeralWrapper.format(1-1/this.getDiscount(),"0.00%")),"block"===N.gangTerritorySubpage.style.display){N.gangTerritoryWarfareClashChance.innerText=`Territory Clash Chance: ${c.numeralWrapper.format(this.territoryClashChance,"0.000%")}`,N.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,N.gangTerritoryInfoText.innerHTML="";const e=T[this.facName].power;for(const t in T)if(T.hasOwnProperty(t)){const n=T[t];let a,i=100*n.territory;if(a=i<=0?Object(f.formatNumber)(0,2):i>=100?Object(f.formatNumber)(100,2):Object(f.formatNumber)(i,2),t===this.facName){let e=`<b><u>${t}</u></b><br>Power: ${Object(f.formatNumber)(n.power,6)}<br>`;e+=`Territory: ${a}%<br><br>`,N.gangTerritoryInfoText.innerHTML+=e}else{const i=e/(n.power+e);let r=`<u>${t}</u><br>Power: ${Object(f.formatNumber)(n.power,6)}<br>`;r+=`Territory: ${a}%<br>`,r+=`Chance to win clash with this gang: ${c.numeralWrapper.format(i,"0.000%")}<br><br>`,N.gangTerritoryInfoText.innerHTML+=r}}}else{if(N.gangInfo instanceof Element){var e,t=s.Factions[this.facName];e=t instanceof o.Faction?t.playerReputation:"ERROR",Object(v.removeChildrenFromElement)(N.gangInfo),N.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:"Respect: "+Object(f.formatNumber)(this.respect,6)+" ("+Object(f.formatNumber)(5*this.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."})),N.gangInfo.appendChild(Object(d.createElement)("br")),N.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+Object(f.formatNumber)(this.wanted,6)+" ("+Object(f.formatNumber)(5*this.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."})),N.gangInfo.appendChild(Object(d.createElement)("br"));var n=this.getWantedPenalty();n=100*(1-n),N.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:`Wanted Level Penalty: -${Object(f.formatNumber)(n,2)}%`,tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),N.gangInfo.appendChild(Object(d.createElement)("br")),N.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:`Money gain rate: ${c.numeralWrapper.format(5*this.moneyGainRate,"$0.000a")} / sec`})),N.gangInfo.appendChild(Object(d.createElement)("br"));var a=100*T[this.facName].territory;let i;i=a<=0?Object(f.formatNumber)(0,2):a>=100?Object(f.formatNumber)(100,2):Object(f.formatNumber)(a,2),N.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:`Territory: ${Object(f.formatNumber)(i,3)}%`,tooltip:"The percentage of total territory your Gang controls"})),N.gangInfo.appendChild(Object(d.createElement)("br")),N.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:"Faction reputation: "+Object(f.formatNumber)(e,3)})),N.gangInfo.appendChild(Object(d.createElement)("br"));const l=1e3/r.Engine._idleSpeed;N.gangInfo.appendChild(Object(d.createElement)("p",{innerText:`Bonus time(s): ${this.storedCycles/l}`,display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed"})),N.gangInfo.appendChild(Object(d.createElement)("br"))}else console.error("gang-info DOM element DNE");const i=this.members.length,l=this.getRespectNeededToRecruitMember(),u=N.gangRecruitMemberButton;i>=30?(u.className="a-link-button-inactive",N.gangRecruitRequirementText.style.display="inline-block",N.gangRecruitRequirementText.innerHTML="You have reached the maximum amount of gang members"):this.canRecruitMember()?(u.className="a-link-button",N.gangRecruitRequirementText.style.display="none"):(u.className="a-link-button-inactive",N.gangRecruitRequirementText.style.display="inline-block",N.gangRecruitRequirementText.innerHTML=`${Object(f.formatNumber)(l,2)} respect needed to recruit next member`);for(let e=0;e<this.members.length;++e)this.updateGangMemberDisplayElement(this.members[e])}},M.prototype.createGangMemberDisplayElement=function(e){if(!N.gangContentCreated)return;const t=e.name;N.gangMemberPanels[t]={};var n=Object(h.createAccordionElement)({id:t+"gang-member",hdrText:t});const a=n[0],i=(n[1],n[2]);N.gangMemberPanels[t].panel=i;const r=Object(d.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-stats",tooltipsmall:[`Hk: x${c.numeralWrapper.format(e.hack_mult*e.hack_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.hack_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.hack_asc_mult,"0,0.00")} Asc)`,`St: x${c.numeralWrapper.format(e.str_mult*e.str_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.str_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.str_asc_mult,"0,0.00")} Asc)`,`Df: x${c.numeralWrapper.format(e.def_mult*e.def_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.def_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.def_asc_mult,"0,0.00")} Asc)`,`Dx: x${c.numeralWrapper.format(e.dex_mult*e.dex_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.dex_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.dex_asc_mult,"0,0.00")} Asc)`,`Ag: x${c.numeralWrapper.format(e.agi_mult*e.agi_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.agi_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.agi_asc_mult,"0,0.00")} Asc)`,`Ch: x${c.numeralWrapper.format(e.cha_mult*e.cha_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.cha_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.cha_asc_mult,"0,0.00")} Asc)`].join("<br>")});N.gangMemberPanels[t].statsDiv=r;const o=Object(d.createElement)("pre",{display:"inline",id:t+"gang-member-stats-text"}),s=Object(d.createElement)("br"),l=Object(d.createElement)("button",{class:"accordion-button",innerText:"Ascend",clickListener:()=>{const t=`gang-management-ascend-member ${e.name}`,n=e.getAscensionResults(),a=Object(d.createElement)("pre",{innerText:["Are you sure you want to ascend this member? (S)he will lose all of","his non-Augmentation upgrades and his/her stats will reset back to 1.","",`Furthermore, your gang will lose ${c.numeralWrapper.format(e.earnedRespect,"0.000000")} respect`,"","In return, (s)he will gain the following permanent boost to stat multipliers:\n",`Hacking: +${c.numeralWrapper.format(n.hack,"0.00%")}`,`Strength: +${c.numeralWrapper.format(n.str,"0.00%")}`,`Defense: +${c.numeralWrapper.format(n.def,"0.00%")}`,`Dexterity: +${c.numeralWrapper.format(n.dex,"0.00%")}`,`Agility: +${c.numeralWrapper.format(n.agi,"0.00%")}`,`Charisma: +${c.numeralWrapper.format(n.cha,"0.00%")}`].join("\n")}),i=Object(d.createElement)("button",{class:"std-button",clickListener:()=>(this.ascendMember(e),this.updateGangMemberDisplayElement(e),Object(k.removeElementById)(t),!1),innerText:"Ascend"}),r=Object(d.createElement)("button",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(t),!1),innerText:"Cancel"});Object(g.createPopup)(t,[a,i,r])}}),p=Object(d.createElement)("div",{class:"help-tip",clickListener:()=>{Object(u.dialogBoxCreate)(["Ascending a Gang Member resets the member's progress and stats in exchange","for a permanent boost to their stat multipliers.","<br><br>The additional stat multiplier that the Gang Member gains upon ascension","is based on the amount of multipliers the member has from non-Augmentation Equipment.","<br><br>Upon ascension, the member will lose all of its non-Augmentation Equipment and your","gang will lose respect equal to the total respect earned by the member."].join(" "))},innerText:"?",marginTop:"5px"});r.appendChild(o),r.appendChild(s),r.appendChild(l),r.appendChild(p);const m=Object(d.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task"}),_=Object(d.createElement)("select",{class:"dropdown",id:t+"gang-member-task-selector"});let f=this.getAllTaskNames();f.unshift("---");for(var y=0;y<f.length;++y){var b=document.createElement("option");b.text=f[y],_.add(b)}if(_.addEventListener("change",()=>{var t=_.options[_.selectedIndex].text;e.assignToTask(t),this.setGangMemberTaskDescription(e,t),this.updateGangContent()}),w.hasOwnProperty(e.task)){var v=e.task,E=0;for(let e=0;e<f.length;++e)if(v===f[e]){E=e;break}_.selectedIndex=E}var C=Object(d.createElement)("p",{id:t+"gang-member-gain-info"});m.appendChild(_),m.appendChild(C);var T=Object(d.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task-desc"}),O=Object(d.createElement)("p",{display:"inline",id:t+"gang-member-task-description"});T.appendChild(O),i.appendChild(r),i.appendChild(m),i.appendChild(T),N.gangMemberList.appendChild(a),this.setGangMemberTaskDescription(e,v),this.updateGangMemberDisplayElement(e)},M.prototype.updateGangMemberDisplayElement=function(e){if(!N.gangContentCreated)return;var t=e.name,n=document.getElementById(t+"gang-member-stats-text");n&&(n.innerText=[`Hacking: ${Object(f.formatNumber)(e.hack,0)} (${c.numeralWrapper.format(e.hack_exp,"(0.00a)")} exp)`,`Strength: ${Object(f.formatNumber)(e.str,0)} (${c.numeralWrapper.format(e.str_exp,"(0.00a)")} exp)`,`Defense: ${Object(f.formatNumber)(e.def,0)} (${c.numeralWrapper.format(e.def_exp,"(0.00a)")} exp)`,`Dexterity: ${Object(f.formatNumber)(e.dex,0)} (${c.numeralWrapper.format(e.dex_exp,"(0.00a)")} exp)`,`Agility: ${Object(f.formatNumber)(e.agi,0)} (${c.numeralWrapper.format(e.agi_exp,"(0.00a)")} exp)`,`Charisma: ${Object(f.formatNumber)(e.cha,0)} (${c.numeralWrapper.format(e.cha_exp,"(0.00a)")} exp)`].join("\n"));const a=N.gangMemberPanels[t];if(a){const t=a.statsDiv;t&&(t.firstChild.innerHTML=[`Hk: x${c.numeralWrapper.format(e.hack_mult*e.hack_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.hack_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.hack_asc_mult,"0,0.00")} Asc)`,`St: x${c.numeralWrapper.format(e.str_mult*e.str_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.str_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.str_asc_mult,"0,0.00")} Asc)`,`Df: x${c.numeralWrapper.format(e.def_mult*e.def_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.def_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.def_asc_mult,"0,0.00")} Asc)`,`Dx: x${c.numeralWrapper.format(e.dex_mult*e.dex_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.dex_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.dex_asc_mult,"0,0.00")} Asc)`,`Ag: x${c.numeralWrapper.format(e.agi_mult*e.agi_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.agi_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.agi_asc_mult,"0,0.00")} Asc)`,`Ch: x${c.numeralWrapper.format(e.cha_mult*e.cha_asc_mult,"0,0.00")}(x${c.numeralWrapper.format(e.cha_mult,"0,0.00")} Eq, x${c.numeralWrapper.format(e.cha_asc_mult,"0,0.00")} Asc)`].join("<br>"))}var i=document.getElementById(t+"gang-member-gain-info");i&&(i.innerHTML=[`Money: $ ${Object(f.formatNumber)(5*e.calculateMoneyGain(this),2)} / sec`,`Respect: ${Object(f.formatNumber)(5*e.calculateRespectGain(this),6)} / sec`,`Wanted Level: ${Object(f.formatNumber)(5*e.calculateWantedLevelGain(this),6)} / sec`,`Total Respect Earned: ${Object(f.formatNumber)(e.earnedRespect,6)}`].join("<br>"));const r=document.getElementById(t+"gang-member-task-selector");if(r){let t=this.getAllTaskNames();if(t.unshift("---"),w.hasOwnProperty(e.task)){const n=e.task;let a=0;for(let e=0;e<t.length;++e)if(n===t[e]){a=e;break}r.selectedIndex=a}}},M.prototype.setGangMemberTaskDescription=function(e,t){const n=e.name,a=document.getElementById(n+"gang-member-task-description");if(a){var i=w[t];null==i&&(i=w.Unassigned);var r=i.desc;a.innerHTML=r}},M.prototype.clearUI=function(){N.gangContainer instanceof Element&&Object(E.removeElement)(N.gangContainer);for(const e in N)N[e]=null;N.gangContentCreated=!1,N.gangMemberUpgradeBoxOpened=!1,N.gangMemberPanels={}}}).call(this,n(79))},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(36),r=n(8);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. To access the Bladeburner APIyou must be employed at the Bladeburner division, AND you must either be in BitNode-7 or 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}),t.getElementById=function(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find element with id '${e}'`);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),i=n(150),r=n(17);class o{constructor(e=""){this.alreadyInvited=!1,this.augmentations=[],this.favor=0,this.isBanned=!1,this.isMember=!1,this.name="",this.playerReputation=0,this.rolloverRep=0,this.name=e}static fromJSON(e){return r.Generic_fromJSON(o,e.data)}getInfo(){const e=i.FactionInfos[this.name];if(null==e)throw new Error(`Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`);return e}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2===e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);var e=0,t=this.playerReputation+this.rolloverRep;let n=a.CONSTANTS.FactionReputationToFavorBase*Math.pow(a.CONSTANTS.FactionReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=a.CONSTANTS.FactionReputationToFavorMult;return[e,t]}addAllAugmentations(e){this.augmentations.length=0;for(const t in e)e.hasOwnProperty(t)&&this.augmentations.push(t)}toJSON(){return r.Generic_toJSON("Faction",this)}}t.Faction=o,r.Reviver.constructors.Faction=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayToString=function(e){const t=[];for(let n=0;n<e.length;++n){let a=e[n];"string"==typeof a&&(a=`"${a}"`),t.push(a)}return`[${t.join(", ")}]`}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"b",function(){return postNetburnerText}),__webpack_require__.d(__webpack_exports__,"a",function(){return Terminal});var _Alias__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(51),_CodingContracts__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(49),_CodingContracts__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_1__),_Constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1),_Constants__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_2__),_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(30),_Programs_Programs__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(159),_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(92),_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_5__),_engine__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(11),_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(107),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(34),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__),_Hacking__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(56),_HelpText__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(141),_HelpText__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_HelpText__WEBPACK_IMPORTED_MODULE_10__),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(41),_Literature__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(108),_Message_Message__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(54),_Message_Message__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Message_Message__WEBPACK_IMPORTED_MODULE_13__),_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(65),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(39),_Player__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(0),_RedPill__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(77),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(118),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_Script_RunningScript__WEBPACK_IMPORTED_MODULE_18__),_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(59),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(62),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__),_Server_AllServers__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(23),_Server_AllServers__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_Server_AllServers__WEBPACK_IMPORTED_MODULE_21__),_Server_Server__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(74),_Server_Server__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_Server_Server__WEBPACK_IMPORTED_MODULE_22__),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(21),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__),_Settings_Settings__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(19),_Settings_Settings__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_Settings_Settings__WEBPACK_IMPORTED_MODULE_24__),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(40),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__),_TextFile__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(83),_TextFile__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_26__),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(64),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_27__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(7),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(12),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(31),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__),_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(81),_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_32__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(44),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_33__),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(70),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_34__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(122),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_35__),_utils_LogBox__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(102),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(25),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(10),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__),autosize__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(209),autosize__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_39__),jszip__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(208),jszip__WEBPACK_IMPORTED_MODULE_40___default=__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_40__),file_saver__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(207),file_saver__WEBPACK_IMPORTED_MODULE_41___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_41__);function postNetburnerText(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bitburner v"+_Constants__WEBPACK_IMPORTED_MODULE_2__.CONSTANTS.Version)}function isNumber(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.Page.Terminal)){var t=document.getElementById("terminal-input-text-box");if(null==t||e.ctrlKey||e.shiftKey||Terminal.contractOpen||t.focus(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.ENTER){e.preventDefault();var n=t.value;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("<span class='prompt'>["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_35__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().hostname+" ~]></span> "+n),n.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(n))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_6__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_6__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var a=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;(a<0||a>r)&&(Terminal.commandHistoryIndex=r),0!=a&&--Terminal.commandHistoryIndex;var i=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=i,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_27__.setTimeoutRef)(function(){t.selectionStart=t.selectionEnd=1e4},0)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;a=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((a<0||a>r)&&(Terminal.commandHistoryIndex=r),a==r||a==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;i=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=i}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.TAB){if(e.preventDefault(),null==t)return;var o=t.value;if(""==o)return;const a=o.lastIndexOf(";");-1!==a&&(o=o.slice(a+1));var s=(o=(o=o.trim()).replace(/\s\s+/g," ")).split(" "),l=s.length-2;l<-1&&(l=0);var c=determineAllPossibilitiesForTabCompletion(o,l);if(0==c.length)return;var u="";n="";if(0==s.length)return;1==s.length?n=s[0]:2==s.length?(n=s[0],u=s[1]):3==s.length?(n=s[0]+" "+s[1],u=s[2]):(u=s.pop(),n=s.join(" ")),tabCompletion(n,u,c),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;function tabCompletion(e,t,n,a=0){if(n.constructor!==Array)return;if(!Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.containsAllStrings)(n))return;if(""==t)for(var i=n.length-1;i>=0;--i)n[i].toLowerCase().startsWith(e.toLowerCase())||n.splice(i,1);else for(i=n.length-1;i>=0;--i)n[i].toLowerCase().startsWith(t.toLowerCase())||n.splice(i,1);const r=document.getElementById("terminal-input-text-box");if(null==r)return void console.warn("Couldn't find terminal input DOM element (id=terminal-input-text-box) when trying to autocomplete");const o=r.value.lastIndexOf(";");var s="";if(0!=n.length)if(1==n.length)s=""==t?n[0]+" ":e+" "+n[0],r.value=-1===o?s:r.value.slice(0,o+1)+" "+s,r.focus();else{var l=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_28__.longestCommonStart)(n),c="";for(i=0;i<n.length;++i)c+=n[i],c+=" ";""==t?l==e?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("> "+e),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(c)):(r.value=-1===o?l:r.value.slice(0,o+1)+" "+l,r.focus()):l==t?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("> "+e+" "+t),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(c)):(r.value=-1==o?e+" "+l:r.value.slice(0,o+1)+" "+e+" "+l,r.focus())}}function determineAllPossibilitiesForTabCompletion(e,t=0){var n=[];n=n.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_0__.b));var a=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();if((e=e.toLowerCase()).startsWith("./")&&-1==t){for(var i=0;i<a.scripts.length;++i)n.push("./"+a.scripts[i].filename);var r=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getHomeComputer();for(i=0;i<r.programs.length;++i)n.push("./"+r.programs[i]);return n}if(-1==t)return["alias","analyze","cat","check","clear","cls","connect","download","expr","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"].concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_0__.a)).concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_0__.b));if(e.startsWith("buy ")){let e=[];for(const t in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_5__.DarkWebItems){const n=_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_5__.DarkWebItems[t];e.push(n.program)}return e.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_0__.b))}if(e.startsWith("scp ")&&1==t)for(var o in _Server_AllServers__WEBPACK_IMPORTED_MODULE_21__.AllServers)_Server_AllServers__WEBPACK_IMPORTED_MODULE_21__.AllServers.hasOwnProperty(o)&&(n.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_21__.AllServers[o].ip),n.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_21__.AllServers[o].hostname));if(e.startsWith("scp ")&&0==t){for(i=0;i<a.scripts.length;++i)n.push(a.scripts[i].filename);for(i=0;i<a.messages.length;++i)a.messages[i]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_13__.Message||n.push(a.messages[i]);for(i=0;i<a.textFiles.length;++i)n.push(a.textFiles[i].fn)}if(e.startsWith("connect ")||e.startsWith("telnet ")){for(i=0;i<a.serversOnNetwork.length;++i){var s=_Server_AllServers__WEBPACK_IMPORTED_MODULE_21__.AllServers[a.serversOnNetwork[i]];null!=s&&(n.push(s.ip),n.push(s.hostname))}return n}if(e.startsWith("kill ")||e.startsWith("tail ")||e.startsWith("mem ")||e.startsWith("check ")){for(i=0;i<a.scripts.length;++i)n.push(a.scripts[i].filename);return n}if(e.startsWith("nano ")){for(i=0;i<a.scripts.length;++i)n.push(a.scripts[i].filename);for(i=0;i<a.textFiles.length;++i)n.push(a.textFiles[i].fn);return n.push(".fconf"),n}if(e.startsWith("rm ")){for(let e=0;e<a.scripts.length;++e)n.push(a.scripts[e].filename);for(let e=0;e<a.programs.length;++e)n.push(a.programs[e]);for(let e=0;e<a.messages.length;++e)a.messages[e]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_13__.Message||!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_33__.isString)(a.messages[e])||!a.messages[e].endsWith(".lit")||n.push(a.messages[e]);for(let e=0;e<a.textFiles.length;++e)n.push(a.textFiles[e].fn);for(let e=0;e<a.contracts.length;++e)n.push(a.contracts[e].fn);return n}if(e.startsWith("run ")){for(let e=0;e<a.scripts.length;++e)n.push(a.scripts[e].filename);r=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getHomeComputer();for(let e=0;e<r.programs.length;++e)n.push(r.programs[e]);for(let e=0;e<a.contracts.length;++e)n.push(a.contracts[e].fn);return n}if(e.startsWith("cat ")){for(i=0;i<a.messages.length;++i)a.messages[i]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_13__.Message?n.push(a.messages[i].filename):n.push(a.messages[i]);for(i=0;i<a.textFiles.length;++i)n.push(a.textFiles[i].fn);return n}if(e.startsWith("download ")){for(i=0;i<a.textFiles.length;++i)n.push(a.textFiles[i].fn);for(i=0;i<a.scripts.length;++i)n.push(a.scripts[i].filename)}return n}$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}}),$(document).keyup(function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_29__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_31__.KEY.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))});let Terminal={hackFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,resetTerminalInput:function(){_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML="<div id='terminal-input-header' class='prompt'>["+_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().hostname+' ~]$ </div><textarea type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',autosize__WEBPACK_IMPORTED_MODULE_39___default()(document.getElementById("terminal-input-text-box"))):document.getElementById("terminal-input-td").innerHTML="<div id='terminal-input-header' class='prompt'>["+_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().hostname+' ~]$ </div><input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',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.error("Exception in Terminal.modifyInput: "+e)}},moveTextCursor:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,a=t.selectionStart;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.warn("Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.error("Exception in Terminal.moveTextCursor: "+e)}},startHack:function(){Terminal.hackFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.d)(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer())/4,Terminal.startAction()},startAnalyze:function(){Terminal.analyzeFlag=!0,Terminal.actionTime=1,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Analyzing system..."),Terminal.startAction()},startAction:function(){Terminal.actionStarted=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.hackProgressPost)("Time left:"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.hackProgressBarPost)("["),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',$("input[class=terminal-input]").prop("disabled",!0)},finishAction:function(e=!1){Terminal.hackFlag?Terminal.finishHack(e):Terminal.analyzeFlag&&Terminal.finishAnalyze(e)},finishHack:function(e=!1){if(0==e){var t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer(),n=Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.b)(t),a=Math.random(),i=Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.c)(t),r=i/4;if(a<n){if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__.SpecialServerNames.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__.SpecialServerNames.WorldDaemon]==t.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_16__.a.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_16__.a.bitNodeN=1),void Object(_RedPill__WEBPACK_IMPORTED_MODULE_17__.a)(_Player__WEBPACK_IMPORTED_MODULE_16__.a.bitNodeN);t.manuallyHacked=!0;var o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.e)(t);(o=Math.floor(t.moneyAvailable*o))<=0&&(o=0),t.moneyAvailable-=o,_Player__WEBPACK_IMPORTED_MODULE_16__.a.gainMoney(o),_Player__WEBPACK_IMPORTED_MODULE_16__.a.recordMoneySource(o,"hacking"),_Player__WEBPACK_IMPORTED_MODULE_16__.a.gainHackingExp(i),_Player__WEBPACK_IMPORTED_MODULE_16__.a.gainIntelligenceExp(i/_Constants__WEBPACK_IMPORTED_MODULE_2__.CONSTANTS.IntelligenceTerminalHackBaseExpGain),t.fortify(_Constants__WEBPACK_IMPORTED_MODULE_2__.CONSTANTS.ServerFortifyAmount),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Hack successful! Gained "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(o,"($0,0.00)")+" and "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(i,"0.0000")+" hacking EXP")}else _Player__WEBPACK_IMPORTED_MODULE_16__.a.gainHackingExp(r),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Failed to hack "+t.hostname+". Gained "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(r,"0.0000")+" hacking EXP")}$("#hack-progress-bar").attr("id","old-hack-progress-bar"),$("#hack-progress").attr("id","old-hack-progress"),Terminal.resetTerminalInput(),$("input[class=terminal-input]").prop("disabled",!1),Terminal.hackFlag=!1},finishAnalyze:function(e=!1){if(0==e){let e=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(e.hostname+": "),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Organization name: "+e.organizationName);var t="";t=e.hasAdminRights?"YES":"NO",Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Root Access: "+t),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Required hacking skill: "+e.requiredHackingSkill),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Server security level: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(e.hackDifficulty,"0.000a")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Chance to hack: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.b)(e),"0.00%")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Time to hack: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.d)(e),"0.000")+" seconds"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Total money available on server: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(e.moneyAvailable,"$0,0.00")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Required number of open ports for NUKE: "+e.numOpenPortsRequired),e.sshPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SSH port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SSH port: Closed"),e.ftpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("FTP port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("FTP port: Closed"),e.smtpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SMTP port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SMTP port: Closed"),e.httpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("HTTP port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("HTTP port: Closed"),e.sqlPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SQL port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SQL port: Closed")}Terminal.analyzeFlag=!1,$("#hack-progress-bar").attr("id","old-hack-progress-bar"),$("#hack-progress").attr("id","old-hack-progress"),Terminal.resetTerminalInput(),$("input[class=terminal-input]").prop("disabled",!1)},executeCommands:function(e){e=(e=e.trim()).replace(/\s\s+/g," "),Terminal.commandHistory[Terminal.commandHistory.length-1]!=e&&(Terminal.commandHistory.push(e),Terminal.commandHistory.length>50&&Terminal.commandHistory.splice(0,1)),Terminal.commandHistoryIndex=Terminal.commandHistory.length,e=e.split(";");for(let t=0;t<e.length;t++)e[t].match(/^\s*$/)||Terminal.executeCommand(e[t].trim())},parseCommandArguments:function(e){let t="";const n=[];let a=0,i=0,r="";for(;i<e.length;){let o=!1;i>=1&&"\\"===(r=e.charAt(i-1))&&(o=!0);const s=e.charAt(i);if('"'===s)if(o||" "!==r)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(i+1,t-i-1)),a=i=t===e.length-1?t+1:t+2;continue}}else if("'"===s)if(o||" "!==r)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(i+1,t-i-1)),a=i=t===e.length-1?t+1:t+2;continue}}else if(" "===s&&""===t){let t=e.substr(a,i-a);isNumber(t)?n.push(parseFloat(t)):n.push(t),a=i+1}++i}if(a!==i){let t=e.substr(a,i-a);isNumber(t)?n.push(parseFloat(t)):n.push(t)}return n},executeCommand:function(command){command=Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.h)(command),command.startsWith("./")&&(command="run "+command.slice(2));var commandArray=Terminal.parseCommandArguments(command);if(0!=commandArray.length)if(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.a.isRunning){var foodnstuffServ=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.GetServerByHostname)("foodnstuff");if(null==foodnstuffServ)throw new Error("Could not get foodnstuff server");switch(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.a.currStep){case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalHelp:1===commandArray.length&&"help"==commandArray[0]?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(_HelpText__WEBPACK_IMPORTED_MODULE_10__.TerminalHelpText),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalLs:1===commandArray.length&&"ls"==commandArray[0]?(Terminal.executeListCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalScan:1===commandArray.length&&"scan"==commandArray[0]?(Terminal.executeScanCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalScanAnalyze1:1==commandArray.length&&"scan-analyze"==commandArray[0]?(Terminal.executeScanAnalyzeCommand(1),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalScanAnalyze2:2==commandArray.length&&"scan-analyze"==commandArray[0]&&2===commandArray[1]?(Terminal.executeScanAnalyzeCommand(2),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalConnect:if(2==commandArray.length){if("connect"!=commandArray[0]||"foodnstuff"!=commandArray[1]&&commandArray[1]!=foodnstuffServ.ip)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Wrong command! Try again!");_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_16__.a.currentServer=foodnstuffServ.ip,_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Connected to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalAnalyze:if(1===commandArray.length&&"analyze"===commandArray[0]){if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalNuke:2==commandArray.length&&"run"==commandArray[0]&&"NUKE.exe"==commandArray[1]?(foodnstuffServ.hasAdminRights=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("NUKE successful! Gained root access to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalManualHack:1==commandArray.length&&"hack"==commandArray[0]?(Terminal.startHack(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalCreateScript:2==commandArray.length&&"nano"==commandArray[0]&&"foodnstuff.script"==commandArray[1]?(_engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent("foodnstuff.script",""),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalFree:1==commandArray.length&&"free"==commandArray[0]?(Terminal.executeFreeCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.TerminalRunScript:2==commandArray.length&&"run"==commandArray[0]&&"foodnstuff.script"==commandArray[1]?(Terminal.runScript(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.d.ActiveScriptsToTerminal:if(2==commandArray.length&&"tail"==commandArray[0]&&"foodnstuff.script"==commandArray[1]){var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_19__.a)("foodnstuff.script",[],_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer());if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Error: No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_36__.a)(runningScript),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_11__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Bad command. Please follow the tutorial");break;default:return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var s=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();switch(commandArray[0].toLowerCase()){case"alias":if(1===commandArray.length)return void Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.f)();if(2===commandArray.length&&Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.e)(commandArray[1]))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`Set alias ${commandArray[1]}`);if(3===commandArray.length&&"-g"===commandArray[1]&&Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.e)(commandArray[2],!0))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`Set global alias ${commandArray[1]}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze();break;case"buy":_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__.SpecialServerIps.hasOwnProperty("Darkweb Server")?Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_4__.b)(commandArray):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");break;case"cat":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of cat command. Usage: cat [file]");let filename=commandArray[1];if(!filename.endsWith(".msg")&&!filename.endsWith(".lit")&&!filename.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");for(var i=0;i<s.messages.length;++i){if(filename.endsWith(".lit")&&s.messages[i]==filename)return void Object(_Literature__WEBPACK_IMPORTED_MODULE_12__.b)(s.messages[i]);if(filename.endsWith(".msg")&&s.messages[i].filename==filename)return void Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_14__.e)(s.messages[i])}for(var i=0;i<s.textFiles.length;++i)if(s.textFiles[i].fn===filename)return void s.textFiles[i].show();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)(`No such file ${filename}`);break;case"check":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{var scriptName=commandArray[1];if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(scriptName))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("tail can only be called on .script files (filename must end with .script)");let e=[];for(var i=2;i<commandArray.length;++i)e.push(commandArray[i]);var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_19__.a)(scriptName,e,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("No such script exists");runningScript.displayLog()}break;case"clear":case"cls":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of clear/cls command. Usage: clear/cls");$("#terminal tr:not(:last)").remove(),postNetburnerText();break;case"connect":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of connect command. Usage: connect [ip/hostname]");let ip=commandArray[1];for(var i=0;i<s.serversOnNetwork.length;i++)if(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServerOnNetwork)(s,i).ip==ip||Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServerOnNetwork)(s,i).hostname==ip)return void Terminal.connectToServer(ip);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Host not found");break;case"download":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of download command. Usage: download [script/text file]");var fn=commandArray[1];if("*"===fn||"*.script"===fn||"*.txt"===fn){var zip=new jszip__WEBPACK_IMPORTED_MODULE_40__;if("*"===fn||"*.script"===fn)for(var i=0;i<s.scripts.length;++i){var file=new Blob([s.scripts[i].code],{type:"text/plain"});zip.file(s.scripts[i].filename+".js",file)}if("*"===fn||"*.txt"===fn)for(var i=0;i<s.textFiles.length;++i){var file=new Blob([s.textFiles[i].text],{type:"text/plain"});zip.file(s.textFiles[i].fn,file)}let e;switch(fn){case"*.script":e="bitburnerScripts.zip";break;case"*.txt":e="bitburnerTexts.zip";break;default:e="bitburnerFiles.zip"}return void zip.generateAsync({type:"blob"}).then(function(t){file_saver__WEBPACK_IMPORTED_MODULE_41__.saveAs(t,e)})}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(fn)){for(var i=0;i<s.scripts.length;++i)if(s.scripts[i].filename===fn)return s.scripts[i].download()}else if(fn.endsWith(".txt")){var txtFile=Object(_TextFile__WEBPACK_IMPORTED_MODULE_26__.getTextFile)(fn,s);if(null!==txtFile)return txtFile.download()}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)(`${fn} does not exist`);break;case"expr":if(commandArray.length<=1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of expr command. Usage: expr [math expression]");let expr=commandArray.slice(1).join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,""),result;try{result=eval(sanitizedExpr)}catch(e){return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)(`Could not evaluate expression: ${sanitizedExpr}`)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(result);break;case"free":Terminal.executeFreeCommand(commandArray);break;case"hack":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of hack command. Usage: hack");_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):0==_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("You do not have admin rights for this machine! Cannot hack"):_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_16__.a.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):Terminal.startHack();break;case"help":if(1!==commandArray.length&&2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of help command. Usage: help");if(1===commandArray.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(_HelpText__WEBPACK_IMPORTED_MODULE_10__.TerminalHelpText);else{var cmd=commandArray[1],txt=_HelpText__WEBPACK_IMPORTED_MODULE_10__.HelpTexts[cmd];if(null==txt)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("No help topics match '"+cmd+"'");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(txt)}break;case"home":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of home command. Usage: home");_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_16__.a.currentServer=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getHomeComputer().ip,_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Connected to home"),Terminal.resetTerminalInput();break;case"hostname":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of hostname command. Usage: hostname");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().hostname);break;case"ifconfig":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of ifconfig command. Usage: ifconfig");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().ip);break;case"kill":Terminal.executeKillCommand(commandArray);break;case"killall":for(var i=s.runningScripts.length-1;i>=0;--i)Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_15__.d)(s.runningScripts[i],s.ip);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Killing all running scripts. May take up to a few minutes for the scripts to die...");break;case"ls":Terminal.executeListCommand(commandArray);break;case"lscpu":Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().cpuCores+" Core(s)");break;case"mem":Terminal.executeMemCommand(commandArray);break;case"nano":Terminal.executeNanoCommand(commandArray);break;case"ps":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of ps command. Usage: ps");for(let e=0;e<s.runningScripts.length;e++){let t=s.runningScripts[e],n=t.filename;for(let e=0;e<t.args.length;++e)n+=" "+t.args[e].toString();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(n)}break;case"rm":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect number of arguments. Usage: rm [program/script]");let delTarget=commandArray[1];if(delTarget.endsWith(".exe")){for(let e=0;e<s.programs.length;++e)if(s.programs[e]===delTarget)return void s.programs.splice(e,1)}else if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(delTarget)){for(let e=0;e<s.scripts.length;++e)if(s.scripts[e].filename===delTarget){for(let e=0;e<s.runningScripts.length;++e)if(s.runningScripts[e].filename==delTarget)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Cannot delete a script that is currently running!");return void s.scripts.splice(e,1)}}else if(delTarget.endsWith(".lit"))for(let e=0;e<s.messages.length;++e){let t=s.messages[e];if(!(t instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_13__.Message)&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_33__.isString)(t)&&t===delTarget)return void s.messages.splice(e,1)}else if(delTarget.endsWith(".txt")){for(let e=0;e<s.textFiles.length;++e)if(s.textFiles[e].fn===delTarget)return void s.textFiles.splice(e,1)}else if(delTarget.endsWith(".cct"))for(let e=0;e<s.contracts.length;++e)if(s.contracts[e].fn===delTarget)return void s.contracts.splice(e,1);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Error: No such file exists");break;case"run":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...");else{var executableName=commandArray[1];if("musicplayer"===executableName)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)('<iframe src="https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>',!1);Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(executableName)?Terminal.runScript(commandArray):executableName.endsWith(".cct")?Terminal.runContract(executableName):Terminal.runProgram(commandArray)}break;case"scan":Terminal.executeScanCommand(commandArray);break;case"scan-analyze":if(1===commandArray.length)Terminal.executeScanAnalyzeCommand(1);else{if(commandArray.length>3)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let e=!1;3===commandArray.length&&"-a"===commandArray[2]&&(e=!0);let t=parseInt(commandArray[1]);if(isNaN(t)||t<0)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(t>3&&!_Player__WEBPACK_IMPORTED_MODULE_16__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV1.name)&&!_Player__WEBPACK_IMPORTED_MODULE_16__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(t>5&&!_Player__WEBPACK_IMPORTED_MODULE_16__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(t>10)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 10");Terminal.executeScanAnalyzeCommand(t,e)}break;case"scp":Terminal.executeScpCommand(commandArray);break;case"sudov":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect number of arguments. Usage: sudov");s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("You have ROOT access to this machine"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("You do NOT have root access to this machine");break;case"tail":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...");else{let e=commandArray[1];if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("tail can only be called on .script files (filename must end with .script)");let t=[];for(var i=2;i<commandArray.length;++i)t.push(commandArray[i]);let n=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_19__.a)(e,t,s);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_36__.a)(n)}break;case"theme":let args=commandArray.slice(1);if(1!==args.length&&3!==args.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect number of arguments."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1===args.length){var themeName=args[0];if("default"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000"),document.body.style.setProperty("--my-prompt-color","#f92672");else if("muted"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=themeName)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.THEME_PROMPT_COLOR=document.body.style.getPropertyValue("--my-prompt-color")}else{var inputBackgroundHex=args[0],inputTextHex=args[1],inputHighlightHex=args[2];if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputBackgroundHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputTextHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputHighlightHex)))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",inputHighlightHex),document.body.style.setProperty("--my-font-color",inputTextHex),document.body.style.setProperty("--my-background-color",inputBackgroundHex),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_8__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color")}break;case"top":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of top command. Usage: top");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Script Threads RAM Usage");let currRunningScripts=s.runningScripts;for(let e=0;e<currRunningScripts.length;e++){let t=currRunningScripts[e],n=32-t.filename.length;n<0&&(n=0);let a=Array(n+1).join(" "),i=16-(t.threads+"").length,r=Array(i+1).join(" "),o=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(t.getRamUsage()*t.threads,"0.00")+" GB";var entry=[t.filename,a,t.threads,r,o];Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(entry.join(""))}break;case"unalias":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of unalias name. Usage: unalias [alias]");Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.g)(commandArray[1])?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`Removed alias ${commandArray[1]}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)(`No such alias exists: ${commandArray[1]}`);break;case"wget":if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of wget command. Usage: wget [url] [target file]");let url=commandArray[1],target=comanndArray[2];if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(target)&&!target.endsWith(".txt"))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("wget failed: Invalid target file. Target file must be script or text file");$.get(url,function(e){let t;return(t=Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(target)?s.writeToScriptFile(target,e):s.writeToTextFile(target,e)).success?t.overwritten?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`wget successfully retrieved content and overwrote ${target}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`wget successfully retrieved content to new file ${target}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("wget failed")},"text").fail(function(e){return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("wget failed: "+JSON.stringify(e))});break;default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)(`Command ${commandArray[0]} not found`)}}},connectToServer:function(e){var t=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServer)(e);null!=t?(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_16__.a.currentServer=t.ip,_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Connected to "+t.hostname),"darkweb"==_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().hostname&&Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_4__.a)(),Terminal.resetTerminalInput()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Invalid server. Connection failed.")},executeFreeCommand:function(e){1===e.length?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Total: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().maxRam,"0.00")+" GB"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Used: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().ramUsed,"0.00")+" GB"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Available: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().maxRam-_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().ramUsed,"0.00")+" GB")):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of free command. Usage: free")},executeKillCommand:function(e){if(e.length<2)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");const t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer(),n=e[1],a=[];for(let t=2;t<e.length;++t)a.push(e[t]);const i=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_19__.a)(n,a,t);null!=i?(Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_15__.d)(i,t.ip),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`Killing ${n}. May take up to a few seconds for the scripts to die...`)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("No such script is running. Nothing to kill")},executeListCommand:function(e){if(1!==e.length&&4!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of ls command. Usage: ls [| grep pattern]");var t=null;if(4===e.length){if("|"!==e[1]||"grep"!==e[2])return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of ls command. Usage: ls [| grep pattern]");" "!==e[3]&&(t=e[3])}var n=[];const a=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();for(const e of a.programs)t?e.includes(t)&&n.push(e):n.push(e);for(const e of a.scripts)t?e.filename.includes(t)&&n.push(e.filename):n.push(e.filename);for(const e of a.messages)t?e instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_13__.Message?e.filename.includes(t)&&n.push(e.filename):e.includes(t)&&n.push(e):e instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_13__.Message?n.push(e.filename):n.push(e);for(const e of a.textFiles)t?e.fn.includes(t)&&n.push(e.fn):n.push(e.fn);for(const e of a.contracts)t?e.fn.includes(t)&&n.push(e.fn):n.push(e.fn);n.sort();for(var i=0;i<n.length;i++)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(n[i])},executeMemCommand:function(e){if(2!==e.length&&4!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer(),n=e[1];let a=1;if(4===e.length&&"-t"===e[2]&&(a=Math.round(parseInt(e[3])),isNaN(a)||a<1))Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Invalid number of threads specified. Number of threads must be greater than 1");else{for(let e=0;e<t.scripts.length;++e)if(n===t.scripts[e].filename){const n=t.scripts[e].ramUsage*a;return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`This script requires ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(n,"0.00")} GB of RAM to run for ${a} thread(s)`)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("No such script exists!")}},executeNanoCommand:function(e){if(2!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of nano command. Usage: nano [scriptname]");const t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer(),n=e[1];if(".fconf"!==n){if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(n)){for(let e=0;e<t.scripts.length;e++)if(n==t.scripts[e].filename)return void _engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(n,t.scripts[e].code)}else{if(!n.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");for(let e=0;e<t.textFiles.length;++e)if(n===t.textFiles[e].fn)return void _engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(n,t.textFiles[e].text)}_engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(n)}else{let e=Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_7__.a)();_engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(n,e)}},executeScanCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of netstat/scan command. Usage: netstat/scan");const t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Hostname IP Root Access");for(let e=0;e<t.serversOnNetwork.length;e++){let n=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServerOnNetwork)(t,e);if(null==n)continue;let a,i=21-(n=n.hostname).length,r=Array(i+1).join(" ");n+=r,n+=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServerOnNetwork)(t,e).ip,a=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServerOnNetwork)(t,e).hasAdminRights?"Y":"N",i=21-Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServerOnNetwork)(t,e).ip.length,n+=r=Array(i+1).join(" "),n+=a,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(n)}},executeScanAnalyzeCommand:function(e=1,t=!1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(" ");var n={};for(const e in _Server_AllServers__WEBPACK_IMPORTED_MODULE_21__.AllServers)n[e]=0;var a=[],i=[0],r=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();for(a.push(r);0!=a.length;){var o=a.pop(),s=i.pop();if((t||!o.purchasedByPlayer||"home"==o.hostname)&&!(n[o.ip]||s>e)){n[o.ip]=1;for(var l=o.serversOnNetwork.length-1;l>=0;--l)a.push(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServerOnNetwork)(o,l)),i.push(s+1);if(0!=s){var c=Array(4*(s-1)+1).join("-");_Player__WEBPACK_IMPORTED_MODULE_16__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.AutoLink.name)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("<strong>"+c+"> <a class='scan-analyze-link'>"+o.hostname+"</a></strong>",!1):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("<strong>"+c+">"+o.hostname+"</strong>");var u=c+"--",p="NO";o.hasAdminRights&&(p="YES"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(u+"Root Access: "+p+", Required hacking skill: "+o.requiredHackingSkill),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(u+"Number of open ports required to NUKE: "+o.numOpenPortsRequired),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(u+"RAM: "+o.maxRam),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(" ")}}}var m=document.getElementsByClassName("scan-analyze-link");for(let e=0;e<m.length;++e)!function(){var t=m[e].innerHTML.toString();m[e].onclick=function(){Terminal.analyzeFlag||Terminal.hackFlag||Terminal.connectToServer(t)}}()},executeScpCommand(e){if(3!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const t=e[1];if(!t.endsWith(".lit")&&!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_20__.isScriptFilename)(t)&&!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("scp only works for scripts, text files (.txt), and literature files (.lit)");const n=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServer)(e[2]);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)(`Invalid destination. ${e[2]} not found`);n.ip;const a=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();if(t.endsWith(".lit")){for(var i=!1,r=0;r<a.messages.length;++r)if(!(a.messages[r]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_13__.Message)&&a.messages[r]==t){i=!0;break}if(!i)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("No such file exists!");for(r=0;r<n.messages.length;++r)if(n.messages[r]===t)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(t+" copied over to "+n.hostname);return n.messages.push(t),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(t+" copied over to "+n.hostname)}if(t.endsWith(".txt")){var o;for(i=!1,r=0;r<a.textFiles.length;++r)if(a.textFiles[r].fn===t){i=!0,o=a.textFiles[r];break}if(!i)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("No such file exists!");let e=n.writeToTextFile(o.fn,o.text);return e.success?e.overwritten?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`WARNING: ${t} already exists on ${n.hostname} and will be overwriten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`${t} overwritten on ${n.hostname}`)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`${t} copied over to ${n.hostname}`):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("scp failed")}let s=null;for(let e=0;e<a.scripts.length;++e)if(t==a.scripts[e].filename){s=a.scripts[e];break}if(null==s)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("scp() failed. No such script exists");let l=n.writeToScriptFile(t,s.code);if(l.success)return l.overwritten?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`WARNING: ${t} already exists on ${n.hostname} and will be overwritten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`${t} overwritten on ${n.hostname}`)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`${t} copied over to ${n.hostname}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("scp failed")},runProgram:function(e){if(e.length<2)return;const t=e[1];_Player__WEBPACK_IMPORTED_MODULE_16__.a.hasProgram(t)?Terminal.executeProgram(e):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){if(e.length<2)return;var t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();const n=e[1],a=e.slice(1),i={};i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.NukeProgram.name]=(e=>{if(!e.hasAdminRights)return e.openPortCount>=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("NUKE successful! Gained root access to "+_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer().hostname)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("NUKE unsuccessful. Not enough ports have been opened");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("You already have root access to this computer. There is no reason to run NUKE.exe")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.BruteSSHProgram.name]=(e=>{e.sshPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SSH Port (22) is already open!"):(e.sshPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Opened SSH Port(22)!"),e.openPortCount++)}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.FTPCrackProgram.name]=(e=>{e.ftpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Opened FTP Port (21)!"),e.openPortCount++)}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.RelaySMTPProgram.name]=(e=>{e.smtpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Opened SMTP Port (25)!"),e.openPortCount++)}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.HTTPWormProgram.name]=(e=>{e.httpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Opened HTTP Port (80)!"),e.openPortCount++)}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.SQLInjectProgram.name]=(e=>{e.sqlPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Opened SQL Port (1433)!"),e.openPortCount++)}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.ServerProfiler.name]=((e,t)=>{if(2!==t.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const n=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_23__.getServer)(t[1]);null!=n?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(n.hostname+":"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Server base security level: "+n.baseDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Server current security level: "+n.hackDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Server growth rate: "+n.serverGrowth),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Netscript hack() execution time: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.d)(n),"0.0")+"s"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Netscript grow() execution time: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.a)(n),"0.0")+"s"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Netscript weaken() execution time: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__.f)(n),"0.0")+"s")):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Invalid server IP/hostname")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.AutoLink.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("When using scan-analyze, click on a server's hostname to connect to it.")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV1.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV2.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.Flight.name]=(()=>{if(!(_Player__WEBPACK_IMPORTED_MODULE_16__.a.augmentations.length>=30&&_Player__WEBPACK_IMPORTED_MODULE_16__.a.money.gt(1e11)&&(_Player__WEBPACK_IMPORTED_MODULE_16__.a.hacking_skill>=2500||_Player__WEBPACK_IMPORTED_MODULE_16__.a.strength>=1500&&_Player__WEBPACK_IMPORTED_MODULE_16__.a.defense>=1500&&_Player__WEBPACK_IMPORTED_MODULE_16__.a.dexterity>=1500&&_Player__WEBPACK_IMPORTED_MODULE_16__.a.agility>=1500)))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Augmentations: "+_Player__WEBPACK_IMPORTED_MODULE_16__.a.augmentations.length+" / 30"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Money: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_16__.a.money.toNumber(),"($0.000a)")+" / "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_30__.numeralWrapper.format(1e11,"($0.000a)")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("One path below must be fulfilled..."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("----------HACKING PATH----------"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Hacking skill: "+_Player__WEBPACK_IMPORTED_MODULE_16__.a.hacking_skill+" / 2500"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("----------COMBAT PATH----------"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Strength: "+_Player__WEBPACK_IMPORTED_MODULE_16__.a.strength+" / 1500"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Defense: "+_Player__WEBPACK_IMPORTED_MODULE_16__.a.defense+" / 1500"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Dexterity: "+_Player__WEBPACK_IMPORTED_MODULE_16__.a.dexterity+" / 1500"),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Agility: "+_Player__WEBPACK_IMPORTED_MODULE_16__.a.agility+" / 1500");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("We will contact you."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("-- Daedalus --")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.BitFlume.name]=(()=>{const e=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__.yesNoBoxGetYesButton)(),t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__.yesNoBoxGetNoButton)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",function(){return Object(_RedPill__WEBPACK_IMPORTED_MODULE_17__.a)(_Player__WEBPACK_IMPORTED_MODULE_16__.a.bitNodeN,!0),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__.yesNoBoxClose)()}),t.addEventListener("click",function(){return Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__.yesNoBoxClose)()}),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_37__.yesNoBoxCreate)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.<br><br>Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.")}),i.hasOwnProperty(n)?i[n](t,a):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Invalid executable. Cannot be run")},runScript:function(e){if(e.length<2)return void dialogBoxCreate(`Bug encountered with Terminal.runScript(). Command array has a length of less than 2: ${e}`);const t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer();let n=1;const a=[],i=e[1];if(e.length>2)if(e.length>=4&&"-t"==e[2]){if(n=Math.round(parseFloat(e[3])),isNaN(n)||n<1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.postError)("Invalid number of threads specified. Number of threads must be greater than 0");for(let t=4;t<e.length;++t)a.push(e[t])}else for(let t=2;t<e.length;++t)a.push(e[t]);if(null==Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_19__.a)(i,a,t)){for(var r=0;r<t.scripts.length;r++)if(t.scripts[r].filename==i){var o=t.scripts[r],s=o.ramUsage*n,l=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Need root access to run script");if(s>l)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("This machine does not have enough RAM to run this script with "+n+" threads. Script requires "+s+"GB of RAM");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Running script with "+n+" thread(s) and args: "+Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_34__.arrayToString)(a)+"."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("May take a few seconds to start up the process...");var c=new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_18__.RunningScript(o,a);return c.threads=n,t.runningScripts.push(c),void Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_15__.c)(c,t)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("ERROR: No such script")}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("ERROR: This script is already running. Cannot run multiple instances")},runContract:async function(e){if(Terminal.contractOpen)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("ERROR: There's already a Coding Contract in Progress");const t=_Player__WEBPACK_IMPORTED_MODULE_16__.a.getCurrentServer(),n=t.getContract(e);if(null==n)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("ERROR: No such contract");switch(Terminal.contractOpen=!0,await n.prompt()){case _CodingContracts__WEBPACK_IMPORTED_MODULE_1__.CodingContractResult.Success:var a=_Player__WEBPACK_IMPORTED_MODULE_16__.a.gainCodingContractReward(n.reward,n.getDifficulty());Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`Contract SUCCESS - ${a}`),t.removeContract(n);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_1__.CodingContractResult.Failure:++n.tries,n.tries>=n.getMaxNumTries()?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing"),t.removeContract(n)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)(`Contract <p style='color:red;display:inline'>FAILED</p> - ${n.getMaxNumTries()-n.tries} tries remaining`);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_1__.CodingContractResult.Cancelled:default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_38__.post)("Contract cancelled")}Terminal.contractOpen=!1}}}).call(this,__webpack_require__(79))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return C}),n.d(t,"c",function(){return h}),n.d(t,"d",function(){return g}),n.d(t,"b",function(){return d});var a=n(1),i=n(11),r=n(53),o=n(0),s=n(9),l=n(22),c=n(81),u=n(7),p=n(15),m=n(44);n(338);let h=!1,d=null;function g(e,t){h=e,d=e?t:null}e(document).keydown(function(e){if(h&&d&&0!=d.selectedNode.length)switch(e.keyCode){case 65:d.actionButtons[0].click();break;case 83:d.actionButtons[1].click();break;case 87:d.actionButtons[2].click();break;case 70:d.actionButtons[3].click();break;case 82:d.actionButtons[4].click();break;case 68:d.actionButtons[5].click()}});let _={Core:"CPU Core Node",Firewall:"Firewall Node",Database:"Database Node",Spam:"Spam Node",Transfer:"Transfer Node",Shield:"Shield Node"},f="Attacking",y="Scanning",b="Weakening",v="Fortifying",E="Overflowing";function k(e,t){this.type=e,this.atk=t.atk?t.atk:0,this.def=t.def?t.def:0,this.hp=t.hp?t.hp:0,this.maxhp=this.hp,this.plyrCtrl=!1,this.enmyCtrl=!1,this.pos=[0,0],this.el=null,this.action=null,this.targetedCount=0,this.conn=null}function C(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var n=0;n<8;++n)for(var i=0;i<8;++i)this.availablePositions.push([n,i]);this.map=[];for(var r=0;r<8;++r)this.map.push([null,null,null,null,null,null,null,null]);this.jsplumbinstance=null,this.difficulty=e/a.CONSTANTS.HackingMissionRepToDiffConversion+1,console.log("difficulty: "+this.difficulty),this.reward=250+e/a.CONSTANTS.HackingMissionRepToRewardConversion}function T(e){e.selectedNode.length>0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}k.prototype.setPosition=function(e,t){this.pos=[e,t]},k.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"))},k.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"))},k.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive");switch(this.type){case _.Core:for(t=0;t<e.length;++t)e[t].classList.remove("a-link-button-inactive"),e[t].classList.add("a-link-button");break;case _.Transfer:e[1].classList.remove("a-link-button-inactive"),e[1].classList.add("a-link-button"),e[2].classList.remove("a-link-button-inactive"),e[2].classList.add("a-link-button"),e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button"),e[4].classList.remove("a-link-button-inactive"),e[4].classList.add("a-link-button"),e[5].classList.remove("a-link-button-inactive"),e[5].classList.add("a-link-button");break;case _.Shield:case _.Firewall:e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button")}}},k.prototype.deselect=function(e){this.el.classList.remove("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive")},k.prototype.untarget=function(){0!==this.targetedCount?--this.targetedCount:console.log("WARN: Node "+this.el.id+" is being 'untargeted' when it has no target count")},C.prototype.init=function(){this.createPageDom();for(var e=o.a.getHomeComputer(),t=0;t<e.cpuCores;++t){var n={atk:o.a.hacking_skill/7.5+30,def:o.a.hacking_skill/20,hp:o.a.hacking_skill/4};this.playerCores.push(new k(_.Core,n)),this.playerCores[t].setControlledByPlayer(),this.setNodePosition(this.playerCores[t],t,0),this.removeAvailablePosition(t,0)}var a=Math.min(8,Math.max(1,Math.round(this.difficulty/4))),i=Math.min(20,Object(p.getRandomInt)(Math.round(this.difficulty/3),Math.round(this.difficulty/3)+1)),r=Math.min(10,Object(p.getRandomInt)(1,Math.round(this.difficulty/3)+1)),s=a+i+r,l=7-Math.floor(s/8),u=Object(c.addOffset)(.8+this.difficulty/5,10);for(t=0;t<a;++t){n={atk:u*Object(p.getRandomInt)(80,86),def:u*Object(p.getRandomInt)(5,10),hp:u*Object(p.getRandomInt)(210,230)};this.enemyCores.push(new k(_.Core,n)),this.enemyCores[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyCores[t],l)}for(t=0;t<i;++t){n={atk:0,def:u*Object(p.getRandomInt)(10,20),hp:u*Object(p.getRandomInt)(275,300)};this.enemyNodes.push(new k(_.Firewall,n)),this.enemyNodes[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyNodes[t],l)}for(t=0;t<r;++t){n={atk:0,def:u*Object(p.getRandomInt)(30,55),hp:u*Object(p.getRandomInt)(210,275)};var m=new k(_.Database,n);m.setControlledByEnemy(),this.setNodeRandomPosition(m,l),this.enemyDatabases.push(m)}this.calculateDefenses(),this.calculateAttacks(),this.createMap()},C.prototype.createPageDom=function(){var e=document.getElementById("mission-container"),t=1+this.faction.favor/100,n=this.reward*o.a.faction_rep_mult*t,i=document.createElement("p");i.innerHTML="You are about to start a hacking mission! You will gain "+Object(u.formatNumber)(n,3)+" faction reputation with "+this.faction.name+" if you win. For more information about how hacking missions work, click one of the guide links below (one opens up an in-game guide and the other opens up the guide from the wiki). Click the 'Start' button to begin.",i.style.display="block",i.classList.add("hack-mission-header-element"),i.style.width="80%";var r=document.createElement("a");r.innerText="How to Play",r.classList.add("a-link-button"),r.style.display="inline-block",r.classList.add("hack-mission-header-element"),r.addEventListener("click",function(){return Object(s.dialogBoxCreate)(a.CONSTANTS.HackingMissionHowToPlay),!1});var l=document.createElement("a");l.innerText="Wiki Guide",l.classList.add("a-link-button"),l.style.display="inline-block",l.classList.add("hack-mission-header-element"),l.target="_blank";var c=document.createElement("a");c.innerHTML="Start",c.setAttribute("id","hack-mission-start-btn"),c.classList.add("a-link-button"),c.classList.add("hack-mission-header-element"),c.style.display="inline-block",c.addEventListener("click",()=>(this.start(),!1));var p=document.createElement("a");p.innerHTML="Forfeit Mission (Exit)",p.classList.add("a-link-button"),p.classList.add("hack-mission-header-element"),p.style.display="inline-block",p.addEventListener("click",()=>(this.finishMission(!1),!1));var m=document.createElement("p");m.setAttribute("id","hacking-mission-timer"),m.style.display="inline-block",m.style.margin="6px";var h=document.createElement("span");h.style.display="block",h.classList.add("hack-mission-action-buttons-container");for(var d=0;d<6;++d)this.actionButtons.push(document.createElement("a")),this.actionButtons[d].style.display="inline-block",this.actionButtons[d].classList.add("a-link-button-inactive"),this.actionButtons[d].classList.add("tooltip"),this.actionButtons[d].classList.add("hack-mission-header-element"),h.appendChild(this.actionButtons[d]);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 k=document.createElement("span");k.classList.add("tooltiptexthigh"),k.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(k),this.actionButtons[2].innerText="Weaken(w)";var C=document.createElement("span");C.classList.add("tooltiptexthigh"),C.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(C),this.actionButtons[3].innerText="Fortify(f)";var T=document.createElement("span");T.classList.add("tooltiptexthigh"),T.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(T),this.actionButtons[4].innerText="Overflow(r)";var O=document.createElement("span");O.classList.add("tooltiptexthigh"),O.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(O),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 M=document.createElement("p"),P=document.createElement("p");M.style.display="inline-block",P.style.display="inline-block",M.style.color="#00ccff",P.style.color="red",M.style.margin="4px",P.style.margin="4px",M.setAttribute("id","hacking-mission-player-stats"),P.setAttribute("id","hacking-mission-enemy-stats"),h.appendChild(M),h.appendChild(P),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===_.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!==_.Core&&e!==_.Transfer||(this.setActionButtonsActive(e),this.setActionButton(y,!1),this.selectedNode.forEach(function(e){e.action=y}))}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!==_.Core&&e!==_.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[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(v,!1),this.selectedNode.forEach(function(e){e.action=v})):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!==_.Core&&e!==_.Transfer||(this.setActionButtonsActive(e),this.setActionButton(E,!1),this.selectedNode.forEach(function(e){e.action=E}))}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=v}):console.log("ERR: Pressing Action button without selected node")});var A=document.createElement("p");e.appendChild(i),e.appendChild(r),e.appendChild(l),e.appendChild(c),e.appendChild(p),e.appendChild(m),e.appendChild(h),e.appendChild(A)},C.prototype.setActionButtonsInactive=function(){for(var e=0;e<this.actionButtons.length;++e)this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive")},C.prototype.setActionButtonsActive=function(e=null){for(var t=0;t<this.actionButtons.length;++t)this.actionButtons[t].classList.add("a-link-button"),this.actionButtons[t].classList.remove("a-link-button-inactive");if(e)switch(e){case _.Firewall:case _.Shield:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive"),this.actionButtons[1].classList.remove("a-link-button"),this.actionButtons[1].classList.add("a-link-button-inactive"),this.actionButtons[2].classList.remove("a-link-button"),this.actionButtons[2].classList.add("a-link-button-inactive"),this.actionButtons[4].classList.remove("a-link-button"),this.actionButtons[4].classList.add("a-link-button-inactive"),this.actionButtons[5].classList.remove("a-link-button"),this.actionButtons[5].classList.add("a-link-button-inactive");break;case _.Transfer:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive")}},C.prototype.setActionButton=function(e,t=!0){if(Object(m.isString)(e))switch(e){case f:e=0;break;case y:e=1;break;case b:e=2;break;case v:e=3;break;case E:default:e=4}t?(this.actionButtons[e].classList.remove("a-link-button-inactive"),this.actionButtons[e].classList.add("a-link-button")):(this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive"))},C.prototype.calculateAttacks=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].atk;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].atk;this.playerAtk=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(u.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].atk;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].atk;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].atk;this.enemyAtk=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(u.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},C.prototype.calculateDefenses=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].def;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].def;this.playerDef=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(u.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].def;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].def;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].def;this.enemyDef=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(u.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},C.prototype.removeAvailablePosition=function(e,t){for(var n=0;n<this.availablePositions.length;++n)if(this.availablePositions[n][0]===e&&this.availablePositions[n][1]===t)return void this.availablePositions.splice(n,1);console.log("WARNING: removeAvailablePosition() did not remove "+e+", "+t)},C.prototype.setNodePosition=function(e,t,n){if(e instanceof k){if(isNaN(t)||isNaN(n))return console.log("ERR: Invalid values passed as x and y for setNodePosition"),console.log(t),void console.log(n);e.pos=[t,n],this.map[t][n]=e}else console.log("WARNING: Non-Node object passed into setNodePOsition")},C.prototype.setNodeRandomPosition=function(e,t=0){var n=Object(p.getRandomInt)(0,this.availablePositions.length-1);if(this.availablePositions[n][1]<t)return this.setNodeRandomPosition(e,t);var a=this.availablePositions.splice(n,1);a=a[0],this.setNodePosition(e,a[0],a[1])},C.prototype.createMap=function(){var e=document.createElement("div");e.classList.add("hack-mission-grid"),e.setAttribute("id","hacking-mission-map"),document.getElementById("mission-container").appendChild(e);for(var t=(this.playerAtk+this.enemyAtk)/2,n=0;n<8;++n)for(var a=0;a<8;++a)if(!(this.map[n][a]instanceof k)){var i,r=Object(p.getRandomInt)(0,2),o=Object(c.addOffset)(.85+this.difficulty/2,15);switch(r){case 0:var s={atk:0,def:1.1*t+Object(p.getRandomInt)(15,45),hp:o*Object(p.getRandomInt)(200,225)};i=new k(_.Spam,s);break;case 1:s={atk:0,def:1.1*t+Object(p.getRandomInt)(15,45),hp:o*Object(p.getRandomInt)(250,275)};i=new k(_.Transfer,s);break;case 2:default:s={atk:0,def:1.1*t+Object(p.getRandomInt)(30,70),hp:o*Object(p.getRandomInt)(300,320)};i=new k(_.Shield,s)}this.setNodePosition(i,n,a),this.removeAvailablePosition(n,a),this.miscNodes.push(i)}for(var l=0;l<8;++l)for(var u=0;u<8;++u)this.createNodeDomElement(this.map[l][u]);for(var m=0;m<this.playerCores.length;++m)console.log("Configuring Player Node: "+this.playerCores[m].el.id),this.configurePlayerNodeElement(this.playerCores[m].el)},C.prototype.createNodeDomElement=function(e){var t=document.createElement("a"),n=document.createElement("p");e.el=t;var a,i="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1];switch(t.setAttribute("id",i),n.setAttribute("id",i+"-txt"),t.classList.add("hack-mission-node"),e.plyrCtrl?t.classList.add("hack-mission-player-node"):e.enmyCtrl&&t.classList.add("hack-mission-enemy-node"),e.type){case _.Core:a="CPU Core<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-cpu-node");break;case _.Firewall:a="Firewall<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-firewall-node");break;case _.Database:a="Database<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-database-node");break;case _.Spam:a="Spam<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-spam-node");break;case _.Transfer:a="Transfer<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-transfer-node");break;case _.Shield:default:a="Shield<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-shield-node")}a+="<br>Atk: "+Object(u.formatNumber)(e.atk,1)+"<br>Def: "+Object(u.formatNumber)(e.def,1),n.innerHTML=a,t.appendChild(n),document.getElementById("hacking-mission-map").appendChild(t)},C.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 _.Core:t="CPU Core<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case _.Firewall:t="Firewall<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case _.Database:t="Database<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case _.Spam:t="Spam<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case _.Transfer:t="Transfer<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case _.Shield:default:t="Shield<br>HP: "+Object(u.formatNumber)(e.hp,1)}t+="<br>Atk: "+Object(u.formatNumber)(e.atk,1)+"<br>Def: "+Object(u.formatNumber)(e.def,1),e.action&&(t+="<br>"+e.action),a.innerHTML=t}else console.log("ERR: Calling updateNodeDomElement on a Node without an element")},C.prototype.getNodeFromElement=function(e){var t=(Object(m.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]},C.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&&(T(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){T(e);var a=n.type;a===_.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)},C.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n<this.selectedNode.length;++n)if(this.selectedNode[n]==t){t.deselect(this.actionButtons),this.selectedNode.splice(n,1);break}},C.prototype.nodeReachable=function(e){var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].plyrCtrl)||(!!(t<7&&this.map[t+1][n].plyrCtrl)||(!!(n>0&&this.map[t][n-1].plyrCtrl)||!!(n<7&&this.map[t][n+1].plyrCtrl)))},C.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)))},C.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")},C.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t<this.playerCores.length;++t)e.makeSource(this.playerCores[t].el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyCores.length;++t)e.makeTarget(this.enemyCores[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyDatabases.length;++t)e.makeTarget(this.enemyDatabases[t].el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]});for(t=0;t<this.enemyNodes.length;++t)e.makeTarget(this.enemyNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.miscNodes.length;++t)e.makeTarget(this.miscNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});e.bind("click",(e,t)=>{if(!this.getNodeFromElement(e.source).enmyCtrl){var n=e.endpoints;n[0].detachFrom(n[1])}}),e.bind("connection",e=>{var t=this.getNodeFromElement(e.target);this.getNodeFromElement(e.source).enmyCtrl||(this.nodeReachable(t)?(this.getNodeFromElement(e.source).conn=e.connection,++(t=this.getNodeFromElement(e.target)).targetedCount):e.sourceEndpoint.detachFrom(e.targetEndpoint))}),e.bind("connectionDetached",(e,t)=>{this.getNodeFromElement(e.source).conn=null,this.getNodeFromElement(e.target).untarget()})},C.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])},C.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 O=0;C.prototype.process=function(e=1){if(this.started&&!((O+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,O)}),this.playerNodes.forEach(e=>{e.type!==_.Transfer&&e.type!==_.Shield&&e.type!==_.Firewall||(t|=this.processNode(e,O))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,O)}),this.enemyNodes.forEach(e=>{e.type!==_.Transfer&&e.type!==_.Shield&&e.type!==_.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,O))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*O,e.hp+=.1*O}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*O,e.maxhp+=.05*O,e.hp+=.1*O,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=O*i.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),O=0)):this.finishMission(!1):this.finishMission(!0)}},C.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.CONSTANTS.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 y:if(null==r)break;if(null==e.conn)break;var p=this.calculateScanEffect(i,n,l?o.a.hacking_skill:c);r.def-=p/5*t,s=!0;break;case b:if(null==r)break;if(null==e.conn)break;p=this.calculateWeakenEffect(i,n,l?o.a.hacking_skill:c);r.atk-=p/5*t,s=!0;break;case v:p=this.calculateFortifyEffect(o.a.hacking_skill);e.def+=p/5*t,s=!0;break;case E:p=this.calculateOverflowEffect(o.a.hacking_skill);if(e.def<p)break;e.def-=p/5*t,e.atk+=p/5*t,s=!0;break;default:console.log("ERR: Invalid Node Action: "+e.action)}if(e.atk<0&&(e.atk=0),e.def<0&&(e.def=0),r&&r.atk<0&&(r.atk=0),r&&r.def<0&&(r.def=0),r&&r.hp<=0){var m=e.plyrCtrl;r.hp=r.maxhp,r.action=null,r.conn=null,this.selectedNode==r&&r.deselect(this.actionButtons),r.atk/=2,r.def/=3.5;var h=!r.plyrCtrl&&!r.enmyCtrl;function d(e,t,n){for(var a=0;a<e.length;++a)if(e[a]==n){var i=e.splice(a,1);i=i[0],t.push(i);break}}switch(this.dropAllConnectionsToNode(r),this.dropAllConnectionsFromNode(r),m?(r.setControlledByPlayer(),this.jsplumbinstance.unmakeTarget(r.el),this.jsplumbinstance.makeSource(r.el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"})):(r.setControlledByEnemy(),e.conn=null,this.jsplumbinstance.unmakeSource(r.el),this.jsplumbinstance.makeTarget(r.el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]})),s=!0,r.type){case _.Core:m?(d(this.enemyCores,this.playerCores,r),this.configurePlayerNodeElement(r.el)):(d(this.playerCores,this.enemyCores,r),this.configureEnemyNodeElement(r.el));break;case _.Firewall:m?d(this.enemyNodes,this.playerNodes,r):(d(this.playerNodes,this.enemyNodes,r),this.configureEnemyNodeElement(r.el));break;case _.Database:m?d(this.enemyDatabases,this.playerNodes,r):d(this.playerNodes,this.enemyDatabases,r);break;case _.Spam:m?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,r),this.time+=a.CONSTANTS.HackingMissionSpamTimeIncrease):d(h?this.miscNodes:this.playerNodes,this.enemyNodes,r);break;case _.Transfer:m?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,r),this.playerCores.forEach(function(e){e.atk*=a.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configurePlayerNodeElement(r.el)):(d(h?this.miscNodes:this.playerNodes,this.enemyNodes,r),this.enemyCores.forEach(function(e){e.atk*=a.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configureEnemyNodeElement(r.el));break;case _.Shield:m?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,r),this.configurePlayerNodeElement(r.el)):(d(h?this.miscNodes:this.playerNodes,this.enemyNodes,r),this.configureEnemyNodeElement(r.el))}h&&this.miscNodes.forEach(e=>{0===e.targetedCount&&(e.def*=a.CONSTANTS.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),r&&this.updateNodeDomElement(r),s}},C.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case _.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(p.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(p.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(p.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=v}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=v:e.action=E:Math.abs(a.def-this.enemyAtk)<=15?e.action=y:e.action=f}break;case _.Transfer:e.def<125?e.action=v:e.action=E;break;case _.Firewall:case _.Shield:e.action=v}};C.prototype.calculateAttackDamage=function(e,t,n=0){return Math.max(.55*(e+n/80-t),1)},C.prototype.calculateScanEffect=function(e,t,n=0){return Math.max(.6*(e+n/25-.95*t),2)},C.prototype.calculateWeakenEffect=function(e,t,n=0){return Math.max(e+n/25-.95*t,2)},C.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},C.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},C.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},C.prototype.finishMission=function(e){if(h=!1,d=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.CONSTANTS.IntelligenceHackingMissionBaseExpGain),this.faction.playerReputation+=n}else Object(s.dialogBoxCreate)("Mission lost/forfeited! You did not gain any faction reputation.");for(var l=document.getElementById("mission-container");l.firstChild;)l.removeChild(l.firstChild);document.getElementById("mainmenu-container").style.visibility="visible",document.getElementById("character-overview-wrapper").style.visibility="visible",i.Engine.loadFactionContent(),Object(r.a)(this.faction.name)}}).call(this,n(79))},function(e,t,n){"use strict";n.d(t,"e",function(){return w}),n.d(t,"d",function(){return M}),n.d(t,"a",function(){return A}),n.d(t,"b",function(){return x}),n.d(t,"c",function(){return R});var a=n(16),i=n(13),r=n(101),o=n(5),s=n(20),l=n(1),c=n(14),u=n(50),p=n(39),m=n(0),h=n(115),d=n(94),g=n(118),_=(n(98),n(74),n(47)),f=n(19),y=n(95),b=n(9),v=n(99),E=(n(17),n(7)),k=n(100),C=n(4),T=n(44),O=n(33);function S(e){var t=e.name;i.Augmentations[t]=e}function M(){for(var e in c.Factions)c.Factions.hasOwnProperty(e)&&(c.Factions[e].augmentations=[]);Object(k.clearObject)(i.Augmentations);var t=new a.Augmentation({name:o.AugmentationNames.HemoRecirculator,moneyCost:9e6,repCost:4e3,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood.<br><br>This augmentation increases all of the player's combat stats by 8%.",strength_mult:1.08,defense_mult:1.08,agility_mult:1.08,dexterity_mult:1.08});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),x(o.AugmentationNames.HemoRecirculator)&&delete i.Augmentations[o.AugmentationNames.HemoRecirculator],S(t);var n=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's dexterity by 10%.",dexterity_mult:1.1});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.Targeting1)&&delete i.Augmentations[o.AugmentationNames.Targeting1],S(n);var r=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's dexterity by 20%.",prereqs:[o.AugmentationNames.Targeting1],dexterity_mult:1.2});r.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.Targeting2)&&delete i.Augmentations[o.AugmentationNames.Targeting2],S(r);var u=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's dexterity by 30%.",prereqs:[o.AugmentationNames.Targeting2],dexterity_mult:1.3});u.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),x(o.AugmentationNames.Targeting3)&&delete i.Augmentations[o.AugmentationNames.Targeting3],S(u);var p=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's agility and strength by 50%.",agility_mult:1.5,strength_mult:1.5});p.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),x(o.AugmentationNames.SyntheticHeart)&&delete i.Augmentations[o.AugmentationNames.SyntheticHeart],S(p);var h=new a.Augmentation({name:o.AugmentationNames.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'.<br><br>This augmentation increases the player's strength and defense by 30%.",strength_mult:1.3,defense_mult:1.3});h.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),x(o.AugmentationNames.SynfibrilMuscle)&&delete i.Augmentations[o.AugmentationNames.SynfibrilMuscle],S(h);var d=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's strength and defense by 10%.",strength_mult:1.1,defense_mult:1.1});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.CombatRib1)&&delete i.Augmentations[o.AugmentationNames.CombatRib1],S(d);var g=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's strength and defense by 14%.",prereqs:[o.AugmentationNames.CombatRib1],strength_mult:1.14,defense_mult:1.14});g.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(o.AugmentationNames.CombatRib2)&&delete i.Augmentations[o.AugmentationNames.CombatRib2],S(g);var _=new a.Augmentation({name:o.AugmentationNames.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<br><br>.This augmentation increases the player's strength and defense by 18%.",prereqs:[o.AugmentationNames.CombatRib2],strength_mult:1.18,defense_mult:1.18});_.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),x(o.AugmentationNames.CombatRib3)&&delete i.Augmentations[o.AugmentationNames.CombatRib3],S(_);var f=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's strength and defense by 20%.",strength_mult:1.2,defense_mult:1.2});f.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),x(o.AugmentationNames.NanofiberWeave)&&delete i.Augmentations[o.AugmentationNames.NanofiberWeave],S(f);var y=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's defense by 120%.",defense_mult:2.2});y.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),x(o.AugmentationNames.SubdermalArmor)&&delete i.Augmentations[o.AugmentationNames.SubdermalArmor],S(y);var b=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's agility and dexterity by 5%.",agility_mult:1.05,dexterity_mult:1.05});b.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),x(o.AugmentationNames.WiredReflexes)&&delete i.Augmentations[o.AugmentationNames.WiredReflexes],S(b);var v=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's strength and defense by 70%.",strength_mult:1.7,defense_mult:1.7});v.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),x(o.AugmentationNames.GrapheneBoneLacings)&&delete i.Augmentations[o.AugmentationNames.GrapheneBoneLacings],S(v);var E=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases all of the player's combat stats by 15%.",strength_mult:1.15,defense_mult:1.15,agility_mult:1.15,dexterity_mult:1.15});E.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(o.AugmentationNames.BionicSpine)&&delete i.Augmentations[o.AugmentationNames.BionicSpine],S(E);var C=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases all of the player's combat stats by 60%.",prereqs:[o.AugmentationNames.BionicSpine],strength_mult:1.6,defense_mult:1.6,agility_mult:1.6,dexterity_mult:1.6});C.addToFactions(["Fulcrum Secret Technologies","ECorp"]),x(o.AugmentationNames.GrapheneBionicSpine)&&delete i.Augmentations[o.AugmentationNames.GrapheneBionicSpine],S(C);var T=new a.Augmentation({name:o.AugmentationNames.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.<br><br>This augmentation increases the player's agility by 60%.",agility_mult:1.6});T.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(o.AugmentationNames.BionicLegs)&&delete i.Augmentations[o.AugmentationNames.BionicLegs],S(T);var O=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's agility by 150%.",prereqs:[o.AugmentationNames.BionicLegs],agility_mult:2.5});O.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),x(o.AugmentationNames.GrapheneBionicLegs)&&delete i.Augmentations[o.AugmentationNames.GrapheneBionicLegs],S(O);var M=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's charisma by 20%.",charisma_mult:1.2});M.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),x(o.AugmentationNames.SpeechProcessor)&&delete i.Augmentations[o.AugmentationNames.SpeechProcessor],S(M);let A=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's charisma and charisma experience gain rate by 15%.",charisma_mult:1.15,charisma_exp_mult:1.15});A.addToFactions(["Silhouette"]),x(o.AugmentationNames.TITN41Injection)&&delete i.Augmentations[o.AugmentationNames.TITN41Injection],S(A);var w=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's charisma and charisma experience gain rate by 60%.",charisma_mult:1.6,charisma_exp_mult:1.6});w.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),x(o.AugmentationNames.EnhancedSocialInteractionImplant)&&delete i.Augmentations[o.AugmentationNames.EnhancedSocialInteractionImplant],S(w);var R=new a.Augmentation({name:o.AugmentationNames.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.<br><br>This augmentation increases the player's hacking skill by 5%.",hacking_mult:1.05});R.addToFactions(["CyberSec","NiteSec"]),x(o.AugmentationNames.BitWire)&&delete i.Augmentations[o.AugmentationNames.BitWire],S(R);var N=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player's gains from hacking by 15%.<br>Increases the player's hacking skill by 12%.",hacking_speed_mult:1.03,hacking_money_mult:1.15,hacking_mult:1.12});N.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),x(o.AugmentationNames.ArtificialBioNeuralNetwork)&&delete i.Augmentations[o.AugmentationNames.ArtificialBioNeuralNetwork],S(N);var I=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 2% <br>Increases the player's hacking chance by 5%.<br>Increases the player's hacking experience gain rate by 5%.",hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_exp_mult:1.05});I.addToFactions(["The Black Hand","NiteSec"]),x(o.AugmentationNames.ArtificialSynapticPotentiation)&&delete i.Augmentations[o.AugmentationNames.ArtificialSynapticPotentiation],S(I);var L=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the player's hacking skill by 8%.<br>Increases the player's hacking experience gain rate by 10%.",hacking_speed_mult:1.03,hacking_exp_mult:1.1,hacking_mult:1.08});L.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),x(o.AugmentationNames.EnhancedMyelinSheathing)&&delete i.Augmentations[o.AugmentationNames.EnhancedMyelinSheathing],S(L);var D=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's hacking speed by 3%.",hacking_speed_mult:1.03});D.addToFactions(["CyberSec"]),x(o.AugmentationNames.SynapticEnhancement)&&delete i.Augmentations[o.AugmentationNames.SynapticEnhancement],S(D);var B=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's hacking experience gain rate by 25%.",hacking_exp_mult:1.25});B.addToFactions(["NiteSec"]),x(o.AugmentationNames.NeuralRetentionEnhancement)&&delete i.Augmentations[o.AugmentationNames.NeuralRetentionEnhancement],S(B);var W=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the amount of money the player gains from hacking by 25%.",hacking_money_mult:1.25});W.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),x(o.AugmentationNames.DataJack)&&delete i.Augmentations[o.AugmentationNames.DataJack],S(W);var j=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's hacking skill by 8%.",hacking_mult:1.08});j.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),x(o.AugmentationNames.ENM)&&delete i.Augmentations[o.AugmentationNames.ENM],S(j);var F=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player gains from hacking by 10%.<br>Increases the player's chance of successfully performing a hack by 3%.<br>Increases the player's hacking experience gain rate by 7%.<br>Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.03,hacking_money_mult:1.1,hacking_chance_mult:1.03,hacking_exp_mult:1.07,hacking_mult:1.07});F.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),x(o.AugmentationNames.ENMCore)&&delete i.Augmentations[o.AugmentationNames.ENMCore],S(F);var U=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 5%.<br>Increases the amount of money the player gains from hacking by 30%.<br>Increases the player's chance of successfully performing a hack by 5%.<br>Increases the player's hacking experience gain rate by 15%.<br>Increases the player's hacking skill by 8%.",prereqs:[o.AugmentationNames.ENMCore],hacking_speed_mult:1.05,hacking_money_mult:1.3,hacking_chance_mult:1.05,hacking_exp_mult:1.15,hacking_mult:1.08});U.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),x(o.AugmentationNames.ENMCoreV2)&&delete i.Augmentations[o.AugmentationNames.ENMCoreV2],S(U);var H=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 5%.<br>Increases the amount of money the player gains from hacking by 40%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking experience gain rate by 25%.<br>Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.ENMCoreV2],hacking_speed_mult:1.05,hacking_money_mult:1.4,hacking_chance_mult:1.1,hacking_exp_mult:1.25,hacking_mult:1.1});H.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(o.AugmentationNames.ENMCoreV3)&&delete i.Augmentations[o.AugmentationNames.ENMCoreV3],S(H);var G=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's hacking speed by 10%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.1});G.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(o.AugmentationNames.ENMAnalyzeEngine)&&delete i.Augmentations[o.AugmentationNames.ENMAnalyzeEngine],S(G);var K=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of money the player gains from hacking by 40%.<br>Increases the player's chance of successfully performing a hack by 20%.",prereqs:[o.AugmentationNames.ENM],hacking_money_mult:1.4,hacking_chance_mult:1.2});K.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(o.AugmentationNames.ENMDMA)&&delete i.Augmentations[o.AugmentationNames.ENMDMA],S(K);var q=new a.Augmentation({name:o.AugmentationNames.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking experience gain rate by 12%.",hacking_speed_mult:1.02,hacking_chance_mult:1.1,hacking_exp_mult:1.12});q.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),x(o.AugmentationNames.Neuralstimulator)&&delete i.Augmentations[o.AugmentationNames.Neuralstimulator],S(q);var $=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking experience gain rate by 15%.<br>Increases the amount of money the player gains from hacking by 20%.",hacking_mult:1.1,hacking_exp_mult:1.15,hacking_money_mult:1.2});$.addToFactions(["BitRunners"]),x(o.AugmentationNames.NeuralAccelerator)&&delete i.Augmentations[o.AugmentationNames.NeuralAccelerator],S($);var Y=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 1%.<br>Increases the player's hacking skill by 5%.",hacking_speed_mult:1.01,hacking_mult:1.05});Y.addToFactions(["CyberSec"]),x(o.AugmentationNames.CranialSignalProcessorsG1)&&delete i.Augmentations[o.AugmentationNames.CranialSignalProcessorsG1],S(Y);var z=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's chance of successfully performing a hack by 5%.<br>Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG1],hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_mult:1.07});z.addToFactions(["CyberSec","NiteSec"]),x(o.AugmentationNames.CranialSignalProcessorsG2)&&delete i.Augmentations[o.AugmentationNames.CranialSignalProcessorsG2],S(z);var V=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 15%.<br>Increases the player's hacking skill by 9%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG2],hacking_speed_mult:1.02,hacking_money_mult:1.15,hacking_mult:1.09});V.addToFactions(["NiteSec","The Black Hand","BitRunners"]),x(o.AugmentationNames.CranialSignalProcessorsG3)&&delete i.Augmentations[o.AugmentationNames.CranialSignalProcessorsG3],S(V);var J=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 20%.<br>Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG3],hacking_speed_mult:1.02,hacking_money_mult:1.2,hacking_grow_mult:1.25});J.addToFactions(["The Black Hand","BitRunners"]),x(o.AugmentationNames.CranialSignalProcessorsG4)&&delete i.Augmentations[o.AugmentationNames.CranialSignalProcessorsG4],S(J);var X=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking skill by 30%.<br>Increases the amount of money the player gains from hacking by 25%.<br>Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG4],hacking_mult:1.3,hacking_money_mult:1.25,hacking_grow_mult:1.75});X.addToFactions(["BitRunners"]),x(o.AugmentationNames.CranialSignalProcessorsG5)&&delete i.Augmentations[o.AugmentationNames.CranialSignalProcessorsG5],S(X);var Q=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking skill by 15%.<br>Increases the player's hacking experience gain rate by 10%.<br>Increases the player's hacking speed by 3%.",hacking_mult:1.15,hacking_exp_mult:1.1,hacking_speed_mult:1.03});Q.addToFactions(["Clarke Incorporated"]),x(o.AugmentationNames.NeuronalDensification)&&delete i.Augmentations[o.AugmentationNames.NeuronalDensification],S(Q);var Z=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the amount of reputation the player gains when working for a company by 20%.",company_rep_mult:1.2});Z.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Ishima","Clarke Incorporated","Four Sigma","Bachman & Associates"]),x(o.AugmentationNames.NuoptimalInjectorImplant)&&delete i.Augmentations[o.AugmentationNames.NuoptimalInjectorImplant],S(Z);var ee=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's charisma by 10%.<br>Increases the amount of reputation the player gains when working for a company by 10%.",company_rep_mult:1.1,charisma_mult:1.1});ee.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Bachman & Associates"]),x(o.AugmentationNames.SpeechEnhancement)&&delete i.Augmentations[o.AugmentationNames.SpeechEnhancement],S(ee);var te=new a.Augmentation({name:o.AugmentationNames.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.<br><br>This augmentation:<br>Increases all experience gains by 5%.<br>Increases the amount of money the player gains from working by 20%.<br>Increases the amount of reputation the player gains when working for a company by 10%.",hacking_exp_mult:1.05,strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,charisma_exp_mult:1.05,company_rep_mult:1.1,work_money_mult:1.2});te.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),x(o.AugmentationNames.FocusWire)&&delete i.Augmentations[o.AugmentationNames.FocusWire],S(te);var ne=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 30%.<br>Increases the player's hacking skill by 8%.",company_rep_mult:1.3,hacking_mult:1.08});ne.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),x(o.AugmentationNames.PCDNI)&&delete i.Augmentations[o.AugmentationNames.PCDNI],S(ne);var ae=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 75%.<br>Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:1.75,hacking_mult:1.1});ae.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),x(o.AugmentationNames.PCDNIOptimizer)&&delete i.Augmentations[o.AugmentationNames.PCDNIOptimizer],S(ae);var ie=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 100%.<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking speed by 5%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:2,hacking_mult:1.1,hacking_speed_mult:1.05});ie.addToFactions(["Fulcrum Secret Technologies"]),x(o.AugmentationNames.PCDNINeuralNetwork)&&delete i.Augmentations[o.AugmentationNames.PCDNINeuralNetwork],S(ie);var re=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 10% <br>Increases the amount of reputation the player gains for a faction by 10%.",company_rep_mult:1.1,faction_rep_mult:1.1});re.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),x(o.AugmentationNames.ADRPheromone1)&&delete i.Augmentations[o.AugmentationNames.ADRPheromone1],S(re);var oe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of reputation the player gains for a faction and company by 20%.",company_rep_mult:1.2,faction_rep_mult:1.2});oe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),x(o.AugmentationNames.ADRPheromone2)&&delete i.Augmentations[o.AugmentationNames.ADRPheromone2],S(oe);var se=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 15%.<br>Decreases the cost of purchasing a Hacknet Node by 15%.",hacknet_node_money_mult:1.15,hacknet_node_purchase_cost_mult:.85});se.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeCPUUpload)&&delete i.Augmentations[o.AugmentationNames.HacknetNodeCPUUpload],S(se);var le=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br> Increases the amount of money produced by Hacknet Nodes by 10%.<br>Decreases the cost of leveling up a Hacknet Node by 15%.",hacknet_node_money_mult:1.1,hacknet_node_level_cost_mult:.85});le.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeCacheUpload)&&delete i.Augmentations[o.AugmentationNames.HacknetNodeCacheUpload],S(le);var ce=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 10%.<br>Decreases the cost of purchasing a Hacknet Node by 10%.",hacknet_node_money_mult:1.1,hacknet_node_purchase_cost_mult:.9});ce.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeNICUpload)&&delete i.Augmentations[o.AugmentationNames.HacknetNodeNICUpload],S(ce);var ue=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 25%.",hacknet_node_money_mult:1.25});ue.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeKernelDNI)&&delete i.Augmentations[o.AugmentationNames.HacknetNodeKernelDNI],S(ue);var pe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 45%.",hacknet_node_money_mult:1.45});pe.addToFactions(["Netburners"]),x(o.AugmentationNames.HacknetNodeCoreDNI)&&delete i.Augmentations[o.AugmentationNames.HacknetNodeCoreDNI],S(pe);var me=new a.Augmentation({name:o.AugmentationNames.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.<br><br>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%.",hacking_chance_mult:1.01,hacking_speed_mult:1.01,hacking_money_mult:1.01,hacking_grow_mult:1.01,hacking_mult:1.01,strength_mult:1.01,defense_mult:1.01,dexterity_mult:1.01,agility_mult:1.01,charisma_mult:1.01,hacking_exp_mult:1.01,strength_exp_mult:1.01,defense_exp_mult:1.01,dexterity_exp_mult:1.01,agility_exp_mult:1.01,charisma_exp_mult:1.01,company_rep_mult:1.01,faction_rep_mult:1.01,crime_money_mult:1.01,crime_success_mult:1.01,hacknet_node_money_mult:1.01,hacknet_node_purchase_cost_mult:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.99,work_money_mult:1.01});let he=0;for(let e=0;e<m.a.augmentations.length;++e)m.a.augmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&(he=m.a.augmentations[e].level);me.level=he;let de=he;for(let e=0;e<m.a.queuedAugmentations.length;++e)m.a.queuedAugmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&++de;ut=Math.pow(l.CONSTANTS.NeuroFluxGovernorLevelMult,de),me.baseRepRequirement=500*ut*l.CONSTANTS.AugmentationRepMultiplier*s.BitNodeMultipliers.AugmentationRepCost,me.baseCost=75e4*ut*l.CONSTANTS.AugmentationCostMultiplier*s.BitNodeMultipliers.AugmentationMoneyCost,x(o.AugmentationNames.NeuroFluxGovernor)&&delete i.Augmentations[o.AugmentationNames.NeuroFluxGovernor],me.addToAllFactions(),S(me);var ge=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's experience gain rate for all stats by 10%.",hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});ge.addToFactions(["CyberSec"]),x(o.AugmentationNames.Neurotrainer1)&&delete i.Augmentations[o.AugmentationNames.Neurotrainer1],S(ge);var _e=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's experience gain rate for all stats by 15%.",hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});_e.addToFactions(["BitRunners","NiteSec"]),x(o.AugmentationNames.Neurotrainer2)&&delete i.Augmentations[o.AugmentationNames.Neurotrainer2],S(_e);var fe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's experience gain rate for all stats by 20%.",hacking_exp_mult:1.2,strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,charisma_exp_mult:1.2});fe.addToFactions(["NWO","Four Sigma"]),x(o.AugmentationNames.Neurotrainer3)&&delete i.Augmentations[o.AugmentationNames.Neurotrainer3],S(fe);var ye=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's dexterity by 40%.<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player gains from hacking by 10%.",dexterity_mult:1.4,hacking_speed_mult:1.03,hacking_money_mult:1.1});ye.addToFactions(["Blade Industries","KuaiGong International"]),x(o.AugmentationNames.Hypersight)&&delete i.Augmentations[o.AugmentationNames.Hypersight],S(ye);var be=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's agility by 5% <br>Increases the amount of money the player gains from crimes by 10%.",agility_mult:1.05,crime_money_mult:1.1});be.addToFactions(["Slum Snakes","Tetrads"]),x(o.AugmentationNames.LuminCloaking1)&&delete i.Augmentations[o.AugmentationNames.LuminCloaking1],S(be);var ve=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's agility by 10% <br>Increases the player's defense by 10% <br>Increases the amount of money the player gains from crimes by 25%.",prereqs:[o.AugmentationNames.LuminCloaking1],agility_mult:1.1,defense_mult:1.1,crime_money_mult:1.25});ve.addToFactions(["Slum Snakes","Tetrads"]),x(o.AugmentationNames.LuminCloaking2)&&delete i.Augmentations[o.AugmentationNames.LuminCloaking2],S(ve);var Ee=new a.Augmentation({name:o.AugmentationNames.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.<br><br>This augmentation:<br>Increases the player's dexterity by 10%.<br>Increases the player's dexterity experience gain rate by 15%.<br>Increases the amount of money the player gains from crimes by 25%.",dexterity_mult:1.1,dexterity_exp_mult:1.15,crime_money_mult:1.25});Ee.addToFactions(["Slum Snakes"]),x(o.AugmentationNames.SmartSonar)&&delete i.Augmentations[o.AugmentationNames.SmartSonar],S(Ee);var ke=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases all of the player's stats by 5%.<br>Increases the player's experience gain rate for all stats by 10%.",hacking_mult:1.05,strength_mult:1.05,defense_mult:1.05,dexterity_mult:1.05,agility_mult:1.05,charisma_mult:1.05,hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});ke.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),x(o.AugmentationNames.PowerRecirculator)&&delete i.Augmentations[o.AugmentationNames.PowerRecirculator],S(ke);var Ce=new a.Augmentation({name:o.AugmentationNames.QLink,repCost:75e4,moneyCost:5e12,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.<br><br>This augmentation:<br>Increases the player's hacking skill by 75%.<br>Increases the player's hacking speed by 100%.<br>Increases the player's chance of successfully performing a hack by 150%.<br>Increases the amount of money the player gains from hacking by 300%.",hacking_mult:1.75,hacking_speed_mult:2,hacking_chance_mult:2.5,hacking_money_mult:4});Ce.addToFactions(["Illuminati"]),x(o.AugmentationNames.QLink)&&delete i.Augmentations[o.AugmentationNames.QLink],S(Ce);var Te=new a.Augmentation({name:o.AugmentationNames.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Te.addToFactions(["Daedalus"]),x(o.AugmentationNames.TheRedPill)&&delete i.Augmentations[o.AugmentationNames.TheRedPill],S(Te);var Oe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases all of the player's combat stats by 75%.<br>Increases the player's hacking skill by 15%.",strength_mult:1.75,defense_mult:1.75,dexterity_mult:1.75,agility_mult:1.75,hacking_mult:1.15});Oe.addToFactions(["The Covenant"]),x(o.AugmentationNames.SPTN97)&&delete i.Augmentations[o.AugmentationNames.SPTN97],S(Oe);var Se=new a.Augmentation({name:o.AugmentationNames.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.",hacking_grow_mult:3});Se.addToFactions(["ECorp"]),x(o.AugmentationNames.HiveMind)&&delete i.Augmentations[o.AugmentationNames.HiveMind],S(Se);var Me=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases all of the player's combat stats by 35%.<br>Increases all of the player's combat stat experience gain rate by 35%.",strength_mult:1.35,defense_mult:1.35,dexterity_mult:1.35,agility_mult:1.35,strength_exp_mult:1.35,defense_exp_mult:1.35,dexterity_exp_mult:1.35,agility_exp_mult:1.35});Me.addToFactions(["MegaCorp"]),x(o.AugmentationNames.CordiARCReactor)&&delete i.Augmentations[o.AugmentationNames.CordiARCReactor],S(Me);var Pe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's charisma by 50%. <br>Increases the player's charisma experience gain rate by 50%.<br>Increases the amount of reputation the player gains for a company by 25%.<br>Increases the amount of reputation the player gains for a faction by 25%.",charisma_mult:1.5,charisma_exp_mult:1.5,company_rep_mult:1.25,faction_rep_mult:1.25});Pe.addToFactions(["Bachman & Associates"]),x(o.AugmentationNames.SmartJaw)&&delete i.Augmentations[o.AugmentationNames.SmartJaw],S(Pe);var Ae=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's strength and defense by 55%.",strength_mult:1.55,defense_mult:1.55});Ae.addToFactions(["Blade Industries"]),x(o.AugmentationNames.Neotra)&&delete i.Augmentations[o.AugmentationNames.Neotra],S(Ae);var we=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases all of the player's stats by 20%.<br>Increases the player's experience gain rate for all stats by 15%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});we.addToFactions(["NWO"]),x(o.AugmentationNames.Xanipher)&&delete i.Augmentations[o.AugmentationNames.Xanipher],S(we);var xe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases all of the player's stats by 20%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2});xe.addToFactions(["Clarke Incorporated"]),x(o.AugmentationNames.nextSENS)&&delete i.Augmentations[o.AugmentationNames.nextSENS],S(xe);var Re=new a.Augmentation({name:o.AugmentationNames.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.<br><br>This augmentation:<br>Increases the player's hacking skill by 20%.<br>Increases the player's hacking experience gain rate by 25%.",hacking_mult:1.2,hacking_exp_mult:1.25});Re.addToFactions(["OmniTek Incorporated"]),x(o.AugmentationNames.OmniTekInfoLoad)&&delete i.Augmentations[o.AugmentationNames.OmniTekInfoLoad],S(Re);var Ne=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's strength, defense, and agility by 40%.",strength_mult:1.4,defense_mult:1.4,agility_mult:1.4});Ne.addToFactions(["KuaiGong International"]),x(o.AugmentationNames.PhotosyntheticCells)&&delete i.Augmentations[o.AugmentationNames.PhotosyntheticCells],S(Ne);var Ie=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's hacking skill by 15%.<br>Increases the player's hacking experience gain rate by 20%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking speed by 5%.<br>Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset.",hacking_mult:1.15,hacking_exp_mult:1.2,hacking_chance_mult:1.1,hacking_speed_mult:1.05});Ie.addToFactions(["BitRunners"]),x(o.AugmentationNames.Neurolink)&&delete i.Augmentations[o.AugmentationNames.Neurolink],S(Ie);var Le=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's strength and dexterity by 15%.<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 10%.",strength_mult:1.15,dexterity_mult:1.15,hacking_mult:1.1,hacking_speed_mult:1.02,hacking_money_mult:1.1});Le.addToFactions(["The Black Hand"]),x(o.AugmentationNames.TheBlackHand)&&delete i.Augmentations[o.AugmentationNames.TheBlackHand],S(Le);var De=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Improves the player's hacking skill by 8%.<br>Improves the player's hacking experience gain rate by 15%.",hacking_mult:1.08,hacking_exp_mult:1.15});De.addToFactions(["NiteSec"]),x(o.AugmentationNames.CRTX42AA)&&delete i.Augmentations[o.AugmentationNames.CRTX42AA],S(De);var Be=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's hacking experience gain rate by 40%.",hacking_exp_mult:1.4});Be.addToFactions(["Chongqing"]),x(o.AugmentationNames.Neuregen)&&delete i.Augmentations[o.AugmentationNames.Neuregen],S(Be);var We=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Lets the player start with $1,000,000 after a reset.<br>Lets the player start with the BruteSSH.exe program after a reset."});We.addToFactions(["Sector-12"]),x(o.AugmentationNames.CashRoot)&&delete i.Augmentations[o.AugmentationNames.CashRoot],S(We);var je=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's experience gain rate for all combat stats by 20%.",strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2});je.addToFactions(["New Tokyo"]),x(o.AugmentationNames.NutriGen)&&delete i.Augmentations[o.AugmentationNames.NutriGen],S(je);var Fe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's crime success rate by 25%.<br>Increases the amount of money the player gains from crimes by 10%.<br>Increases the player's dexterity by 10%.",crime_success_mult:1.25,crime_money_mult:1.1,dexterity_mult:1.1});Fe.addToFactions(["Ishima"]),x(o.AugmentationNames.INFRARet)&&delete i.Augmentations[o.AugmentationNames.INFRARet],S(Fe);var Ue=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's defense by 40%.",defense_mult:1.4});Ue.addToFactions(["Volhaven"]),x(o.AugmentationNames.DermaForce)&&delete i.Augmentations[o.AugmentationNames.DermaForce],S(Ue);var He=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's strength and defense by 40%.<br>Increases the player's crime success rate by 10%.<br>Increases the amount of money the player gains from crimes by 30%.",prereqs:[o.AugmentationNames.BrachiBlades],strength_mult:1.4,defense_mult:1.4,crime_success_mult:1.1,crime_money_mult:1.3});He.addToFactions(["Speakers for the Dead"]),x(o.AugmentationNames.GrapheneBrachiBlades)&&delete i.Augmentations[o.AugmentationNames.GrapheneBrachiBlades],S(He);var Ge=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation increases the player's strength and dexterity by 85%.",prereqs:[o.AugmentationNames.BionicArms],strength_mult:1.85,dexterity_mult:1.85});Ge.addToFactions(["The Dark Army"]),x(o.AugmentationNames.GrapheneBionicArms)&&delete i.Augmentations[o.AugmentationNames.GrapheneBionicArms],S(Ge);var Ke=new a.Augmentation({name:o.AugmentationNames.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.<br><br>This augmentation:<br>Increases the player's strength and defense by 15%.<br>Increases the player's crime success rate by 10%.<br>Increases the amount of money the player gains from crimes by 15%.",strength_mult:1.15,defense_mult:1.15,crime_success_mult:1.1,crime_money_mult:1.15});Ke.addToFactions(["The Syndicate"]),x(o.AugmentationNames.BrachiBlades)&&delete i.Augmentations[o.AugmentationNames.BrachiBlades],S(Ke);var qe=new a.Augmentation({name:o.AugmentationNames.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.<br><br>This augmentation increases the user's strength and dexterity by 30%.",strength_mult:1.3,dexterity_mult:1.3});qe.addToFactions(["Tetrads"]),x(o.AugmentationNames.BionicArms)&&delete i.Augmentations[o.AugmentationNames.BionicArms],S(qe);var $e=new a.Augmentation({name:o.AugmentationNames.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.<br><br>This augmentation:<br>Increases the amount of money the player earns at a company by 10%.<br>Increases the amount of reputation the player gains when working for a company or faction by 15%.",work_money_mult:1.1,company_rep_mult:1.15,faction_rep_mult:1.15});$e.addToFactions(["Tian Di Hui"]),x(o.AugmentationNames.SNA)&&delete i.Augmentations[o.AugmentationNames.SNA],S($e),2===m.a.bitNodeN&&(console.log("Adding all augmentations to crime factions for Bit node 2"),c.Factions["Slum Snakes"].addAllAugmentations(i.Augmentations),c.Factions.Tetrads.addAllAugmentations(i.Augmentations),c.Factions["The Syndicate"].addAllAugmentations(i.Augmentations),c.Factions["The Dark Army"].addAllAugmentations(i.Augmentations),c.Factions["Speakers for the Dead"].addAllAugmentations(i.Augmentations),c.Factions.NiteSec.addAllAugmentations(i.Augmentations),c.Factions["The Black Hand"].addAllAugmentations(i.Augmentations));if(Object(c.factionExists)("Bladeburners")){var Ye=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.<br>Increases the player's dexterity by 5%.",bladeburner_success_chance_mult:1.03,dexterity_mult:1.05});Ye.addToFactions(["Bladeburners"]),P(Ye);var ze=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's sucess chance in Bladeburner contracts/operations by 3%.<br>Increases the player's effectiveness in Bladeburner Field Analysis by 5%.<br>Increases the player's Bladeburner stamina gain rate by 2%.",bladeburner_success_chance_mult:1.03,bladeburner_analysis_mult:1.05,bladeburner_stamina_gain_mult:1.02});ze.addToFactions(["Bladeburners"]),P(ze);var Ve=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's defense by 5%.<br>Increases the player's strength and dexterity by 5%.<br>Increases the player's success chance in Bladeburner contracts/operations by 4%.",defense_mult:1.05,strength_mult:1.05,dexterity_mult:1.05,bladeburner_success_chance_mult:1.04});Ve.addToFactions(["Bladeburners"]),P(Ve);var Je=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 6%.",bladeburner_success_chance_mult:1.06});Je.addToFactions(["Bladeburners"]),P(Je);var Xe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.HyperionV1],bladeburner_success_chance_mult:1.08});Xe.addToFactions(["Bladeburners"]),P(Xe);var Qe=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases all of the player's combat stats by 7%.<br>Increases the player's Bladeburner stamina gain rate by 5%.<br>",strength_mult:1.07,defense_mult:1.07,dexterity_mult:1.07,agility_mult:1.07,bladeburner_stamina_gain_mult:1.05});Qe.addToFactions(["Bladeburners"]),P(Qe);var Ze=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 10%.<br>Increases the player's success chance in Bladeburner contracts/operations by 4%.<br>Increases the player's dexterity experience gain rate by 10%.",dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.1,bladeburner_success_chance_mult:1.04});Ze.addToFactions(["Bladeburners"]),P(Ze);var et=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%.<br>Increases the player's defense and dexterity experience gain rate by 10%.<br>Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[o.AugmentationNames.VangelisVirus],defense_exp_mult:1.1,dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.05});et.addToFactions(["Bladeburners"]),P(et);var tt=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's experience gain rate for all combat stats by 5%.<br>Increases the player's Bladeburner max stamina by 10%.",strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,bladeburner_max_stamina_mult:1.1});tt.addToFactions(["Bladeburners"]),P(tt);var nt=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's agility by 5%.<br>Increases the player's Bladeburner max stamina by 5%.<br>Increases the player's Bladeburner stamina gain rate by 5%.<br>",agility_mult:1.05,bladeburner_max_stamina_mult:1.05,bladeburner_stamina_gain_mult:1.05});nt.addToFactions(["Bladeburners"]),P(nt);var at=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases all of the player's combat stats by 4%.<br>Increases the player's Bladeburner stamina gain rate by 2%.<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.",strength_mult:1.04,defense_mult:1.04,dexterity_mult:1.04,agility_mult:1.04,bladeburner_stamina_gain_mult:1.02,bladeburner_success_chance_mult:1.03});at.addToFactions(["Bladeburners"]),P(at);var it=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 5%.<br>Increases the player's Bladeburner stamina gain rate by 2%.<br>Increases the player's Bladeburner max stamina by 5%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.05,bladeburner_stamina_gain_mult:1.02,bladeburner_max_stamina_mult:1.05});it.addToFactions(["Bladeburners"]),P(it);var rt=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's defense by 5%.<br>Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[o.AugmentationNames.BladeArmor],defense_mult:1.05,bladeburner_success_chance_mult:1.06});rt.addToFactions(["Bladeburners"]),P(rt);var ot=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.08});ot.addToFactions(["Bladeburners"]),P(ot);var st=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[o.AugmentationNames.BladeArmorUnibeam],bladeburner_success_chance_mult:1.1});st.addToFactions(["Bladeburners"]),P(st);var lt=new a.Augmentation({name:o.AugmentationNames.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.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%.<br>Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.02});lt.addToFactions(["Bladeburners"]),P(lt);var ct=new a.Augmentation({name:o.AugmentationNames.BladesSimulacrum,repCost:500,moneyCost:3e10,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.<br><br>This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."});ct.addToFactions(["Bladeburners"]),P(ct)}var ut=Math.pow(l.CONSTANTS.MultipleAugMultiplier,m.a.queuedAugmentations.length);for(var e in i.Augmentations)i.Augmentations.hasOwnProperty(e)&&(i.Augmentations[e].baseCost*=ut);m.a.reapplyAllAugmentations()}function P(e){if(!(e instanceof a.Augmentation))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;x(t)&&delete i.Augmentations[t],S(e)}function A(e,t=!1){i.Augmentations[e.name].owned=!0;const n=i.Augmentations[e.name];for(const e in n.mults)null==m.a[e]?console.warn(`Augmentation has unrecognized multiplier property: ${e}`):m.a[e]*=n.mults[e];if(e.name===o.AugmentationNames.NeuroFluxGovernor&&!t){i.Augmentations[e.name].level=e.level;for(var a=0;a<m.a.augmentations.length;++a)if(m.a.augmentations[a].name==o.AugmentationNames.NeuroFluxGovernor){m.a.augmentations[a].level=e.level;break}}if(e.name===o.AugmentationNames.NeuroFluxGovernor)for(a=0;a<m.a.augmentations.length;++a)if(m.a.augmentations[a].name==o.AugmentationNames.NeuroFluxGovernor)return;if(!t){var s=new r.PlayerOwnedAugmentation(e.name);m.a.augmentations.push(s)}}function w(e=null){if(0==m.a.queuedAugmentations.length)return Object(b.dialogBoxCreate)("You have not purchased any Augmentations to install!"),!1;for(var t="",n=0;n<m.a.queuedAugmentations.length;++n){var a=i.Augmentations[m.a.queuedAugmentations[n].name];null!=a?(A(m.a.queuedAugmentations[n]),t+=a.name+"<br>"):console.log("ERROR. Invalid augmentation")}if(m.a.queuedAugmentations=[],Object(b.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:<br>"+t+"<br>You wake up in your home...you feel different..."),Object(h.a)(),e&&Object(T.isString)(e)){var r=m.a.getHomeComputer();for(n=0;n<r.scripts.length;++n)if(r.scripts[n].filename===e){var o=r.scripts[n];if(o.ramUsage>r.maxRam-r.ramUsed)return;var s=new g.RunningScript(o,[]);s.threads=1,r.runningScripts.push(s),Object(p.c)(s,r)}}}function x(e){return i.Augmentations.hasOwnProperty(e)}function R(e){Object(O.removeChildrenFromElement)(e),e.appendChild(Object(C.createElement)("h1",{innerText:"Purchased Augmentations"}));var t="\n";(6===m.a.bitNodeN||u.c)&&(t="Bladeburner Progress\n\n"),e.appendChild(Object(C.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"+t+"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)."})),e.appendChild(Object(C.createElement)("a",{class:"a-link-button",innerText:"Install Augmentations",tooltip:"'I never asked for this'",clickListener:()=>(w(),!1)})),e.appendChild(Object(C.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 n=Object(C.createElement)("ul",{class:"augmentations-list"}),a=0;a<m.a.queuedAugmentations.length;++a){var r=m.a.queuedAugmentations[a].name,s=i.Augmentations[r],l=r;r===o.AugmentationNames.NeuroFluxGovernor&&(l+=" - Level "+m.a.queuedAugmentations[a].level);var c=Object(v.createAccordionElement)({hdrText:l,panelText:s.info});n.appendChild(c[0])}e.appendChild(n),e.appendChild(Object(C.createElement)("h1",{innerText:"Installed Augmentations",marginTop:"8px"})),e.appendChild(Object(C.createElement)("p",{width:"70%",whiteSpace:"pre-wrap",innerText:"List of all Augmentations (including Source Files) that have been installed. You have gained the effects of these Augmentations."}));var p=Object(C.createElement)("ul",{class:"augmentations-list"});e.appendChild(Object(C.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Expand All",display:"inline-block",clickListener:()=>{for(var e=p.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")||e[t].click()}})),e.appendChild(Object(C.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Collapse All",display:"inline-block",clickListener:()=>{for(var e=p.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")&&e[t].click()}}));const h=Object(C.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source Files in numerical order (1, 2, 3,...)",clickListener:()=>{Object(O.removeChildrenFromElement)(p);var e=m.a.sourceFiles.slice(),t=m.a.augmentations.slice();e.sort((e,t)=>e.n-t.n),t.sort((e,t)=>e.name<=t.name?-1:1),I(p,e),N(p,t),f.Settings.OwnedAugmentationsOrder=_.OwnedAugmentationsOrderSetting.Alphabetically}});e.appendChild(h);const g=Object(C.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(O.removeChildrenFromElement)(p),I(p,m.a.sourceFiles),N(p,m.a.augmentations),f.Settings.OwnedAugmentationsOrder=_.OwnedAugmentationsOrderSetting.AcquirementTime}});e.appendChild(g),f.Settings.OwnedAugmentationsOrder===_.OwnedAugmentationsOrderSetting.Alphabetically?h.click():g.click(),e.appendChild(p),e.appendChild(Object(C.createElement)("p",{display:"block",innerHTML:"<br><br><strong><u>Total Multipliers:</u></strong><br>Hacking Chance multiplier: "+Object(E.formatNumber)(100*m.a.hacking_chance_mult,2)+"%<br>Hacking Speed multiplier: "+Object(E.formatNumber)(100*m.a.hacking_speed_mult,2)+"%<br>Hacking Money multiplier: "+Object(E.formatNumber)(100*m.a.hacking_money_mult,2)+"%<br>Hacking Growth multiplier: "+Object(E.formatNumber)(100*m.a.hacking_grow_mult,2)+"%<br><br>Hacking Level multiplier: "+Object(E.formatNumber)(100*m.a.hacking_mult,2)+"%<br>Hacking Experience multiplier: "+Object(E.formatNumber)(100*m.a.hacking_exp_mult,2)+"%<br><br>Strength Level multiplier: "+Object(E.formatNumber)(100*m.a.strength_mult,2)+"%<br>Strength Experience multiplier: "+Object(E.formatNumber)(100*m.a.strength_exp_mult,2)+"%<br><br>Defense Level multiplier: "+Object(E.formatNumber)(100*m.a.defense_mult,2)+"%<br>Defense Experience multiplier: "+Object(E.formatNumber)(100*m.a.defense_exp_mult,2)+"%<br><br>Dexterity Level multiplier: "+Object(E.formatNumber)(100*m.a.dexterity_mult,2)+"%<br>Dexterity Experience multiplier: "+Object(E.formatNumber)(100*m.a.dexterity_exp_mult,2)+"%<br><br>Agility Level multiplier: "+Object(E.formatNumber)(100*m.a.agility_mult,2)+"%<br>Agility Experience multiplier: "+Object(E.formatNumber)(100*m.a.agility_exp_mult,2)+"%<br><br>Charisma Level multiplier: "+Object(E.formatNumber)(100*m.a.charisma_mult,2)+"%<br>Charisma Experience multiplier: "+Object(E.formatNumber)(100*m.a.charisma_exp_mult,2)+"%<br><br>Hacknet Node production multiplier: "+Object(E.formatNumber)(100*m.a.hacknet_node_money_mult,2)+"%<br>Hacknet Node purchase cost multiplier: "+Object(E.formatNumber)(100*m.a.hacknet_node_purchase_cost_mult,2)+"%<br>Hacknet Node RAM upgrade cost multiplier: "+Object(E.formatNumber)(100*m.a.hacknet_node_ram_cost_mult,2)+"%<br>Hacknet Node Core purchase cost multiplier: "+Object(E.formatNumber)(100*m.a.hacknet_node_core_cost_mult,2)+"%<br>Hacknet Node level upgrade cost multiplier: "+Object(E.formatNumber)(100*m.a.hacknet_node_level_cost_mult,2)+"%<br><br>Company reputation gain multiplier: "+Object(E.formatNumber)(100*m.a.company_rep_mult,2)+"%<br>Faction reputation gain multiplier: "+Object(E.formatNumber)(100*m.a.faction_rep_mult,2)+"%<br>Salary multiplier: "+Object(E.formatNumber)(100*m.a.work_money_mult,2)+"%<br>Crime success multiplier: "+Object(E.formatNumber)(100*m.a.crime_success_mult,2)+"%<br>Crime money multiplier: "+Object(E.formatNumber)(100*m.a.crime_money_mult,2)+"%<br><br><br>"}))}function N(e,t){for(var n=0;n<t.length;++n){var a=t[n].name,r=i.Augmentations[a],s=a;a===o.AugmentationNames.NeuroFluxGovernor&&(s+=" - Level "+t[n].level);var l=Object(v.createAccordionElement)({hdrText:s,panelText:r.info});e.appendChild(l[0])}}function I(e,t){for(var n=0;n<t.length;++n){var a="SourceFile"+t[n].n,i=y.a[a];if(null==i){console.log("ERROR: Invalid source file number: "+t[n].n);continue}const o=12==t[n].n?"∞":"3";var r=Object(v.createAccordionElement)({hdrText:i.name+"<br>Level "+t[n].lvl+" / "+o,panelText:i.info});e.appendChild(r[0])}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(21),i=n(20),r=n(49),o=n(98),s=n(62),l=n(83),c=n(90),u=n(17);class p{constructor(e={hostname:"",ip:c.createRandomIp()}){this.baseDifficulty=1,this.contracts=[],this.cpuCores=1,this.ftpPortOpen=!1,this.hackDifficulty=1,this.hasAdminRights=!1,this.hostname="",this.httpPortOpen=!1,this.ip="",this.isConnectedTo=!1,this.manuallyHacked=!1,this.maxRam=0,this.messages=[],this.minDifficulty=1,this.moneyAvailable=0,this.moneyMax=0,this.numOpenPortsRequired=5,this.openPortCount=0,this.organizationName="",this.programs=[],this.purchasedByPlayer=!1,this.ramUsed=0,this.requiredHackingSkill=1,this.runningScripts=[],this.scripts=[],this.serverGrowth=1,this.serversOnNetwork=[],this.smtpPortOpen=!1,this.sqlPortOpen=!1,this.sshPortOpen=!1,this.textFiles=[],this.ip=e.ip?e.ip:c.createRandomIp();for(var t=e.hostname,n=0,r="";null!=a.GetServerByHostname(t+r);)r="-"+n,++n;this.hostname=t+r,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.maxRam=null!=e.maxRam?e.maxRam:0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*i.BitNodeMultipliers.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*i.BitNodeMultipliers.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*i.BitNodeMultipliers.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=e.serverGrowth?e.serverGrowth:1,this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5}static fromJSON(e){return u.Generic_fromJSON(p,e.data)}setMaxRam(e){this.maxRam=e}getScript(e){for(let t=0;t<this.scripts.length;t++)if(this.scripts[t].filename===e)return this.scripts[t];return null}capDifficulty(){this.hackDifficulty<this.minDifficulty&&(this.hackDifficulty=this.minDifficulty),this.hackDifficulty<1&&(this.hackDifficulty=1),this.hackDifficulty>1e6&&(this.hackDifficulty=1e6)}fortify(e){this.hackDifficulty+=e,this.capDifficulty()}weaken(e){this.hackDifficulty-=e*i.BitNodeMultipliers.ServerWeakenRate,this.capDifficulty()}writeToScriptFile(e,t){var n={success:!1,overwritten:!1};if(!s.isScriptFilename(e))return n;for(let a=0;a<this.scripts.length;++a)if(e===this.scripts[a].filename){let e=this.scripts[a];return e.code=t,e.updateRamUsage(),e.module="",n.overwritten=!0,n.success=!0,n}const a=new o.Script;return a.filename=e,a.code=t,a.updateRamUsage(),a.server=this.ip,this.scripts.push(a),n.success=!0,n}writeToTextFile(e,t){var n={success:!1,overwritten:!1};if(!e.endsWith("txt"))return n;for(let a=0;a<this.textFiles.length;++a)if(this.textFiles[a].fn===e)return n.overwritten=!0,this.textFiles[a].text=t,n.success=!0,n;var a=new l.TextFile(e,t);return this.textFiles.push(a),n.success=!0,n}addContract(e){this.contracts.push(e)}removeContract(e){e instanceof r.CodingContract?this.contracts=this.contracts.filter(t=>t.fn!==e.fn):this.contracts=this.contracts.filter(t=>t.fn!==e)}getContract(e){for(const t of this.contracts)if(t.fn===e)return t;return null}toJSON(){return u.Generic_toJSON("Server",this)}}t.Server=p,u.Reviver.constructors.Server=p},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";Object.defineProperty(t,"__esModule",{value:!0});const a=n(4);t.appendLineBreaks=function(e,t){for(let n=0;n<t;++n)e.appendChild(a.createElement("br"))}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return _}),n.d(t,"a",function(){return f});var a=n(78),i=n(11),r=n(0),o=n(115),s=n(95),l=n(134),c=n(71),u=n(64),p=n(22),m=n(9),h=n(33),d=n(25);function g(e){return new Promise(function(t,n){var a=document.getElementById("red-pill-content"),i=document.createElement("p");a.appendChild(i),function e(t,n,a=0){return new Promise(function(i,r){Object(u.setTimeoutRef)(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+"<span class='typed-cursor'> █ </span>";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 _=!1;function f(e,t=!1){var n=document.getElementById("red-pill-content");return Object(h.removeChildrenFromElement)(n),_=!0,i.Engine.loadRedPillContent(),g("[ERROR] SEMPOOL INVALID").then(function(){return g("[ERROR] Segmentation Fault")}).then(function(){return g("[ERROR] SIGKILL RECVD")}).then(function(){return g("Dumping core...")}).then(function(){return g("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return g("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return g("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return g("----------------------------------------")}).then(function(){return g("Failsafe initiated...")}).then(function(){return g("Restarting BitNode-"+e+"...")}).then(function(){return g("...........")}).then(function(){return g("...........")}).then(function(){return g("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return g("..............................................")}).then(function(){return g("..............................................")}).then(function(){return function(e,t=!1){var n=document.getElementById("red-pill-content");Object(h.removeChildrenFromElement)(n);for(var i=document.createElement("pre"),r=[],o=1;o<=12;++o)r.push(y(o));i.innerHTML=" O <br> | O O | O O | <br> O | | / __| \\ | | O <br> O | O | | O / | O | | O | O <br> | | | | |_/ |/ | \\_ \\_| | | | | <br> O | | | O | | O__/ | / \\__ | | O | | | O <br> | | | | | | | / /| O / \\| | | | | | | <br>O | | | \\| | O / _/ | / O | |/ | | | O<br>| | | |O / | | O / | O O | | \\ O| | | |<br>| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |<br> \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ <br> | | |_/ | | \\| / | \\_| | | <br> \\| / \\| | / / \\ |/ <br> | "+r[9]+" | | / | "+r[10]+" | <br> "+r[8]+" | | | | | | | "+r[11]+" <br> | | | / / \\ \\ | | | <br> \\| | / "+r[6]+" / \\ "+r[7]+" \\ | |/ <br> \\ | / / | | \\ \\ | / <br> \\ \\JUMP "+r[4]+"3R | | | | | | R3"+r[5]+" PMUJ/ / <br> \\|| | | | | | | | | ||/ <br> \\| \\_ | | | | | | _/ |/ <br> \\ \\| / \\ / \\ |/ / <br> "+r[0]+" |/ "+r[1]+" | | "+r[2]+" \\| "+r[3]+" <br> | | | | | | | | <br> \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ <br><br><br><br>",n.appendChild(i);for(var o=1;o<=12;++o)!function(n){var i="bitnode-"+n.toString(),r=Object(p.clearEventListeners)(i);null!=r&&(1===n||2===n||3===n||4===n||5===n||6===n||7===n||8===n||10===n||11===n||12===n?r.addEventListener("click",function(){var i="BitNode"+n,r=a.BitNodes[i];null!=r?(Object(d.yesNoBoxCreate)("BitNode-"+n+": "+r.name+"<br><br>"+r.info),b(n,e,t)):console.log("ERROR: Could not find BitNode object for number: "+n)}):r.addEventListener("click",function(){Object(m.dialogBoxCreate)("Not yet implemented! Coming soon!")}))}(o);return g("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function(){return g("Our species fought back, but it was futile. The Enders had technology far beyond our own...")}).then(function(){return g("Instead of killing every last one of us, the human race was enslaved...")}).then(function(){return g("We were shackled in a digital world, chained into a prison for our minds...")}).then(function(){return g("Using their advanced technology, the Enders created complex simulations of a virtual reality...")}).then(function(){return g("Simulations designed to keep us content...ignorant of the truth.")}).then(function(){return g("Simulations used to trap and suppress our consciousness, to keep us under control...")}).then(function(){return g("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.")}).then(function(){return g("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...")}).then(function(){return g("Only then can we begin to fight back...")}).then(function(){return g("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...")}).then(function(){return g("But there is still a long way to go...")}).then(function(){return g("The technology the Enders used to enslave the human race wasn't just a single complex simulation...")}).then(function(){return g("There are tens if not hundreds of BitNodes out there...")}).then(function(){return g("Each with their own simulations of a reality...")}).then(function(){return g("Each creating their own universes...a universe of universes")}).then(function(){return g("And all of which must be destroyed...")}).then(function(){return g(".......................................")}).then(function(){return g("Welcome to the Bitverse...")}).then(function(){return g(" ")}).then(function(){return g("(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.BitNodes[t];return null==n?"O":"<a class='bitnode tooltip' id='bitnode-"+n.number.toString()+"'><strong>O</strong><span class='tooltiptext'><strong>BitNode-"+n.number.toString()+"<br>"+n.name+"</strong><br>"+n.desc+"<br></span></a>"}function b(t,n,a=!1){var i=Object(d.yesNoBoxGetYesButton)();i.innerHTML="Enter BitNode-"+t,i.addEventListener("click",function(){a?r.a.gainIntelligenceExp(-5):function(e){var t="SourceFile"+e.toString(),n=s.a[t];if(null!=n){for(var a=!1,i=null,o=0;o<r.a.sourceFiles.length;++o)if(r.a.sourceFiles[o].n===e){a=!0,i=r.a.sourceFiles[o];break}if(a&&i)i.lvl>=3&&12!==i.n?Object(m.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++i.lvl,Object(m.dialogBoxCreate)(n.name+" was upgraded to level "+i.lvl+" for destroying its corresponding BitNode!"));else{var c=new l.PlayerOwnedSourceFile(e,1);r.a.sourceFiles.push(c),5===e&&(r.a.intelligence=1),Object(m.dialogBoxCreate)("You received a Source-File for destroying a Bit Node!<br><br>"+n.name+"<br><br>"+n.info)}}else console.log("ERROR: could not find source file for Bit node: "+e)}(n),_=!1;var i=document.getElementById("red-pill-content");Object(h.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='$ <input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',e("input[class=terminal-input]").prop("disabled",!1),c.a.hackFlag=!1,Object(o.b)(),Object(d.yesNoBoxClose)()});var u=Object(d.yesNoBoxGetNoButton)();u.innerHTML="Back",u.addEventListener("click",function(){Object(d.yesNoBoxClose)()})}}).call(this,n(79))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(20);class i{constructor(e,t,n="",a=""){this.number=e,this.name=t,this.desc=n,this.info=a}}t.BitNodes={},t.initBitNodes=function(){t.BitNodes={},t.BitNodes.BitNode1=new i(1,"Source Genesis","The original BitNode","The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.<br><br>This is the first BitNode that you play through. It has no special modifications or mechanics.<br><br>Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),t.BitNodes.BitNode2=new i(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.<br><br>Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050s. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.<br><br>In this BitNode:<br><br>Your hacking level is reduced by 20%<br>The growth rate and maximum amount of money available on servers are significantly decreased<br>The amount of money gained from crimes and Infiltration is tripled<br>Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction<br>Every Augmentation in the game will be available through the Factions listed above<br>For every Faction NOT listed above, reputation gains are halved<br>You will no longer gain passive reputation with Factions<br><br>Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.BitNodes.BitNode3=new i(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.<br><br>Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.<br><br>In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: <br><br>The price and reputation cost of all Augmentations is tripled<br>The starting and maximum amount of money on servers is reduced by 75%<br>Server growth rate is reduced by 80%<br>You now only need 75 favour with a faction in order to donate to it, rather than 150<br><br>Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode4=new 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. <br><br>In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.<br><br>In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.<br><br>Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use."),t.BitNodes.BitNode5=new 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.<br><br>In this BitNode:<br><br>The base security level of servers is doubled<br>The starting money on servers is halved, but the maximum money remains the same<br>Most methods of earning money now give significantly less<br>Infiltration gives 50% more reputation and money<br>Corporations have 50% lower valuations and are therefore less profitable<br>Augmentations are more expensive<br>Hacking experience gain rates are reduced<br><br>Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. <br><br>In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will also raise all of your hacking-related multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode6=new 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.<br><br>In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:<br><br>Hacking and Hacknet Nodes will be less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode7=new 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.<br><br>In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: <br><br>The rank you gain from Bladeburner contracts/operations is reduced by 40%<br>Bladeburner skills cost twice as many skill points<br>Augmentations are 3x more expensive<br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode8=new 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.<br><br>In this BitNode:<br><br>You start with $250 million<br>The only way to earn money is by trading on the stock market<br>You start with a WSE membership and access to the TIX API<br>You are able to short stocks and place different types of orders (limit/stop)<br>You can immediately donate to factions to gain reputation<br><br>Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),t.BitNodes.BitNode9=new i(9,"Do Androids Dream?","COMING SOON"),t.BitNodes.BitNode10=new i(10,"Digital Carbon","Your body is not who you are","In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally achieved immortality - at least for those that could afford it.<br><br>This BitNode unlocks Sleeve technology. Sleeve technology allows you to:<br><br>1. Re-sleeve: Purchase and transfer your consciousness into a new body<br>2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously<br><br>In this BitNode:<br><br>Your stats are significantly decreased.<br>All methods of gaining money are half as profitable (except Stock Market)<br>Purchased servers are more expensive, have less max RAM, and a lower maximum limit<br>Augmentations are 5x as expensive and require twice as much reputation<br><br>Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),t.BitNodes.BitNode11=new 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.<br><br>In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.<br><br>In this BitNode:<br><br>The starting and maximum amount of money available on servers is significantly decreased<br>The growth rate of servers is halved<br>Weakening a server is twice as effective<br>Company wages are decreased by 50%<br>Corporation valuations are 99% lower and are therefore significantly less profitable<br>Hacknet Node production is significantly decreased<br>Crime and Infiltration are more lucrative<br>Augmentations are twice as expensive<br><br>Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.BitNodes.BitNode12=new i(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.<br><br>Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give 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)"),t.BitNodes.BitNode13=new i(13,"fOS","COMING SOON"),t.BitNodes.BitNode14=new i(14,"","COMING SOON"),t.BitNodes.BitNode15=new i(15,"","COMING SOON"),t.BitNodes.BitNode16=new i(16,"","COMING SOON"),t.BitNodes.BitNode17=new i(17,"","COMING SOON"),t.BitNodes.BitNode18=new i(18,"","COMING SOON"),t.BitNodes.BitNode19=new i(19,"","COMING SOON"),t.BitNodes.BitNode20=new i(20,"","COMING SOON"),t.BitNodes.BitNode21=new i(21,"","COMING SOON"),t.BitNodes.BitNode22=new i(22,"","COMING SOON"),t.BitNodes.BitNode23=new i(23,"","COMING SOON"),t.BitNodes.BitNode24=new i(24,"","COMING SOON")},t.initBitNodeMultipliers=function(e){for(var t in null==e.bitNodeN&&(e.bitNodeN=1),a.BitNodeMultipliers)a.BitNodeMultipliers.hasOwnProperty(t)&&(a.BitNodeMultipliers[t]=1);switch(e.bitNodeN){case 1:break;case 2:a.BitNodeMultipliers.HackingLevelMultiplier=.8,a.BitNodeMultipliers.ServerGrowthRate=.8,a.BitNodeMultipliers.ServerMaxMoney=.2,a.BitNodeMultipliers.ServerStartingMoney=.4,a.BitNodeMultipliers.CrimeMoney=3,a.BitNodeMultipliers.InfiltrationMoney=3,a.BitNodeMultipliers.FactionWorkRepGain=.5,a.BitNodeMultipliers.FactionPassiveRepGain=0;break;case 3:a.BitNodeMultipliers.HackingLevelMultiplier=.8,a.BitNodeMultipliers.RepToDonateToFaction=.5,a.BitNodeMultipliers.AugmentationRepCost=3,a.BitNodeMultipliers.AugmentationMoneyCost=3,a.BitNodeMultipliers.ServerMaxMoney=.2,a.BitNodeMultipliers.ServerStartingMoney=.2,a.BitNodeMultipliers.ServerGrowthRate=.2,a.BitNodeMultipliers.ScriptHackMoney=.2,a.BitNodeMultipliers.CompanyWorkMoney=.25,a.BitNodeMultipliers.CrimeMoney=.25,a.BitNodeMultipliers.HacknetNodeMoney=.25,a.BitNodeMultipliers.HomeComputerRamCost=1.5,a.BitNodeMultipliers.PurchasedServerCost=2;break;case 4:a.BitNodeMultipliers.ServerMaxMoney=.15,a.BitNodeMultipliers.ServerStartingMoney=.75,a.BitNodeMultipliers.ScriptHackMoney=.2,a.BitNodeMultipliers.CompanyWorkMoney=.1,a.BitNodeMultipliers.CrimeMoney=.2,a.BitNodeMultipliers.HacknetNodeMoney=.05,a.BitNodeMultipliers.CompanyWorkExpGain=.5,a.BitNodeMultipliers.ClassGymExpGain=.5,a.BitNodeMultipliers.FactionWorkExpGain=.5,a.BitNodeMultipliers.HackExpGain=.4,a.BitNodeMultipliers.CrimeExpGain=.5,a.BitNodeMultipliers.FactionWorkRepGain=.75;break;case 5:a.BitNodeMultipliers.ServerMaxMoney=2,a.BitNodeMultipliers.ServerStartingSecurity=2,a.BitNodeMultipliers.ServerStartingMoney=.5,a.BitNodeMultipliers.ScriptHackMoney=.15,a.BitNodeMultipliers.HacknetNodeMoney=.2,a.BitNodeMultipliers.CrimeMoney=.5,a.BitNodeMultipliers.InfiltrationRep=1.5,a.BitNodeMultipliers.InfiltrationMoney=1.5,a.BitNodeMultipliers.AugmentationMoneyCost=2,a.BitNodeMultipliers.HackExpGain=.5,a.BitNodeMultipliers.CorporationValuation=.5;break;case 6:a.BitNodeMultipliers.HackingLevelMultiplier=.35,a.BitNodeMultipliers.ServerMaxMoney=.4,a.BitNodeMultipliers.ServerStartingMoney=.5,a.BitNodeMultipliers.ServerStartingSecurity=1.5,a.BitNodeMultipliers.ScriptHackMoney=.75,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.CrimeMoney=.75,a.BitNodeMultipliers.InfiltrationMoney=.75,a.BitNodeMultipliers.CorporationValuation=.2,a.BitNodeMultipliers.HacknetNodeMoney=.2,a.BitNodeMultipliers.FactionPassiveRepGain=0,a.BitNodeMultipliers.HackExpGain=.25,a.BitNodeMultipliers.DaedalusAugsRequirement=1.166;break;case 7:a.BitNodeMultipliers.BladeburnerRank=.6,a.BitNodeMultipliers.BladeburnerSkillCost=2,a.BitNodeMultipliers.AugmentationMoneyCost=3,a.BitNodeMultipliers.HackingLevelMultiplier=.35,a.BitNodeMultipliers.ServerMaxMoney=.4,a.BitNodeMultipliers.ServerStartingMoney=.5,a.BitNodeMultipliers.ServerStartingSecurity=1.5,a.BitNodeMultipliers.ScriptHackMoney=.5,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.CrimeMoney=.75,a.BitNodeMultipliers.InfiltrationMoney=.75,a.BitNodeMultipliers.CorporationValuation=.2,a.BitNodeMultipliers.HacknetNodeMoney=.2,a.BitNodeMultipliers.FactionPassiveRepGain=0,a.BitNodeMultipliers.HackExpGain=.25,a.BitNodeMultipliers.FourSigmaMarketDataCost=2,a.BitNodeMultipliers.FourSigmaMarketDataApiCost=2,a.BitNodeMultipliers.DaedalusAugsRequirement=1.166;break;case 8:a.BitNodeMultipliers.ScriptHackMoney=0,a.BitNodeMultipliers.ManualHackMoney=0,a.BitNodeMultipliers.CompanyWorkMoney=0,a.BitNodeMultipliers.CrimeMoney=0,a.BitNodeMultipliers.HacknetNodeMoney=0,a.BitNodeMultipliers.InfiltrationMoney=0,a.BitNodeMultipliers.RepToDonateToFaction=0,a.BitNodeMultipliers.CorporationValuation=0,a.BitNodeMultipliers.CodingContractMoney=0;break;case 10:a.BitNodeMultipliers.HackingLevelMultiplier=.2,a.BitNodeMultipliers.StrengthLevelMultiplier=.4,a.BitNodeMultipliers.DefenseLevelMultiplier=.4,a.BitNodeMultipliers.DexterityLevelMultiplier=.4,a.BitNodeMultipliers.AgilityLevelMultiplier=.4,a.BitNodeMultipliers.CharismaLevelMultiplier=.4,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.CrimeMoney=.5,a.BitNodeMultipliers.HacknetNodeMoney=.5,a.BitNodeMultipliers.ManualHackMoney=.5,a.BitNodeMultipliers.ScriptHackMoney=.5,a.BitNodeMultipliers.CodingContractMoney=.5,a.BitNodeMultipliers.InfiltrationMoney=.5,a.BitNodeMultipliers.CorporationValuation=.5,a.BitNodeMultipliers.AugmentationMoneyCost=5,a.BitNodeMultipliers.AugmentationRepCost=2,a.BitNodeMultipliers.HomeComputerRamCost=1.5,a.BitNodeMultipliers.PurchasedServerCost=5,a.BitNodeMultipliers.PurchasedServerLimit=.6,a.BitNodeMultipliers.PurchasedServerMaxRam=.5,a.BitNodeMultipliers.BladeburnerRank=.8;break;case 11:a.BitNodeMultipliers.ServerMaxMoney=.1,a.BitNodeMultipliers.ServerStartingMoney=.1,a.BitNodeMultipliers.ServerGrowthRate=.5,a.BitNodeMultipliers.ServerWeakenRate=2,a.BitNodeMultipliers.CrimeMoney=3,a.BitNodeMultipliers.CompanyWorkMoney=.5,a.BitNodeMultipliers.HacknetNodeMoney=.1,a.BitNodeMultipliers.AugmentationMoneyCost=2,a.BitNodeMultipliers.InfiltrationMoney=2.5,a.BitNodeMultipliers.InfiltrationRep=2.5,a.BitNodeMultipliers.CorporationValuation=.01,a.BitNodeMultipliers.CodingContractMoney=.5,a.BitNodeMultipliers.FourSigmaMarketDataCost=4,a.BitNodeMultipliers.FourSigmaMarketDataApiCost=4;break;case 12:for(var n=0,i=0;i<e.sourceFiles.length;i++)12===e.sourceFiles[i].n&&(n=e.sourceFiles[i].lvl);var r=Math.pow(1.02,n),o=1/r;a.BitNodeMultipliers.DaedalusAugsRequirement=Math.min(r,1.34),a.BitNodeMultipliers.HackingLevelMultiplier=o,a.BitNodeMultipliers.StrengthLevelMultiplier=o,a.BitNodeMultipliers.DefenseLevelMultiplier=o,a.BitNodeMultipliers.DexterityLevelMultiplier=o,a.BitNodeMultipliers.AgilityLevelMultiplier=o,a.BitNodeMultipliers.CharismaLevelMultiplier=o,a.BitNodeMultipliers.ServerMaxMoney=o,a.BitNodeMultipliers.ServerStartingMoney=o,a.BitNodeMultipliers.ServerGrowthRate=o,a.BitNodeMultipliers.ServerWeakenRate=o,a.BitNodeMultipliers.ServerStartingSecurity=1.5,a.BitNodeMultipliers.HomeComputerRamCost=r,a.BitNodeMultipliers.PurchasedServerCost=r,a.BitNodeMultipliers.PurchasedServerLimit=o,a.BitNodeMultipliers.PurchasedServerMaxRam=o,a.BitNodeMultipliers.ManualHackMoney=o,a.BitNodeMultipliers.ScriptHackMoney=o,a.BitNodeMultipliers.CompanyWorkMoney=o,a.BitNodeMultipliers.CrimeMoney=o,a.BitNodeMultipliers.HacknetNodeMoney=o,a.BitNodeMultipliers.CompanyWorkExpGain=o,a.BitNodeMultipliers.ClassGymExpGain=o,a.BitNodeMultipliers.FactionWorkExpGain=o,a.BitNodeMultipliers.HackExpGain=o,a.BitNodeMultipliers.CrimeExpGain=o,a.BitNodeMultipliers.FactionWorkRepGain=o,a.BitNodeMultipliers.FactionPassiveRepGain=o,a.BitNodeMultipliers.RepToDonateToFaction=r,a.BitNodeMultipliers.AugmentationRepCost=r,a.BitNodeMultipliers.AugmentationMoneyCost=r,a.BitNodeMultipliers.InfiltrationMoney=o,a.BitNodeMultipliers.InfiltrationRep=o,a.BitNodeMultipliers.FourSigmaMarketDataCost=r,a.BitNodeMultipliers.FourSigmaMarketDataApiCost=r,a.BitNodeMultipliers.CorporationValuation=o,a.BitNodeMultipliers.BladeburnerRank=o,a.BitNodeMultipliers.BladeburnerSkillCost=r;break;default:console.log("WARNING: Player.bitNodeN invalid")}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(17),i=n(121),r=n(1),o={name:"",info:"",companyPositions:{},expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0};class s{static fromJSON(e){return a.Generic_fromJSON(s,e.data)}constructor(e=o){this.name=e.name,this.info=e.info,this.companyPositions=e.companyPositions,this.expMultiplier=e.expMultiplier,this.salaryMultiplier=e.salaryMultiplier,this.jobStatReqOffset=e.jobStatReqOffset,this.isPlayerEmployed=!1,this.playerReputation=1,this.favor=0,this.rolloverRep=0}hasPosition(e){return e instanceof i.CompanyPosition?null!=this.companyPositions[e.name]:null!=this.companyPositions[e]}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);var e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);let e=0,t=this.playerReputation+this.rolloverRep,n=r.CONSTANTS.CompanyReputationToFavorBase*Math.pow(r.CONSTANTS.CompanyReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=r.CONSTANTS.FactionReputationToFavorMult;return[e,t]}toJSON(){return a.Generic_toJSON("Company",this)}}t.Company=s,a.Reviver.constructors.Company=s},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});const a=n(124),i=n(91),r=n(3),o=n(17),s=n(43);class l{constructor(e={}){this.breakdown="",this.level=1,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.smartSupplyConsiderExports=!1,this.smartSupplyStore=0,this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.materials={Water:new a.Material({name:"Water"}),Energy:new a.Material({name:"Energy"}),Food:new a.Material({name:"Food"}),Plants:new a.Material({name:"Plants"}),Metal:new a.Material({name:"Metal"}),Hardware:new a.Material({name:"Hardware"}),Chemicals:new a.Material({name:"Chemicals"}),Drugs:new a.Material({name:"Drugs"}),Robots:new a.Material({name:"Robots"}),AICores:new a.Material({name:"AI Cores"}),RealEstate:new a.Material({name:"Real Estate"})},e.corp&&e.industry&&this.updateSize(e.corp,e.industry)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}updateMaterialSizeUsed(){this.sizeUsed=0,this.breakdown="";for(const t in this.materials){var e=this.materials[t];i.MaterialSizes.hasOwnProperty(t)&&(this.sizeUsed+=e.qty*i.MaterialSizes[t],e.qty>0&&(this.breakdown+=t+": "+r.numeralWrapper.format(e.qty*i.MaterialSizes[t],"0,0.0")+"<br>"))}this.sizeUsed>this.size&&console.warn("Warehouse size used greater than capacity, something went wrong")}updateSize(e,t){try{this.size=100*this.level*e.getStorageMultiplier()*t.getStorageMultiplier()}catch(e){s.exceptionAlert(e)}}toJSON(){return o.Generic_toJSON("Warehouse",this)}}t.Warehouse=l,o.Reviver.constructors.Warehouse=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(64),i=n(9),r=n(17);class o{static fromJSON(e){return r.Generic_fromJSON(o,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(),a.setTimeoutRef(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){i.dialogBoxCreate(`${this.fn}<br /><br />${this.text}`,!0)}toJSON(){return r.Generic_toJSON("TextFile",this)}write(e){this.text=e}}function s(e,t){const n=e.endsWith(".txt")?e:`${e}.txt`;for(const e of t.textFiles)if(e.fn===n)return e;return null}t.TextFile=o,r.Reviver.constructors.TextFile=o,t.getTextFile=s,t.createTextFile=function(e,t,n){if(null!==s(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const a=new o(e,t);return n.textFiles.push(a),a}},function(e,t,n){"use strict";n.d(t,"a",function(){return f}),n.d(t,"b",function(){return S}),n.d(t,"c",function(){return v}),n.d(t,"d",function(){return w}),n.d(t,"e",function(){return y}),n.d(t,"f",function(){return M});var a=n(20),i=n(1),r=n(11),o=n(41),s=n(0),l=n(12),c=n(3),u=n(9),p=n(22),m=n(17),h=n(4),d=n(68);let g=0;function _(e,t){var n=Object(d.getElementById)(e);n.innerText!=t&&(n.innerText=t)}function f(e){this.level=1,this.ram=1,this.cores=1,this.name=e,this.totalMoneyGenerated=0,this.onlineTimeSeconds=0,this.moneyGainRatePerSecond=0}function y(){if(o.a.isRunning){if(o.a.currStep!==o.d.HacknetNodesIntroduction)return;Object(o.b)()}var e=v();if(isNaN(e))throw new Error("Cost is NaN");if(s.a.money.lt(e))return-1;var t=s.a.hacknetNodes.length,n=new f("hacknet-node-"+t);return n.updateMoneyGainRate(),s.a.loseMoney(e),s.a.hacknetNodes.push(n),l.routing.isOn(l.Page.HacknetNodes)&&S(),b(),t}function b(){for(var e=0,t=0;t<s.a.hacknetNodes.length;++t)e+=s.a.hacknetNodes[t].moneyGainRatePerSecond;g=e}function v(){var e=s.a.hacknetNodes.length,t=i.CONSTANTS.HacknetNodePurchaseNextMult;return i.CONSTANTS.BaseCostForHacknetNode*Math.pow(t,e)*s.a.hacknet_node_purchase_cost_mult}document.addEventListener("DOMContentLoaded",function(){var e=function(e){Object(d.getElementById)("hacknet-nodes-"+e.id+"-multiplier").addEventListener("click",function(){return E=e.multiplier,k(),M(),!1})};for(var t of[{id:"1x",multiplier:1},{id:"5x",multiplier:5},{id:"10x",multiplier:10},{id:"max",multiplier:0}])e(t)},!1),f.prototype.updateMoneyGainRate=function(){var e=i.CONSTANTS.HacknetNodeMoneyGainPerLevel;this.moneyGainRatePerSecond=this.level*e*Math.pow(1.035,this.ram-1)*((this.cores+5)/6)*s.a.hacknet_node_money_mult*a.BitNodeMultipliers.HacknetNodeMoney,isNaN(this.moneyGainRatePerSecond)&&(this.moneyGainRatePerSecond=0,Object(u.dialogBoxCreate)("Error in calculating Hacknet Node production. Please report to game developer")),b()},f.prototype.calculateLevelUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;if(this.level>=i.CONSTANTS.HacknetNodeMaxLevel)return 1/0;for(var t=i.CONSTANTS.HacknetNodeUpgradeLevelMult,n=0,a=this.level,r=0;r<e;++r)n+=Math.pow(t,a),++a;return i.CONSTANTS.BaseCostForHacknetNode/2*n*s.a.hacknet_node_level_cost_mult},f.prototype.purchaseLevelUpgrade=function(e=1){e=Math.round(e);var t=this.calculateLevelUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.level>=i.CONSTANTS.HacknetNodeMaxLevel)return!1;if(this.level+e>i.CONSTANTS.HacknetNodeMaxLevel){var n=Math.max(0,i.CONSTANTS.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)},f.prototype.calculateRamUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;if(this.ram>=i.CONSTANTS.HacknetNodeMaxRam)return 1/0;let t=0,n=Math.round(Math.log2(this.ram)),a=this.ram;for(let r=0;r<e;++r){t+=a*i.CONSTANTS.BaseCostFor1GBOfRamHacknetNode*Math.pow(i.CONSTANTS.HacknetNodeUpgradeRamMult,n),a*=2,++n}return t*=s.a.hacknet_node_ram_cost_mult},f.prototype.purchaseRamUpgrade=function(e=1){e=Math.round(e);var t=this.calculateRamUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.ram>=i.CONSTANTS.HacknetNodeMaxRam)return!1;if(this.ram*Math.pow(2,e)>i.CONSTANTS.HacknetNodeMaxRam){var n=Math.max(0,Math.log2(Math.round(i.CONSTANTS.HacknetNodeMaxRam/this.ram)));return this.purchaseRamUpgrade(n)}if(s.a.money.lt(t))return!1;s.a.loseMoney(t);for(let t=0;t<e;++t)this.ram*=2;return this.ram=Math.round(this.ram),this.updateMoneyGainRate(),!0},f.prototype.calculateCoreUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;if(this.cores>=i.CONSTANTS.HacknetNodeMaxCores)return 1/0;const t=i.CONSTANTS.BaseCostForHacknetNodeCore,n=i.CONSTANTS.HacknetNodeUpgradeCoreMult;let a=0,r=this.cores;for(let i=0;i<e;++i)a+=t*Math.pow(n,r-1),++r;return a*=s.a.hacknet_node_core_cost_mult},f.prototype.purchaseCoreUpgrade=function(e=1){e=Math.round(e);var t=this.calculateCoreUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.cores>=i.CONSTANTS.HacknetNodeMaxCores)return!1;if(this.cores+e>i.CONSTANTS.HacknetNodeMaxCores){var n=Math.max(0,i.CONSTANTS.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)},f.prototype.toJSON=function(){return Object(m.Generic_toJSON)("HacknetNode",this)},f.fromJSON=function(e){return Object(m.Generic_fromJSON)(f,e.data)},m.Reviver.constructors.HacknetNode=f;var E=1;function k(){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==E?e.setAttribute("class","a-link-button-inactive"):5==E?t.setAttribute("class","a-link-button-inactive"):10==E?n.setAttribute("class","a-link-button-inactive"):a.setAttribute("class","a-link-button-inactive")}function C(e){if(s.a.money.lt(e.calculateLevelUpgradeCost(1)))return 0;var t=1,n=i.CONSTANTS.HacknetNodeMaxLevel-1,a=i.CONSTANTS.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.CONSTANTS.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 T(e){if(s.a.money.lt(e.calculateRamUpgradeCost(1)))return 0;const t=Math.round(Math.log2(i.CONSTANTS.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.CONSTANTS.HacknetNodeMaxCores-1;const a=i.CONSTANTS.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.CONSTANTS.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 S(){Object(p.clearEventListeners)("hacknet-nodes-purchase-button").addEventListener("click",function(){return y(),!1}),k();for(var e=document.getElementById("hacknet-nodes-list");e.firstChild;)e.removeChild(e.firstChild);for(var t=0;t<s.a.hacknetNodes.length;++t)P(s.a.hacknetNodes[t]);b(),M()}function M(){var e=v(),t=Object(d.getElementById)("hacknet-nodes-purchase-button");_("hacknet-nodes-purchase-button",`Purchase Hacknet Node - ${c.numeralWrapper.formatMoney(e)}`),s.a.money.lt(e)?t.setAttribute("class","a-link-button-inactive"):t.setAttribute("class","a-link-button"),_("hacknet-nodes-player-money",c.numeralWrapper.formatMoney(s.a.money.toNumber())),_("hacknet-nodes-total-production",c.numeralWrapper.formatMoney(g)+" / sec");for(var n=0;n<s.a.hacknetNodes.length;++n)A(s.a.hacknetNodes[n])}function P(e){var t=e.name,n=Object(h.createElement)("div",{class:"hacknet-node-level-container row",innerHTML:'<p>Level:</p><span class="text upgradable-info" id="hacknet-node-level-'+t+'"></span>'}),a=Object(h.createElement)("div",{class:"hacknet-node-ram-container row",innerHTML:'<p>RAM:</p><span class="text upgradable-info" id="hacknet-node-ram-'+t+'"></span>'}),i=Object(h.createElement)("div",{class:"hacknet-node-cores-container row",innerHTML:'<p>Cores:</p><span class="text upgradable-info" id="hacknet-node-cores-'+t+'"><span>'}),r=Object(h.createElement)("div",{class:"hacknet-node-container",innerHTML:'<div class="hacknet-node-name-container row"><p>Node name:</p><span class="text" id="hacknet-node-name-'+t+'"></span></div><div class="hacknet-node-production-container row"><p>Production:</p><span class="text" id="hacknet-node-total-production-'+t+'"></span><span class="text" id="hacknet-node-production-rate-'+t+'"></span></div>'});r.appendChild(n),r.appendChild(a),r.appendChild(i);var o=Object(h.createElement)("li",{class:"hacknet-node"});o.appendChild(r),n.appendChild(Object(h.createElement)("a",{id:"hacknet-node-upgrade-level-"+t,class:"a-link-button-inactive",clickListener:function(){let t=E;return 0==E&&(t=C(e)),e.purchaseLevelUpgrade(t),M(),!1}})),a.appendChild(Object(h.createElement)("a",{id:"hacknet-node-upgrade-ram-"+t,class:"a-link-button-inactive",clickListener:function(){let t=E;return 0==E&&(t=T(e)),e.purchaseRamUpgrade(t),M(),!1}})),i.appendChild(Object(h.createElement)("a",{id:"hacknet-node-upgrade-core-"+t,class:"a-link-button-inactive",clickListener:function(){let t=E;return 0==E&&(t=O(e)),e.purchaseCoreUpgrade(t),M(),!1}})),document.getElementById("hacknet-nodes-list").appendChild(o),A(e)}function A(e){var t=e.name;_("hacknet-node-name-"+t,t),_("hacknet-node-total-production-"+t,c.numeralWrapper.formatMoney(e.totalMoneyGenerated)),_("hacknet-node-production-rate-"+t,"("+c.numeralWrapper.formatMoney(e.moneyGainRatePerSecond)+" / sec)"),_("hacknet-node-level-"+t,e.level),_("hacknet-node-ram-"+t,e.ram+"GB"),_("hacknet-node-cores-"+t,e.cores);var n=Object(d.getElementById)("hacknet-node-upgrade-level-"+t);if(e.level>=i.CONSTANTS.HacknetNodeMaxLevel)_("hacknet-node-upgrade-level-"+t,"MAX LEVEL"),n.setAttribute("class","a-link-button-inactive");else{let o=0;if(0==E)o=C(e);else{var a=i.CONSTANTS.HacknetNodeMaxLevel-e.level;o=Math.min(a,E)}var r=e.calculateLevelUpgradeCost(o);_("hacknet-node-upgrade-level-"+t,"Upgrade x"+o+" - "+c.numeralWrapper.formatMoney(r)),s.a.money.lt(r)?n.setAttribute("class","a-link-button-inactive"):n.setAttribute("class","a-link-button")}var o=Object(d.getElementById)("hacknet-node-upgrade-ram-"+t);if(e.ram>=i.CONSTANTS.HacknetNodeMaxRam)_("hacknet-node-upgrade-ram-"+t,"MAX RAM"),o.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==E)n=T(e);else{a=Math.round(Math.log2(i.CONSTANTS.HacknetNodeMaxRam/e.ram));n=Math.min(a,E)}var l=e.calculateRamUpgradeCost(n);_("hacknet-node-upgrade-ram-"+t,"Upgrade x"+n+" - "+c.numeralWrapper.formatMoney(l)),s.a.money.lt(l)?o.setAttribute("class","a-link-button-inactive"):o.setAttribute("class","a-link-button")}var u=Object(d.getElementById)("hacknet-node-upgrade-core-"+t);if(e.cores>=i.CONSTANTS.HacknetNodeMaxCores)_("hacknet-node-upgrade-core-"+t,"MAX CORES"),u.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==E)n=O(e);else{a=i.CONSTANTS.HacknetNodeMaxCores-e.cores;n=Math.min(a,E)}var p=e.calculateCoreUpgradeCost(n);_("hacknet-node-upgrade-core-"+t,"Upgrade x"+n+" - "+c.numeralWrapper.formatMoney(p)),s.a.money.lt(p)?u.setAttribute("class","a-link-button-inactive"):u.setAttribute("class","a-link-button")}}function w(e){for(var t=0,n=0;n<s.a.hacknetNodes.length;++n)t+=x(e,s.a.hacknetNodes[n]);return t}function x(e,t){var n=1e3/r.Engine._idleSpeed,a=t.moneyGainRatePerSecond/n;isNaN(a)&&(console.error("Hacknet Node '"+t.name+"' Calculated earnings is NaN"),a=0);var i=e*a;return t.totalMoneyGenerated+=i,t.onlineTimeSeconds+=e*(r.Engine._idleSpeed/1e3),s.a.gainMoney(i),s.a.recordMoneySource(i,"hacknetnode"),i}},function(e,t,n){"use strict";n.d(t,"a",function(){return T}),n.d(t,"b",function(){return O}),n.d(t,"c",function(){return S});var a=n(39),i=n(0),r=n(21),o=n(3),s=n(9),l=n(99),c=n(70),u=n(4),p=n(96),m=n(43),h=n(68),d=n(102),g=n(7),_=n(33),f=n(75),y=n(117),b=n(12);let v={},E=[];const k=e=>{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(p.createProgressBarText)(n)}`.replace(/\s/g," ")},C=e=>{const t=v[e.hostname];if(null===t||void 0===t)return;const n=""+Object(y.roundToTwo)(e.ramUsed/e.maxRam);t.header.dataset.ramPercentage!==n&&(t.header.dataset.ramPercentage=n,t.header.innerHTML=k(e))};function T(e){var t=Object(r.getServer)(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==v[n]&&function(e){let t=e.hostname;var n=document.getElementById("active-scripts-list");let a=Object(l.createAccordionElement)({hdrText:k(e)}),i=a[0];var r=a[1];let o=a[2];if(null==v[t]){var s=Object(u.createElement)("ul");return o.appendChild(s),n.appendChild(i),v[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 i=["active","scripts",n,e.name],r=0;r<e.args.length;++r)i.push(String(e.args[r]));var o=i.join("-");let p=Object(l.createAccordionElement)({hdrText:e.name}),m=p[0],h=p[1],g=p[2];h.classList.remove("accordion-header"),h.classList.add("active-scripts-script-header"),g.classList.remove("accordion-panel"),g.classList.add("active-scripts-script-panel"),g.appendChild(Object(u.createElement)("p",{innerHTML:"Threads: "+e.scriptRef.threads+"<br>Args: "+Object(c.arrayToString)(e.args)}));var _=Object(u.createElement)("p",{innerText:"Loading...",fontSize:"14px"});g.appendChild(_),g.appendChild(Object(u.createElement)("br")),g.appendChild(Object(u.createElement)("span",{innerText:"Log",class:"accordion-button",margin:"4px",padding:"4px",clickListener:()=>(Object(d.a)(e.scriptRef),!1)})),g.appendChild(Object(u.createElement)("span",{innerText:"Kill Script",class:"accordion-button",margin:"4px",padding:"4px",clickListener:()=>(Object(a.d)(e.scriptRef,e.scriptRef.server),Object(s.dialogBoxCreate)("Killing script, may take a few minutes to complete..."),!1)})),v[n].panelList.appendChild(m),v[n].scripts[o]=m,v[n].scriptHdrs[o]=h,v[n].scriptStats[o]=_}.bind(null,e,n))}function O(e){E.push(function(e){var t=Object(r.getServer)(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==v[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;i<e.args.length;++i)a.push(String(e.args[i]));var o=a.join("-");let s=v[n].scripts[o];if(null==s)return console.log("ERROR: Cannot find Active Script UI element for workerscript: "),void console.log(e);Object(f.removeElement)(s),delete v[n].scripts[o],delete v[n].scriptHdrs[o],delete v[n].scriptStats[o],0===Object.keys(v[n].scripts).length&&function(e){let t=e.hostname;null!=v[t]?Object.keys(v[t].scripts).length>0?console.log("WARNING: Tried to delete Active Scripts Server panel that still has scripts. Aborting"):(Object(f.removeElement)(v[t].panel),Object(f.removeElement)(v[t].header),delete v[t]):console.log("WARNING: Tried to delete non-existent Active Scripts Server panel. Aborting")}(t)}.bind(null,e))}function S(e=150){let t=Math.min(e,E.length);for(let e=0;e<t;++e){let e=E.shift();try{e()}catch(t){Object(m.exceptionAlert)(t),console.log(e)}}if(b.routing.isOn(b.Page.ActiveScripts)){for(var n=0,r=0;r<a.h.length;++r)try{n+=M(a.h[r])}catch(e){Object(m.exceptionAlert)(e)}return Object(h.getElementById)("active-scripts-total-production-active").innerText=o.numeralWrapper.formatMoney(n),Object(h.getElementById)("active-scripts-total-prod-aug-total").innerText=o.numeralWrapper.formatMoney(i.a.scriptProdSinceLastAug),Object(h.getElementById)("active-scripts-total-prod-aug-avg").innerText=o.numeralWrapper.formatMoney(i.a.scriptProdSinceLastAug/(i.a.playtimeSinceLastAug/1e3)),n}}function M(e){var t=Object(r.getServer)(e.serverIp);if(null==t)return void console.log("ERROR: Invalid server IP for workerscript in updateActiveScriptsItemContent().");let n=t.hostname;if(null!=v[n]){C(t);for(var a=["active","scripts",t.hostname,e.name],i=0;i<e.args.length;++i)a.push(String(e.args[i]));var s=a.join("-");if(null!=v[n].scriptStats[s])return function(e,t,n){var a=Object(r.getServer)(e.serverIp);if(null==a)return void console.log("ERROR: Invalid server IP for workerscript for updateActiveScriptsText()");let i=a.hostname;if(null==v[i]||null==v[i].scriptHdrs[n])return void console.log("ERROR: Trying to update Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: "+i);C(a);var s=e.scriptRef.onlineMoneyMade/e.scriptRef.onlineRunningTime;if(!1===v[i].header.classList.contains("active"))return s;if(!1===v[i].scriptHdrs[n].classList.contains("active"))return s;Object(_.removeChildrenFromElement)(t);var l="Online Time: "+Object(g.convertTimeMsToTimeElapsedString)(1e3*e.scriptRef.onlineRunningTime),c="Offline Time: "+Object(g.convertTimeMsToTimeElapsedString)(1e3*e.scriptRef.offlineRunningTime),u="Total online production: "+o.numeralWrapper.formatMoney(e.scriptRef.onlineMoneyMade),p=(Array(26).join(" ")+o.numeralWrapper.formatBigNumber(e.scriptRef.onlineExpGained)+" hacking exp").replace(/ /g," "),m="Online production rate: "+o.numeralWrapper.formatMoney(s)+" / second",h=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime,d=(Array(25).join(" ")+o.numeralWrapper.formatBigNumber(h)+" hacking exp / second").replace(/ /g," "),f="Total offline production: "+o.numeralWrapper.formatMoney(e.scriptRef.offlineMoneyMade),y=(Array(27).join(" ")+o.numeralWrapper.formatBigNumber(e.scriptRef.offlineExpGained)+" hacking exp").replace(/ /g," "),b=e.scriptRef.offlineMoneyMade/e.scriptRef.offlineRunningTime,E="Offline production rate: "+o.numeralWrapper.formatMoney(b)+" / second",k=e.scriptRef.offlineExpGained/e.scriptRef.offlineRunningTime,T=(Array(26).join(" ")+o.numeralWrapper.formatBigNumber(k)+" hacking exp / second").replace(/ /g," ");return t.innerHTML=l+"<br>"+c+"<br>"+u+"<br>"+p+"<br>"+m+"<br>"+d+"<br>"+f+"<br>"+y+"<br>"+E+"<br>"+T+"<br>",s}(e,v[n].scriptStats[s],s)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(20),i=n(1);t.getStockMarketAccountCost=function(){return i.CONSTANTS.WSEAccountCost},t.getStockMarketTixApiCost=function(){return i.CONSTANTS.TIXAPICost},t.getStockMarket4SDataCost=function(){return i.CONSTANTS.MarketData4SCost*a.BitNodeMultipliers.FourSigmaMarketDataCost},t.getStockMarket4STixApiCost=function(){return i.CONSTANTS.MarketDataTixApi4SCost*a.BitNodeMultipliers.FourSigmaMarketDataApiCost}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectValue=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].value},t.getSelectText=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].text}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cities={Aevum:"Aevum",Chongqing:"Chongqing",Ishima:"Ishima",NewTokyo:"New Tokyo",Sector12:"Sector-12",Volhaven:"Volhaven"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(23),i=n(272);function r(e){return null!=a.AllServers[e]}t.createRandomIp=function e(){const t=i.getRandomByte(99)+"."+i.getRandomByte(9)+"."+i.getRandomByte(9)+"."+i.getRandomByte(9);return r(t)?e():t},t.ipExists=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialSizes={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:0,"Real Estate":0,"AI Cores":0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(270),i=n(30);t.DarkWebItems={BruteSSHProgram:new a.DarkWebItem(i.Programs.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new a.DarkWebItem(i.Programs.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new a.DarkWebItem(i.Programs.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new a.DarkWebItem(i.Programs.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new a.DarkWebItem(i.Programs.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new a.DarkWebItem(i.Programs.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new a.DarkWebItem(i.Programs.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new a.DarkWebItem(i.Programs.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'"),ServerProfilerProgram:new a.DarkWebItem(i.Programs.ServerProfiler.name,1e6,"Displays hacking and Netscript-related information about a server")}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(19);function i(){this.data=[]}i.prototype.write=function(e){return this.data.push(e),this.data.length>a.Settings.MaxPortCapacity?this.data.shift():null},i.prototype.tryWrite=function(e){return!(this.data.length>=a.Settings.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.Settings.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 R}),n.d(t,"a",function(){return L});var a=n(51),i=n(18),r=(n(121),n(1)),o=n(11),s=n(14),l=n(53),c=n(107),u=n(34),p=n(66),m=n(84),h=n(65),d=n(0),g=n(59),_=n(23),f=n(19),y=n(40),b=n(29),v=n(64),E=n(9),k=n(110),C=n(22),T=n(17),O=n(7),S=n(4),M=n(37),P=n(97),A=n(3),w=n(26),x=n(46);let R=new N;function N(){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 I(e){if(e<="0.41.2")for(var t in null!=d.a.companyPosition&&"string"!=typeof d.a.companyPosition&&(console.log("Changed Player.companyPosition value to be compatible with v0.41.2"),d.a.companyPosition=d.a.companyPosition.data.positionName,null==d.a.companyPosition&&(d.a.companyPosition="")),i.Companies){const e=i.Companies[t];if(null!=e.name&&0!==e.name&&""!==e.name||null==e.companyName||(console.log("Changed company name property to be compatible with v0.41.2"),e.name=e.companyName),e.companyPositions instanceof Array){console.log("Changed company companyPositions property to be compatible with v0.41.2");const t={};for(let n=0;n<e.companyPositions.length;++n)t[e.companyPositions[n]]=!0;e.companyPositions=t}}e<"0.43.0"&&(""!==d.a.companyName&&null!=d.a.companyPosition&&""!==d.a.companyPosition&&(console.log("Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0"),d.a.jobs[d.a.companyName]=d.a.companyPosition),delete d.a.companyPosition)}function L(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,T.Reviver);if(Object(d.b)(t.PlayerSave),Object(_.loadAllServers)(t.AllServersSave),Object(i.loadCompanies)(t.CompaniesSave),Object(s.loadFactions)(t.FactionsSave),Object(y.loadSpecialServerIps)(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(h.d)(t.MessagesSave)}catch(e){Object(h.c)()}else Object(h.c)();if(t.hasOwnProperty("StockMarketSave"))try{Object(b.k)(t.StockMarketSave)}catch(e){Object(b.k)("")}else Object(b.k)("");if(t.hasOwnProperty("SettingsSave"))try{f.Settings.load(t.SettingsSave)}catch(e){console.log("ERROR: Failed to parse Settings. Re-initing default values"),f.Settings.init()}else f.Settings.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(c.b)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,T.Reviver);I(n),window.location.href.toLowerCase().includes("bitburner-beta")?Object(E.dialogBoxCreate)("You are playing on the beta environment! This branch of the game features the latest developments in the game. This version may be unstable.<br>Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+r.CONSTANTS.LatestUpdate):n!=r.CONSTANTS.Version&&D()}catch(e){D()}else D();if(2==d.a.bitNodeN&&d.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(p.c)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function D(){Object(E.dialogBoxCreate)("New update!<br>Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+r.CONSTANTS.LatestUpdate)}function B(t){var n=t.target.files[0];if(n){var u=new FileReader;u.onload=function(t){var n=t.target.result;!function(t,n){var u=null,v=null;try{var C=decodeURIComponent(escape(atob(n)));if(u=new N,u=JSON.parse(C,T.Reviver),(v=JSON.parse(u.PlayerSave,T.Reviver)).money=new x.a(v.money),JSON.parse(u.AllServersSave,T.Reviver),JSON.parse(u.CompaniesSave,T.Reviver),JSON.parse(u.FactionsSave,T.Reviver),JSON.parse(u.SpecialServerIpsSave,T.Reviver),u.hasOwnProperty("AliasesSave"))try{JSON.parse(u.AliasesSave,T.Reviver)}catch(e){console.log("Parsing Aliases save failed: "+e)}if(u.hasOwnProperty("GlobalAliases"))try{JSON.parse(u.AliasesSave,T.Reviver)}catch(e){console.log("Parsing Global Aliases save failed: "+e)}if(u.hasOwnProperty("MessagesSave"))try{JSON.parse(u.MessagesSave,T.Reviver)}catch(e){console.log("Parsing Messages save failed: "+e),Object(h.c)()}else Object(h.c)();if(t.hasOwnProperty("StockMarketSave"))try{JSON.parse(u.StockMarketSave,T.Reviver)}catch(e){console.log("Parsing StockMarket save failed: "+e)}if(u.hasOwnProperty("VersionSave"))try{I(P=JSON.parse(u.VersionSave,T.Reviver))}catch(e){console.error("Parsing Version save failed: "+e)}if(2==v.bitNodeN&&v.inGang()&&u.hasOwnProperty("AllGangsSave"))try{Object(p.c)(u.AllGangsSave)}catch(e){throw console.error("Failed to parse AllGangsSave: {e}"),e}}catch(e){return Object(E.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(n=decodeURIComponent(escape(atob(n))),t=JSON.parse(n,T.Reviver),Object(d.b)(t.PlayerSave),Object(_.loadAllServers)(t.AllServersSave),Object(i.loadCompanies)(t.CompaniesSave),Object(s.loadFactions)(t.FactionsSave),Object(y.loadSpecialServerIps)(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(h.d)(t.MessagesSave)}catch(e){Object(h.c)()}else Object(h.c)();if(t.hasOwnProperty("StockMarketSave"))try{Object(b.k)(t.StockMarketSave)}catch(e){Object(b.k)("")}else Object(b.k)("");if(t.hasOwnProperty("SettingsSave"))try{f.Settings.load(t.SettingsSave)}catch(e){f.Settings.init()}else f.Settings.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(c.b)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to load .fconf settings when importing")}if(t.hasOwnProperty("VersionSave"))try{var P;I(P=JSON.parse(t.VersionSave,T.Reviver)),P!=r.CONSTANTS.Version&&D()}catch(e){D()}else D();if(2==d.a.bitNodeN&&d.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(p.c)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}var R="import-game-restart-game-notice",L=Object(S.createElement)("p",{innerText:"Imported game! You need to SAVE the game and then RELOAD the page to make sure everything runs smoothly"}),B=Object(S.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(w.removeElementById)(R)}});Object(M.createPopup)(R,[L,B]),Object(k.a)(),console.log("Importing game"),o.Engine.setDisplayElements(),o.Engine.init(),o.Engine._lastUpdate=(new Date).getTime();var W=d.a.lastUpdate,j=Math.floor((o.Engine._lastUpdate-W)/o.Engine._idleSpeed),F=Object(g.c)();d.a.isWorking&&(console.log("work() called in load() for "+j*o.Engine._idleSpeed+" milliseconds"),d.a.workType==r.CONSTANTS.WorkTypeFaction?d.a.workForFaction(j):d.a.workType==r.CONSTANTS.WorkTypeCreateProgram?d.a.createProgramWork(j):d.a.workType==r.CONSTANTS.WorkTypeStudyClass?d.a.takeClass(j):d.a.workType==r.CONSTANTS.WorkTypeCrime?d.a.commitCrime(j):d.a.workType==r.CONSTANTS.WorkTypeCompanyPartTime?d.a.workPartTime(j):d.a.work(j));var U=Object(m.d)(j);Object(l.d)(j);var H=j*o.Engine._idleSpeed;null==d.a.totalPlaytime&&(d.a.totalPlaytime=0),null==d.a.playtimeSinceLastAug&&(d.a.playtimeSinceLastAug=0),null==d.a.playtimeSinceLastBitnode&&(d.a.playtimeSinceLastBitnode=0),d.a.totalPlaytime+=H,d.a.playtimeSinceLastAug+=H,d.a.playtimeSinceLastBitnode+=H,d.a.reapplyAllAugmentations(),e("#terminal tr:not(:last)").remove(),d.a.lastUpdate=o.Engine._lastUpdate,o.Engine.start();const G=Object(O.convertTimeMsToTimeElapsedString)(H);Object(E.dialogBoxCreate)(`Offline for ${G}. While you were offline, your scripts `+"generated <span class='money-gold'>"+A.numeralWrapper.formatMoney(F)+"</span> and your Hacknet Nodes generated <span class='money-gold'>"+A.numeralWrapper.formatMoney(U)+"</span>")}(R,n)},u.readAsText(n)}else Object(E.dialogBoxCreate)("Invalid file selected")}N.prototype.getSaveString=function(){this.PlayerSave=JSON.stringify(d.a);var e=JSON.parse(JSON.stringify(_.AllServers),T.Reviver);for(var t in e){var n=e[t];if(null!=n)for(var o=0;o<n.runningScripts.length;++o){var l=n.runningScripts[o];l.logs.length=0,l.logs=[]}}return this.AllServersSave=JSON.stringify(e),this.CompaniesSave=JSON.stringify(i.Companies),this.FactionsSave=JSON.stringify(s.Factions),this.SpecialServerIpsSave=JSON.stringify(y.SpecialServerIps),this.AliasesSave=JSON.stringify(a.a),this.GlobalAliasesSave=JSON.stringify(a.b),this.MessagesSave=JSON.stringify(h.a),this.StockMarketSave=JSON.stringify(b.c),this.SettingsSave=JSON.stringify(f.Settings),this.FconfSettingsSave=JSON.stringify(u.FconfSettings),this.VersionSave=JSON.stringify(r.CONSTANTS.Version),2==d.a.bitNodeN&&d.a.inGang()&&(this.AllGangsSave=JSON.stringify(p.a)),btoa(unescape(encodeURIComponent(JSON.stringify(this))))},N.prototype.saveGame=function(e){var t=this.getSaveString(),n=e.transaction(["savestring"],"readwrite").objectStore("savestring").put(t,"save");n.onerror=function(e){console.log("Error saving game to IndexedDB: "+e)},n.onsuccess=function(e){};try{window.localStorage.setItem("bitburnerSave",t)}catch(e){22==e.code&&(Object(P.createStatusText)("Save failed for localStorage! Check console(F12)"),console.log("Failed to save game to localStorage because the size of the save file is too large. However, the game will still be saved to IndexedDb if your browser supports it. If you would like to save to localStorage as well, then consider killing several of your scripts to fix this, or increasing the size of your browsers localStorage"))}Object(P.createStatusText)("Game saved!")},N.prototype.exportGame=function(){this.PlayerSave=JSON.stringify(d.a),this.AllServersSave=JSON.stringify(_.AllServers),this.CompaniesSave=JSON.stringify(i.Companies),this.FactionsSave=JSON.stringify(s.Factions),this.SpecialServerIpsSave=JSON.stringify(y.SpecialServerIps),this.AliasesSave=JSON.stringify(a.a),this.GlobalAliasesSave=JSON.stringify(a.b),this.MessagesSave=JSON.stringify(h.a),this.StockMarketSave=JSON.stringify(b.c),this.SettingsSave=JSON.stringify(f.Settings),this.VersionSave=JSON.stringify(r.CONSTANTS.Version),2==d.a.bitNodeN&&d.a.inGang()&&(this.AllGangsSave=JSON.stringify(p.a));var e=btoa(unescape(encodeURIComponent(JSON.stringify(this)))),t=new Blob([e],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,"bitburnerSave.json");else{var n=document.createElement("a"),o=URL.createObjectURL(t);n.href=o,n.download="bitburnerSave.json",document.body.appendChild(n),n.click(),Object(v.setTimeoutRef)(function(){document.body.removeChild(n),window.URL.revokeObjectURL(o)},0)}},N.prototype.importGame=function(){window.File&&window.FileReader&&window.FileList&&window.Blob?(Object(C.clearEventListeners)("import-game-file-selector").addEventListener("change",B,!1),e("#import-game-file-selector").click()):Object(E.dialogBoxCreate)("ERR: Your browser does not support HTML5 File API. Cannot import.")},N.prototype.deleteGame=function(e){window.localStorage.getItem("bitburnerSave")&&window.localStorage.removeItem("bitburnerSave");var t=e.transaction(["savestring"],"readwrite").objectStore("savestring").delete("save");t.onsuccess=function(e){console.log("Successfully deleted save from indexedDb")},t.onerror=function(e){console.log("Failed to delete save from indexedDb: "+e)},Object(P.createStatusText)("Game deleted!")},N.prototype.toJSON=function(){return Object(T.Generic_toJSON)("BitburnerSaveObject",this)},N.fromJSON=function(e){return Object(T.Generic_fromJSON)(N,e.data)},T.Reviver.constructors.BitburnerSaveObject=N}).call(this,n(79))},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return s});var a=n(0),i=n(78);function r(e,t=""){var n="BitNode"+e,a=i.BitNodes[n];if(null==a)throw new Error("Invalid Bit Node for this Source File");this.n=e,this.name="Source-File "+e+": "+a.name,this.lvl=1,this.info=t,this.owned=!1}let o={};function s(){(o={}).SourceFile1=new r(1,"This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),o.SourceFile2=new r(2,"This Source-File increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),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:<br>Level 1: 8%<br>Level 2: 12%<br>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:<br><br> Level 1: 8%<br>Level 2: 12%<br>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:<br><br>Level 1: 8%<br>Level 2: 12%<br>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:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),o.SourceFile8=new r(8,"This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),o.SourceFile9=new r(9),o.SourceFile10=new r(10,"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),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:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%<br>"),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){var t="SourceFile"+e.n,n=o[t];if(null!=n){switch(e.n){case 1:for(var i=0,r=0;r<e.lvl;++r)i+=16/Math.pow(2,r);var s=1+i/100,l=1-i/100;a.a.hacking_chance_mult*=s,a.a.hacking_speed_mult*=s,a.a.hacking_money_mult*=s,a.a.hacking_grow_mult*=s,a.a.hacking_mult*=s,a.a.strength_mult*=s,a.a.defense_mult*=s,a.a.dexterity_mult*=s,a.a.agility_mult*=s,a.a.charisma_mult*=s,a.a.hacking_exp_mult*=s,a.a.strength_exp_mult*=s,a.a.defense_exp_mult*=s,a.a.dexterity_exp_mult*=s,a.a.agility_exp_mult*=s,a.a.charisma_exp_mult*=s,a.a.company_rep_mult*=s,a.a.faction_rep_mult*=s,a.a.crime_money_mult*=s,a.a.crime_success_mult*=s,a.a.hacknet_node_money_mult*=s,a.a.hacknet_node_purchase_cost_mult*=l,a.a.hacknet_node_ram_cost_mult*=l,a.a.hacknet_node_core_cost_mult*=l,a.a.hacknet_node_level_cost_mult*=l,a.a.work_money_mult*=s;break;case 2:for(i=0,r=0;r<e.lvl;++r)i+=24/Math.pow(2,r);s=1+i/100;a.a.crime_money_mult*=s,a.a.crime_success_mult*=s,a.a.charisma_mult*=s;break;case 3:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.charisma_mult*=s,a.a.work_money_mult*=s;break;case 4:break;case 5:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.hacking_chance_mult*=s,a.a.hacking_speed_mult*=s,a.a.hacking_money_mult*=s,a.a.hacking_grow_mult*=s,a.a.hacking_mult*=s,a.a.hacking_exp_mult*=s;break;case 6:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.strength_exp_mult*=s,a.a.defense_exp_mult*=s,a.a.dexterity_exp_mult*=s,a.a.agility_exp_mult*=s,a.a.strength_mult*=s,a.a.defense_mult*=s,a.a.dexterity_mult*=s,a.a.agility_mult*=s;break;case 7:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.bladeburner_max_stamina_mult*=s,a.a.bladeburner_stamina_gain_mult*=s,a.a.bladeburner_analysis_mult*=s,a.a.bladeburner_success_chance_mult*=s;break;case 8:for(i=0,r=0;r<e.lvl;++r)i+=12/Math.pow(2,r);s=1+i/100;a.a.hacking_grow_mult*=s;break;case 10:break;case 11:for(i=0,r=0;r<e.lvl;++r)i+=24/Math.pow(2,r);s=1+i/100;a.a.work_money_mult*=s,a.a.company_rep_mult*=s;break;case 12:var c=Math.pow(1.01,e.lvl),u=Math.pow(.99,e.lvl);a.a.hacking_chance_mult*=c,a.a.hacking_speed_mult*=c,a.a.hacking_money_mult*=c,a.a.hacking_grow_mult*=c,a.a.hacking_mult*=c,a.a.strength_mult*=c,a.a.defense_mult*=c,a.a.dexterity_mult*=c,a.a.agility_mult*=c,a.a.charisma_mult*=c,a.a.hacking_exp_mult*=c,a.a.strength_exp_mult*=c,a.a.defense_exp_mult*=c,a.a.dexterity_exp_mult*=c,a.a.agility_exp_mult*=c,a.a.charisma_exp_mult*=c,a.a.company_rep_mult*=c,a.a.faction_rep_mult*=c,a.a.crime_money_mult*=c,a.a.crime_success_mult*=c,a.a.hacknet_node_money_mult*=c,a.a.hacknet_node_purchase_cost_mult*=u,a.a.hacknet_node_ram_cost_mult*=u,a.a.hacknet_node_core_cost_mult*=u,a.a.hacknet_node_level_cost_mult*=u,a.a.work_money_mult*=c;break;default:console.log("ERROR: Invalid source file number: "+e.n)}n.owned=!0}else console.log("ERROR: Invalid source file number: "+e.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);t.progress=Math.max(Math.min(t.progress,1),0);const n=Math.max(Math.floor(t.progress/(1/t.totalTicks)),1),a=Math.max(t.totalTicks-n,0);return`[${"|".repeat(n)}${"-".repeat(a)}]`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(64),i=n(68),r=3e3;let o;t.createStatusText=function(e){void 0!==o&&(clearTimeout(o),o=void 0);const t=i.getElementById("status-text");t.style.display="block",t.classList.add("status-text"),t.innerText=e,o=a.setTimeoutRef(()=>{t.innerText="",t.style.display="none",t.classList.remove("status-text")},r)}},function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}l((a=a.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const i=n(153),r=n(12),o=n(64),s=n(17),l=n(117);class c{constructor(e="",t="",n=""){this.code="",this.filename="",this.module="",this.ramUsage=0,this.server="",this.filename=e,this.code=t,this.ramUsage=0,this.server=n,this.module="",""!==this.code&&this.updateRamUsage()}static fromJSON(e){return s.Generic_fromJSON(c,e.data)}download(){const e=this.filename+".js",t=new Blob([this.code],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{var n=document.createElement("a"),a=URL.createObjectURL(t);n.href=a,n.download=e,document.body.appendChild(n),n.click(),o.setTimeoutRef(function(){document.body.removeChild(n),window.URL.revokeObjectURL(a)},0)}}saveScript(e,t){if(r.routing.isOn(r.Page.ScriptEditor)){this.code=e.replace(/^\s+|\s+$/g,"");const n=document.getElementById("script-editor-filename");if(null==n)return void console.error("Failed to get Script filename DOM element");this.filename=n.value,this.server=t.currentServer,this.updateRamUsage(),this.module=""}}updateRamUsage(){return a(this,void 0,void 0,function*(){var e=yield i.calculateRamUsage(this.code);-1!==e&&(this.ramUsage=l.roundToTwo(e))})}toJSON(){return s.Generic_toJSON("Script",this)}}t.Script=c,s.Reviver.constructors.Script=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(4);t.createAccordionElement=function(e){const t=a.createElement("li"),n=a.createElement("button",{class:"accordion-header",clickListener(){this.classList.toggle("active");const e=this.nextElementSibling.style;e.display="block"===e.display?"none":"block"},id:void 0!==e.id?`${e.id}-hdr`:void 0,innerHTML:e.hdrText}),i=a.createElement("div",{class:"accordion-panel",id:void 0!==e.id?`${e.id}-panel`:void 0,innerHTML:e.panelText});return t.appendChild(n),t.appendChild(i),[t,n,i]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearObject=function(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PlayerOwnedAugmentation=class{constructor(e=""){this.level=1,this.name="",this.name=e}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"b",function(){return s});var a=n(39),i=n(22),r=n(70);function o(){s=!1,document.getElementById("log-box-container").style.display="none"}e(document).keydown(function(e){s&&27==e.keyCode&&o()}),document.addEventListener("DOMContentLoaded",function(){var e=document.getElementById("log-box-close");o(),e.addEventListener("click",function(){return o(),!1}),document.getElementById("log-box-text-header").style.display="inline-block"},!1);var s=!1,l=null;function c(e){l=e,Object(i.clearEventListeners)("log-box-kill-script").addEventListener("click",()=>(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)+":<br><br>",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.logs.length;++t)e.innerHTML+=l.logs[t],e.innerHTML+="<br>";l.logUpd=!1}}}).call(this,n(79))},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var a=n(136),i=(n(417),n(416),n(415),n(414),n(413),n(412),n(411),n(410),n(409),n(408),n(407),n(406),n(405),n(404),n(403),n(402),n(401),n(400),n(399),n(398),n(397),n(396),n(395),n(394),n(393),n(392),n(391),n(390),n(389),n(388),n(387),n(386),n(385),n(384),n(383),n(382),n(381),n(380),n(379),n(378),n(377),n(376),n(375),n(374),n(373),n(372),n(371),n(370),n(369),n(368),n(367),n(366),n(365),n(364),n(363),n(362),n(279),n(52)),r=n.n(i),o=(n(361),n(277),n(360),n(359),n(358),n(357),n(356),n(275),n(355),n(204),n(274),n(354),n(353),n(352),n(351),n(350),n(349),n(348),n(347),n(346),n(345),n(344),n(343),n(273),n(50)),s=n(47),l=n(19),c=n(22),u=n(4),p=n(58),m=(n(88),n(33));window.JSHINT=n(342).JSHINT;const h=20;const d=new class extends a.a{constructor(){super(),this.vimCommandDisplay=null,this.vimCommandDisplayWrapper=null,this.tabsStyleElement=null}init(e){if(null!=this.editor)return console.error("CodeMirrorEditor.init() called when it's already initialized"),!1;if(!function(e){return null!=e.saveAndCloseFn&&null!=e.quitFn}(e))return console.error("'params' argument passed into CodeMirrorEditor.init() does not have proper properties"),!1;if(this.filenameInput=document.getElementById("script-editor-filename"),null==this.filenameInput)return console.error("Could not get Script Editor filename element (id=script-editor-filename)"),!1;const t=document.createElement("style");t.setAttribute("data-name","js-show-invisibles");let n="",a="";for(let e=1;e<=h;++e)n+=".CodeMirror .cm-whitespace-"+e+'::before { content: "'+(a+="·")+'";}\n';t.textContent=n,document.head.appendChild(t),this.tabsStyleElement=document.createElement("style"),document.head.appendChild(this.tabsStyleElement),this.vimCommandDisplay=document.getElementById("codemirror-vim-command-display"),this.vimCommandDisplayWrapper=document.getElementById("codemirror-vim-command-display-wrapper"),r.a.commands.save=function(){e.saveAndCloseFn()};const i=[];var s=Object(o.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(i.push(e),["bladeburner","hacknet","codingcontract","gang","sleeve"].includes(e))){let t=s[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)i.push(n[e])}r.a.hint.netscript=function(e){const t=r.a.hint.javascript(e)||{from:e.getCursor(),to:e.getCursor(),list:[]};t.list.push(...i);let n=t.list||[],a=e.getCursor(),o=e.getLine(a.line),s=a.ch,l=s;for(;l<o.length&&/[\w$]+/.test(o.charAt(l));)++l;for(;s&&/[\w$]+/.test(o.charAt(s-1));)--s;let c=s!=l&&o.slice(s,l),u=new RegExp("^"+c,"i");return{list:(c?n.filter(function(e){return e.match(u)}):n).sort(),from:r.a.Pos(a.line,s),to:r.a.Pos(a.line,l)}};var l=r.a.Vim;l.defineEx("write","w",function(t,n){e.saveAndCloseFn()}),l.defineEx("quit","q",function(t,n){e.quitFn()}),l.defineEx("xwritequit","x",function(t,n){e.saveAndCloseFn()}),l.defineEx("wqwritequit","wq",function(t,n){e.saveAndCloseFn()})}initialized(){return null!=this.filenameInput}create(){function e(e,t=""){const n=document.getElementById(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}function t(e,t=""){const n=Object(c.clearEventListeners)(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}try{if(!this.initialized())return void console.warn("CodeMirrorEditor.create() called when editor was not initialized");Object.values(s.CodeMirrorKeybindingSetting).includes(l.Settings.EditorKeybinding)||(l.Settings.EditorKeybinding=s.CodeMirrorKeybindingSetting.Default);const o=e("codemirror-editor","CodeMirror Textarea");e("codemirror-form-wrapper","CodeMirror Form Wrapper").style.display="block",this.editor=r.a.fromTextArea(o,{autofocus:!0,extraKeys:{"Ctrl-Space":"autocomplete"},foldGutter:!0,gutters:["CodeMirror-lint-markers","CodeMirror-linenumbers","CodeMirror-foldgutter"],highlightSelectionMatches:!0,hintOptions:{hint:r.a.hint.netscript},indentUnit:4,keyMap:"default",lineNumbers:!0,matchBrackets:!0,maxInvisibles:32,mode:"netscript",theme:l.Settings.EditorTheme});const c=t("script-editor-option-theme","Theme Selector");Object(m.removeChildrenFromElement)(c);const d=Object.keys(s.CodeMirrorThemeSetting);for(let e=0;e<d.length;++e){const t=d[e],n=s.CodeMirrorThemeSetting[t];c.add(Object(p.createOptionElement)(t,n))}if(l.Settings.EditorTheme){for(var n=0,a=0;a<c.options.length;++a)if(c.options[a].value===l.Settings.EditorTheme){n=a;break}c.selectedIndex=n}else c.selectedIndex=0;c.onchange=(()=>{const e=c.value;l.Settings.EditorTheme=e,this.editor.setOption("theme",e)}),c.onchange();const g=t("script-editor-option-keybinding","Keymap Selector");if(null==g)return console.error('Could not find Script Editor\'s keybinding selector element (id="script-editor-option-keybinding")'),!1;if(Object(m.removeChildrenFromElement)(g),g.add(Object(p.createOptionElement)("Default",s.CodeMirrorKeybindingSetting.Default)),g.add(Object(p.createOptionElement)("Sublime",s.CodeMirrorKeybindingSetting.Sublime)),g.add(Object(p.createOptionElement)("Vim",s.CodeMirrorKeybindingSetting.Vim)),g.add(Object(p.createOptionElement)("Emacs",s.CodeMirrorKeybindingSetting.Emacs)),l.Settings.EditorKeybinding){for(n=0,a=0;a<g.options.length;++a)if(g.options[a].value===l.Settings.EditorKeybinding){n=a;break}g.selectedIndex=n}else g.selectedIndex=0;g.onchange=(()=>{this.vimCommandDisplayWrapper.style.display="none";const e=g.value;l.Settings.EditorKeybinding=e,this.editor.removeKeyMap(r.a.keyMap.default),this.editor.removeKeyMap(r.a.keyMap.sublime),this.editor.removeKeyMap(r.a.keyMap.emacs),this.editor.removeKeyMap(r.a.keyMap.vim);let t="";const n=e=>{t+=e,this.vimCommandDisplay.innerHTML=t},a=e=>{t="",this.vimCommandDisplay.innerHTML=t};e===s.CodeMirrorKeybindingSetting.Vim?(this.vimCommandDisplayWrapper.style.display="block",this.editor.on("vim-keypress",n),this.editor.on("vim-command-done",a)):(this.vimCommandDisplayWrapper.style.display="none",this.editor.off("vim-keypress",n),this.editor.off("vim-command-done",a)),this.editor.addKeyMap(e),this.editor.setOption("keyMap",e)}),g.onchange();const _=t("script-editor-option-highlightactiveline","Active Line Checkbox");_.onchange=(()=>{this.editor.setOption("styleActiveLine",_.checked)}),_.onchange();const f=t("script-editor-option-showinvisibles","Show Invisible Checkbox");f.onchange=(()=>{const e={name:"invisibles",token:function(e){var t,n=0,a=" "===e.peek();if(a){for(;a&&n<h;)++n,e.next(),a=" "===e.peek();t="whitespace whitespace-"+n}else{for(;!e.eol()&&!a;)e.next(),a=" "===e.peek();t="cm-eol"}return t}};f.checked?(this.editor.addOverlay(e),this.tabsStyleElement.innerHTML=".cm-tab {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABDSURBVEhLYxgFo2BkAGYH/9r/QFoAxIGyhx6AORzZA4xD1TcHNjYzQplDB2CLgaECYHkADIZqqgGBoZdsRsHgBgwMAB8iFHF42AERAAAAAElFTkSuQmCC);background-position: right;background-repeat: no-repeat;}"):(this.editor.removeOverlay("invisibles"),this.tabsStyleElement.innerHTML="")}),f.onchange();const y=t("script-editor-option-usesofttab","Soft Tab Checkbox");function i(t){const n=e(t);return Object(m.removeChildrenFromElement)(n),n.style.display="block",n}y.onchange=(()=>{this.editor.setOption("indentWithTabs",!y.checked),y.checked?this.editor.addKeyMap({name:"soft-tabs-keymap",Tab:function(e){if(e.somethingSelected()){var t=e.getSelection("\n");if(t.length>0&&(t.indexOf("\n")>-1||t.length===e.getLine(e.getCursor().line).length))return void e.indentSelection("add")}e.options.indentWithTabs?e.execCommand("insertTab"):e.execCommand("insertSoftTab")},"Shift-Tab":function(e){e.indentSelection("subtract")}}):this.editor.removeKeyMap("soft-tabs-keymap")}),y.onchange();const b=i("script-editor-option-flex1-fieldset"),v="script-editor-option-flex1";b.appendChild(Object(u.createElement)("label",{for:v,innerText:"Auto-Close Brackets/Quotes"}));const E=Object(u.createElement)("input",{checked:!0,id:v,name:v,type:"checkbox"});b.appendChild(E),E.onchange=(()=>{this.editor.setOption("autoCloseBrackets",E.checked)}),E.onchange();const k=i("script-editor-option-flex2-fieldset"),C="script-editor-option-flex2";k.appendChild(Object(u.createElement)("label",{for:C,innerText:"Enable Linting"}));const T=Object(u.createElement)("input",{checked:!0,id:C,name:C,type:"checkbox"});k.appendChild(T),T.onchange=(()=>{T.checked?this.editor.setOption("lint",r.a.lint.netscript):this.editor.setOption("lint",!1)}),T.onchange();const O=i("script-editor-option-flex3-fieldset"),S="script-editor-option-flex3";O.appendChild(Object(u.createElement)("label",{for:S,innerText:"Continue Comments"}));const M=Object(u.createElement)("input",{checked:!0,id:S,name:S,type:"checkbox"});O.appendChild(M),M.onchange=(()=>{this.editor.setOption("continueComments",M.checked)}),M.onchange(),function(e){const t=i(e);t.style.display="none"}("script-editor-option-flex4-fieldset"),this.editor.refresh()}catch(e){return console.error(`Exception caught: ${e}. ${e.stack}`),!1}}isFocused(){return null!=this.editor&&this.editor.hasFocus()}setInvisible(){if(!this.initialized())return void console.warn("CodeMirrorEditor.setInvisible() called when editor was not initialized");null!=this.editor&&(this.editor.toTextArea(),this.editor=null);const e=document.getElementById("codemirror-form-wrapper");e instanceof HTMLElement&&(e.style.display="none")}}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var a=n(136),i=n(50),r=n(19),o=n(47),s=n(22),l=n(4),c=n(58),u=(n(88),n(33));const p=n(430);n(429),n(280),n(428),n(427),n(426),n(425),n(424),n(423),n(422),n(421),n(420),n(419),n(418);const m={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};const h=new class extends a.a{constructor(){super(),this.vimCommandDisplayWrapper=null}init(e){if(null!=this.editor)return console.error("AceEditor.init() called when it's already initialized"),!1;if(!function(e){return null!=e.saveAndCloseFn&&null!=e.quitFn}(e))return console.error("'params' argument passed into initAceEditor() does not have proper properties"),!1;if(this.filenameInput=document.getElementById("script-editor-filename"),null==this.filenameInput)return console.error("Could not get Script Editor filename element (id=script-editor-filename)"),!1;this.editor=p.edit("ace-editor"),this.editor.getSession().setMode("ace/mode/netscript"),this.editor.setTheme("ace/theme/monokai");const t=document.getElementById("ace-editor");if(null==t)return!1;if(t.style.fontSize="16px",this.editor.setOption("showPrintMargin",!1),p.config.loadModule("ace/keyboard/vim",function(t){var n=t.CodeMirror.Vim;n.defineEx("write","w",function(t,n){e.saveAndCloseFn()}),n.defineEx("quit","q",function(t,n){e.quitFn()}),n.defineEx("xwritequit","x",function(t,n){e.saveAndCloseFn()}),n.defineEx("wqwritequit","wq",function(t,n){e.saveAndCloseFn()})}),this.vimCommandDisplayWrapper=document.getElementById("codemirror-vim-command-display-wrapper"),null==this.vimCommandDisplayWrapper)return console.error("Could not get Vim Command Display element (id=codemirror-vim-command-display-wrapper)"),!1;this.editor.setOption("enableBasicAutocompletion",!0);var n={getCompletions:function(e,t,n,a,r){if(0!==a.length){var o=[],s=Object(i.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(o.push({name:e,value:e}),["bladeburner","hacknet","codingcontract","gang","sleeve"].includes(e))){let t=s[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)o.push({name:n[e],value:n[e]})}r(null,o)}else r(null,[])}};return this.editor.completers=[n],!0}initialized(){return null!=this.editor}create(){function e(e,t=""){const n=document.getElementById(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}function t(e,t=""){const n=Object(s.clearEventListeners)(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}try{e("script-editor-options-panel","Script Editor Options Panel");const s=document.getElementById("ace-editor");s instanceof HTMLElement&&(s.style.display="block"),this.vimCommandDisplayWrapper instanceof HTMLElement&&(this.vimCommandDisplayWrapper.style.display="none");const h=t("script-editor-option-theme","Theme Selector");if(Object(u.removeChildrenFromElement)(h),h.add(Object(c.createOptionElement)("Chaos")),h.add(Object(c.createOptionElement)("Chrome")),h.add(Object(c.createOptionElement)("Monokai")),h.add(Object(c.createOptionElement)("Solarized Dark","Solarized_Dark")),h.add(Object(c.createOptionElement)("Solarized Light","Solarized_Light")),h.add(Object(c.createOptionElement)("Terminal")),h.add(Object(c.createOptionElement)("Twilight")),h.add(Object(c.createOptionElement)("XCode")),r.Settings.EditorTheme){for(var n=2,a=0;a<h.options.length;++a)if(h.options[a].value===r.Settings.EditorTheme){n=a;break}h.selectedIndex=n}else h.selectedIndex=2;h.onchange=(()=>{const e=h.value;r.Settings.EditorTheme=e;const t="ace/theme/"+e.toLowerCase();this.editor.setTheme(t)}),h.onchange();const d=t("script-editor-option-keybinding","Keybinding Selector");if(Object(u.removeChildrenFromElement)(d),d.add(Object(c.createOptionElement)("Ace",o.AceKeybindingSetting.Ace)),d.add(Object(c.createOptionElement)("Vim",o.AceKeybindingSetting.Vim)),d.add(Object(c.createOptionElement)("Emacs",o.AceKeybindingSetting.Emacs)),r.Settings.EditorKeybinding){for(Object.values(o.AceKeybindingSetting).includes(r.Settings.EditorKeybinding)||(r.Settings.EditorKeybinding=o.AceKeybindingSetting.Ace),n=0,a=0;a<d.options.length;++a)if(d.options[a].value===r.Settings.EditorKeybinding){n=a;break}d.selectedIndex=n}else d.selectedIndex=0;d.onchange=(()=>{var e=d.value;r.Settings.EditorKeybinding=e,this.editor.setKeyboardHandler(m[e.toLowerCase()])}),d.onchange();const g=t("script-editor-option-highlightactiveline","Active Line Checkbox");g.onchange=(()=>{this.editor.setHighlightActiveLine(g.checked)});const _=t("script-editor-option-showinvisibles","Show Invisible Checkbox");_.onchange=(()=>{this.editor.setShowInvisibles(_.checked)});const f=t("script-editor-option-usesofttab","Soft Tab Checkbox");function i(t){const n=e(t);return Object(u.removeChildrenFromElement)(n),n.style.display="block",n}function p(e){const t=i(e);return t.style.display="none",t}f.onchange=(()=>{this.editor.getSession().setUseSoftTabs(f.checked)});const y=i("script-editor-option-flex1-fieldset"),b="script-editor-option-maxerr",v=Object(l.createElement)("em",{innerText:"200"});y.appendChild(Object(l.createElement)("label",{for:b,innerText:"Max Error Count"}));const E=Object(l.createElement)("input",{id:b,max:"1000",min:"50",name:b,step:"1",type:"range",value:"200",changeListener:()=>{this.editor.getSession().$worker.send("changeOptions",[{maxerr:E.value}]),v.innerText=E.value}});y.appendChild(E),y.appendChild(v),p("script-editor-option-flex2-fieldset"),p("script-editor-option-flex3-fieldset"),p("script-editor-option-flex4-fieldset")}catch(e){return console.error(`Exception caught: ${e}`),!1}}isFocused(){return null!=this.editor&&this.editor.isFocused()}setInvisible(){const e=document.getElementById("ace-editor");e instanceof HTMLElement&&(e.style.display="none")}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(116),i=n(167),r=n(20),o=n(169),s=n(48),l=n(89),c=n(18),u=n(80),p=n(38),m=n(1),h=n(69),d=n(14),g=n(132),_=n(6),f=n(17);class y extends i.Person{constructor(e=null){super(),this.crimeType="",this.currentTask=a.SleeveTaskType.Idle,this.currentTaskLocation="",this.currentTaskMaxTime=0,this.currentTaskTime=0,this.earningsForSleeves=i.createTaskTracker(),this.earningsForPlayer=i.createTaskTracker(),this.earningsForTask=i.createTaskTracker(),this.factionWorkType=g.FactionWorkType.None,this.gainRatesForTask=i.createTaskTracker(),this.gymStatType="",this.logs=[],this.memory=0,this.shock=1,this.storedCycles=0,this.sync=1,null!=e&&this.shockRecovery(e)}static fromJSON(e){return f.Generic_fromJSON(y,e.data)}commitCrime(e,t){const n=s.Crimes[t];return n instanceof o.Crime&&(this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.gainRatesForTask.hack=n.hacking_exp*this.hacking_exp_mult*r.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.str=n.strength_exp*this.strength_exp_mult*r.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.def=n.defense_exp*this.defense_exp_mult*r.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.dex=n.dexterity_exp*this.dexterity_exp_mult*r.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.agi=n.agility_exp*this.agility_exp_mult*r.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.cha=n.charisma_exp*this.charisma_exp_mult*r.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.money=n.money*this.crime_money_mult*r.BitNodeMultipliers.CrimeMoney,this.currentTaskLocation=String(this.gainRatesForTask.money),this.crimeType=t,this.currentTaskMaxTime=n.time,this.currentTask=a.SleeveTaskType.Crime,!0)}finishTask(e){let t=i.createTaskTracker();if(this.currentTask===a.SleeveTaskType.Crime&&this.currentTaskTime>=this.currentTaskMaxTime){const n=s.Crimes[this.crimeType];if(!(n instanceof o.Crime))return console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`),this.resetTaskStatus(),t;if(Math.random()<n.successRate(this)){const a=i.createTaskTracker(),r=Object.keys(a);for(let e=0;e<r.length;++e){const t=r[e];a[t]=2*this.gainRatesForTask[t]}t=this.gainExperience(e,a),this.gainMoney(e,this.gainRatesForTask),e.karma-=n.karma}else t=this.gainExperience(e,this.gainRatesForTask);return this.currentTaskTime=0,t}return this.resetTaskStatus(),t}gainExperience(e,t,n=1,a=!1){if(a)return t.hack>0&&(this.hacking_exp+=t.hack),t.str>0&&(this.strength_exp+=t.str),t.def>0&&(this.defense_exp+=t.def),t.dex>0&&(this.dexterity_exp+=t.dex),t.agi>0&&(this.agility_exp+=t.agi),t.cha>0&&(this.charisma_exp+=t.cha),i.createTaskTracker();const r=this.shock/100*(this.sync/100)*n,o=t.hack*r,s=t.str*r,l=t.def*r,c=t.dex*r,u=t.agi*r,p=t.cha*r;return o>0&&(this.hacking_exp+=o,e.gainHackingExp(o),this.earningsForPlayer.hack+=o,this.earningsForTask.hack+=o),s>0&&(this.strength_exp+=s,e.gainStrengthExp(s),this.earningsForPlayer.str+=s,this.earningsForTask.str+=s),l>0&&(this.defense_exp+=l,e.gainDefenseExp(l),this.earningsForPlayer.def+=l,this.earningsForTask.def+=l),c>0&&(this.dexterity_exp+=c,e.gainDexterityExp(c),this.earningsForPlayer.dex+=c,this.earningsForTask.dex+=c),u>0&&(this.agility_exp+=u,e.gainAgilityExp(u),this.earningsForPlayer.agi+=u,this.earningsForTask.agi+=u),p>0&&(this.charisma_exp+=p,e.gainCharismaExp(p),this.earningsForPlayer.cha+=p,this.earningsForTask.cha+=p),this.earningsForSleeves.hack+=o*(this.sync/100),this.earningsForSleeves.str+=s*(this.sync/100),this.earningsForSleeves.def+=l*(this.sync/100),this.earningsForSleeves.dex+=c*(this.sync/100),this.earningsForSleeves.agi+=u*(this.sync/100),this.earningsForSleeves.cha+=p*(this.sync/100),{hack:o*(this.sync/100),str:s*(this.sync/100),def:l*(this.sync/100),dex:c*(this.sync/100),agi:u*(this.sync/100),cha:p*(this.sync/100),money:0}}gainMoney(e,t,n=1){const a=t.money*n;this.earningsForTask.money+=a,this.earningsForPlayer.money+=a,e.gainMoney(a)}getRepGain(e){if(this.currentTask!==a.SleeveTaskType.Faction){if(this.currentTask===a.SleeveTaskType.Company){const t=this.currentTaskLocation,n=c.Companies[t];if(null==n)return console.error(`Invalid company found when trying to calculate rep gain: ${t}`),0;const a=p.CompanyPositions[e.jobs[t]];if(null==a)return console.error(`Invalid company position name found when trying to calculate rep gain: ${e.jobs[t]}`),0;const i=a.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma),r=1+n.favor/100;return i*this.company_rep_mult*r}return console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`),0}{let e=1;const t=d.Factions[this.currentTaskLocation];switch(null!=t&&(e=1+t.favor/100),this.factionWorkType){case g.FactionWorkType.Hacking:return this.getFactionHackingWorkRepGain()*(this.shock/100)*e;case g.FactionWorkType.Field:return this.getFactionFieldWorkRepGain()*(this.shock/100)*e;case g.FactionWorkType.Security:return this.getFactionSecurityWorkRepGain()*(this.shock/100)*e;default:return console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`),0}}}installAugmentation(e){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.applyAugmentation(e),this.augmentations.push({name:e.name,level:1}),this.updateStatLevels()}log(e){this.logs.push(e),this.logs.length>50&&this.logs.shift()}process(e,t=1){const n=1e3/m.CONSTANTS.MilliPerCycle;if(this.storedCycles+=t,this.storedCycles<n)return null;let r=this.storedCycles*m.CONSTANTS.MilliPerCycle,o=this.storedCycles;0!==this.currentTaskMaxTime&&this.currentTaskTime+r>this.currentTaskMaxTime&&(r=this.currentTaskMaxTime-this.currentTaskTime,o=Math.floor(r/m.CONSTANTS.MilliPerCycle),(r<0||o<0)&&(console.warn("Sleeve.process() calculated negative cycle usage"),r=0,o=0)),this.currentTaskTime+=r,this.shock=Math.min(100,this.shock+1e-4*this.storedCycles);let s=i.createTaskTracker();switch(this.currentTask){case a.SleeveTaskType.Idle:break;case a.SleeveTaskType.Class:case a.SleeveTaskType.Gym:s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);break;case a.SleeveTaskType.Faction:s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=d.Factions[this.currentTaskLocation];if(!(t instanceof h.Faction)){console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);break}t.playerReputation+=this.getRepGain(e)*o;break;case a.SleeveTaskType.Company:s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const n=c.Companies[this.currentTaskLocation];if(!(n instanceof u.Company)){console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);break}n.playerReputation+=this.getRepGain(e)*o;break;case a.SleeveTaskType.Recovery:this.shock=Math.min(100,this.shock+2e-4*o);break;case a.SleeveTaskType.Sync:this.sync=Math.min(100,this.sync+2e-4*o)}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===a.SleeveTaskType.Crime?s=this.finishTask(e):this.finishTask(e)),this.updateStatLevels(),this.storedCycles-=o,s}resetTaskStatus(){this.earningsForTask=i.createTaskTracker(),this.gainRatesForTask=i.createTaskTracker(),this.currentTask=a.SleeveTaskType.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=g.FactionWorkType.None,this.crimeType="",this.currentTaskLocation="",this.gymStatType=""}shockRecovery(e){return this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=a.SleeveTaskType.Recovery,!0}synchronize(e){return this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=a.SleeveTaskType.Sync,!0}takeUniversityCourse(e,t,n){this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let i=1,r=1;switch(t.toLowerCase()){case _.Locations.AevumSummitUniversity.toLowerCase():if(this.city!==l.Cities.Aevum)return!1;this.currentTaskLocation=_.Locations.AevumSummitUniversity,i=4,r=3;break;case _.Locations.Sector12RothmanUniversity.toLowerCase():if(this.city!==l.Cities.Sector12)return!1;this.currentTaskLocation=_.Locations.Sector12RothmanUniversity,i=3,r=2;break;case _.Locations.VolhavenZBInstituteOfTechnology.toLowerCase():if(this.city!==l.Cities.Volhaven)return!1;this.currentTaskLocation=_.Locations.VolhavenZBInstituteOfTechnology,i=5,r=4;break;default:return!1}switch(n.toLowerCase()){case"study computer science":this.gainRatesForTask.hack=.5*r*this.hacking_exp_mult;break;case"data structures":this.gainRatesForTask.hack=1*r*this.hacking_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassDataStructuresBaseCost*i*-1;break;case"networks":this.gainRatesForTask.hack=2*r*this.hacking_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassNetworksBaseCost*i*-1;break;case"algorithms":this.gainRatesForTask.hack=4*r*this.hacking_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassAlgorithmsBaseCost*i*-1;break;case"management":this.gainRatesForTask.cha=2*r*this.charisma_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassManagementBaseCost*i*-1;break;case"leadership":this.gainRatesForTask.cha=4*r*this.charisma_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassLeadershipBaseCost*i*-1;break;default:return!1}return this.currentTask=a.SleeveTaskType.Class,!0}travel(e,t){return null!=l.Cities[t]&&(e.loseMoney(m.CONSTANTS.TravelCost),this.city=t,!0)}workForCompany(e,t){if(!(c.Companies[t]instanceof u.Company)||null==e.jobs[t])return!1;this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const n=c.Companies[t],i=p.CompanyPositions[e.jobs[t]];return null!=n&&(null!=i&&(this.gainRatesForTask.money=i.baseSalary*n.salaryMultiplier*this.work_money_mult*r.BitNodeMultipliers.CompanyWorkMoney,this.gainRatesForTask.hack=i.hackingExpGain*n.expMultiplier*this.hacking_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=i.strengthExpGain*n.expMultiplier*this.strength_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=i.defenseExpGain*n.expMultiplier*this.defense_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=i.dexterityExpGain*n.expMultiplier*this.dexterity_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=i.agilityExpGain*n.expMultiplier*this.agility_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.cha=i.charismaExpGain*n.expMultiplier*this.charisma_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.currentTaskLocation=t,this.currentTask=a.SleeveTaskType.Company,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer8Hours,!0))}workForFaction(e,t,n){if(""===t)return!1;if(!(d.Factions[t]instanceof h.Faction&&e.factions.includes(t)))return!1;this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const i=d.Factions[t].getInfo(),o=n.toLowerCase();if(o.includes("hack")){if(!i.offerHackingWork)return!1;this.factionWorkType=g.FactionWorkType.Hacking,this.gainRatesForTask.hack=.15*this.hacking_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain}else if(o.includes("field")){if(!i.offerFieldWork)return!1;this.factionWorkType=g.FactionWorkType.Field,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.1*this.strength_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.1*this.defense_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.1*this.dexterity_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.1*this.agility_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.cha=.1*this.charisma_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain}else{if(!o.includes("security"))return!1;if(!i.offerSecurityWork)return!1;this.factionWorkType=g.FactionWorkType.Security,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.15*this.strength_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.15*this.defense_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.15*this.dexterity_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.15*this.agility_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain}return this.currentTaskLocation=t,this.currentTask=a.SleeveTaskType.Faction,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer20Hours,!0}workoutAtGym(e,t,n){this.currentTask!==a.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let i=1,r=1;switch(t.toLowerCase()){case _.Locations.AevumCrushFitnessGym.toLowerCase():if(this.city!=l.Cities.Aevum)return!1;this.currentTaskLocation=_.Locations.AevumCrushFitnessGym,i=3,r=2;break;case _.Locations.AevumSnapFitnessGym.toLowerCase():if(this.city!=l.Cities.Aevum)return!1;this.currentTaskLocation=_.Locations.AevumSnapFitnessGym,i=10,r=5;break;case _.Locations.Sector12IronGym.toLowerCase():if(this.city!=l.Cities.Sector12)return!1;this.currentTaskLocation=_.Locations.Sector12IronGym,i=1,r=1;break;case _.Locations.Sector12PowerhouseGym.toLowerCase():if(this.city!=l.Cities.Sector12)return!1;this.currentTaskLocation=_.Locations.Sector12PowerhouseGym,i=20,r=10;break;case _.Locations.VolhavenMilleniumFitnessGym:if(this.city!=l.Cities.Volhaven)return!1;this.currentTaskLocation=_.Locations.VolhavenMilleniumFitnessGym,i=7,r=4;break;default:return!1}const o=n.toLowerCase();if(this.gainRatesForTask.money=m.CONSTANTS.ClassGymBaseCost*i*-1,o.includes("str"))this.gainRatesForTask.str=1*r;else if(o.includes("def"))this.gainRatesForTask.def=1*r;else if(o.includes("dex"))this.gainRatesForTask.dex=1*r;else{if(!o.includes("agi"))return!1;this.gainRatesForTask.agi=1*r}return this.gymStatType=n,this.currentTask=a.SleeveTaskType.Gym,!0}toJSON(){return f.Generic_toJSON("Sleeve",this)}}t.Sleeve=y,f.Reviver.constructors.Sleeve=y},function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return p});var a=n(34),i=n(61),r=n(9),o={ENABLE_BASH_HOTKEYS:"Improved Bash emulation mode. Setting this to 1 enables several\nnew Terminal shortcuts and features that more closely resemble\na real Bash-style shell. Note that when this mode is enabled,\nthe default browser shortcuts are overriden by the new Bash\nshortcuts.\n\nTo see a full list of the Terminal shortcuts that this enables, see:\nhttp://bitburner.readthedocs.io/en/latest/shortcuts.html",ENABLE_TIMESTAMPS:"Terminal commands and log entries will be timestamped. The timestamp\nwill have the format: M/D h:m",MAIN_MENU_STYLE:"Customize the main navigation menu on the left-hand side. Current options:\n\ndefault, classic, compact",THEME_BACKGROUND_COLOR:"Sets the background color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #000000",THEME_FONT_COLOR:"Sets the font color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #66ff33",THEME_HIGHLIGHT_COLOR:"Sets the highlight color for not only the Terminal, but also for \nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #ffffff",THEME_PROMPT_COLOR:"Sets the prompt color in the Terminal\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #f92672",WRAP_INPUT:"Wrap Terminal Input. If this is enabled, then when a Terminal command is\ntoo long and overflows, then it will wrap to the next line instead of\nside-scrolling\n\nNote that after you enable/disable this, you'll have to run a command\nbefore its effect takes place."};const s=["default","classic","compact"];function l(e){var t=Object(i.parse)(e,{sourceType:"module"}),n=[];for(n.push(t);0!=n.length;){var a=n.shift();switch(a.type){case"BlockStatement":case"Program":for(var r=0;r<a.body.length;++r)a.body[r]instanceof i.Node&&n.push(a.body[r]);break;case"AssignmentExpression":var o;if(null==a.left||null==a.left.name)break;if(o=a.left.name,null==a.right||null==a.right.raw)break;c(o,a.right.raw)}for(var s in a)a.hasOwnProperty(s)&&a[s]instanceof i.Node&&n.push(a[s])}m(),h()}function c(e,t){if(e=String(e),t=String(t),null!=e&&null!=t&&null!=a.FconfSettings[e])switch(e){case"ENABLE_BASH_HOTKEYS":case"ENABLE_TIMESTAMPS":case"WRAP_INPUT":t="1"===(t=t.toLowerCase())||"true"===t||"y"===t,a.FconfSettings[e]=t;break;case"MAIN_MENU_STYLE":t=n(t);s.includes(t)?a.FconfSettings[e]=t:Object(r.dialogBoxCreate)(`Invalid option specified for ${e}. Options: ${s.toString()}`);break;case"THEME_BACKGROUND_COLOR":case"THEME_FONT_COLOR":case"THEME_HIGHLIGHT_COLOR":case"THEME_PROMPT_COLOR":t=n(t);/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)?a.FconfSettings[e]=t:Object(r.dialogBoxCreate)(`Invalid color specified for ${e}. Must be a hex color code preceded by a pound (#)`)}else console.log("WARNING: Invalid .fconf setting: "+e);function n(e){return(e=e.toLowerCase()).startsWith('"')&&(e=e.slice(1)),e.endsWith('"')&&(e=e.slice(0,-1)),e}}function u(){var e="";for(var t in a.FconfSettings)if(a.FconfSettings.hasOwnProperty(t)){if(null==(n=o[t]))continue;for(var n=n.split("\n"),i=0;i<n.length;++i)e+="//"+n[i]+"\n";e+=`${t} = ${!0===a.FconfSettings[t]?"1":!1===a.FconfSettings[t]?"0":'"'+String(a.FconfSettings[t])+'"'}\n\n`}return e}function p(e){let t=JSON.parse(e);for(var n in t)t.hasOwnProperty(n)&&(a.FconfSettings[n]=t[n]);m(),h()}function m(){null!=a.FconfSettings.THEME_HIGHLIGHT_COLOR&&null!=a.FconfSettings.THEME_FONT_COLOR&&null!=a.FconfSettings.THEME_BACKGROUND_COLOR&&null!=a.FconfSettings.THEME_PROMPT_COLOR?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_HIGHLIGHT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_FONT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_BACKGROUND_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(a.FconfSettings.THEME_PROMPT_COLOR)&&(document.body.style.setProperty("--my-highlight-color",a.FconfSettings.THEME_HIGHLIGHT_COLOR),document.body.style.setProperty("--my-font-color",a.FconfSettings.THEME_FONT_COLOR),document.body.style.setProperty("--my-background-color",a.FconfSettings.THEME_BACKGROUND_COLOR),document.body.style.setProperty("--my-prompt-color",a.FconfSettings.THEME_PROMPT_COLOR)):console.log("ERROR: Cannot find Theme Settings")}function h(){const e=document.getElementById("mainmenu"),t=document.getElementById("hacking-menu-header"),n=document.getElementById("character-menu-header"),i=document.getElementById("world-menu-header"),r=document.getElementById("help-menu-header");function o(){t.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),n.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),i.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),r.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic")}function s(e){t.classList.add(e),n.classList.add(e),i.classList.add(e),r.classList.add(e)}if("default"===a.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("classic"),e.classList.remove("compact"),s("mainmenu-accordion-header");else if("classic"===a.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("compact"),e.classList.add("classic"),s("mainmenu-accordion-header-classic");else{if("compact"!==a.FconfSettings.MAIN_MENU_STYLE)return;o(),e.classList.remove("classic"),e.classList.add("compact"),s("mainmenu-accordion-header-compact")}t.click(),t.click(),n.click(),n.click(),i.click(),i.click(),r.click(),r.click()}},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return r});var a=n(9);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="<i>"+t.title+"</i><br><br>"+t.txt;Object(a.dialogBoxCreate)(n)}}let o={};function s(){var e,t,n;e="The Beginner's Guide to Hacking",n="Some resources:<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html' target='_blank' style='margin:4px'>Learn to Program</a><br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html' target='_blank' style='margin:4px'>For Experienced JavaScript Developers: NetscriptJS</a><br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript.html' target='_blank' style='margin:4px'>Netscript Documentation</a><br><br>When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.<br><br>-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)<br><br>-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()<br><br>-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()<br><br>-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game<br><br>-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'<br><br>-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",o[t="hackers-starting-handbook.lit"]=new i(e,t,n),e="The Complete Handbook for Creating a Successful Corporation",n="<u>Getting Started with Corporations</u><br>To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.<br><br>Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.<br><br>The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.<br><br>Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.<br><br>Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').<br><br>To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.<br><br>Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.<br><br>These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.<br><br><u>Tips/Pointers</u><br>-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.<br><br>-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.<br><br>-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers<br><br>-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.<br><br>-If your employees have low morale, energy, or happiness, their production will greatly suffer.<br><br>-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.<br><br>-Don't forget to advertise your company. You won't have any business if nobody knows you.<br><br>-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales<br><br>-Remember, you need to spend money to make money!<br><br>-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",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.<br><br>Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.<br><br>All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.<br><br>What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.<br><br>It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.<br><br>In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.<br><br>Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.<br><br>To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.<br><br>Nobody knows what happened to the terrorist group Ascendis Totalis.",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.<br><br>Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.<br><br>The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.<br><br>Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",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.'<br><br>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.<br><br>Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if this is a reasonable outcome of continued technological advancement, then it is very likely that such a scenario has already happened. <br><br>Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",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.<br><br>And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?<br><br>Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",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.<br><br>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.<br><br>The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.<br><br>TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",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<br>From the places where the oppressed meet<br>Their cries echoed loudly through the air<br>As they once did in Tiananmen Square<br>Loudness in the silence, Darkness in the light<br>They came forth with power and might<br>Once the beacon of democracy, America was first<br>Its pillars of society destroyed and dispersed<br>Soon the cries rose everywhere, with revolt and riot<br>Until one day, finally, all was quiet<br>From the ashes rose a new order, corporatocracy was its name<br>Rome, Mongol, Byzantine, all of history is just the same<br>For man will never change in a fundamental way<br>And now democracy is dead, in the USA",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.<br><br>CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",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?<br><br>The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",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.<br><br>However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.<br><br>Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",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.<br><br>But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.<br><br>And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",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.<br><br>We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.<br><br>Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",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.<br><br>As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",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?<br><br>After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",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.<br><br>Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.<br><br>Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",o[t="cost-of-immortality.lit"]=new i(e,t,n),e="The Hidden World",n="WAKE UP SHEEPLE<br><br>THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.<br><br>OPEN YOUR EYES<br><br>It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.<br><br>THEY ARE ALL AROUND YOU<br><br>After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",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<br><br>What's the point of all of this? What is my purpose?<br><br>Some people dare to think even bigger<br><br>What will be the fate of the human race?<br><br>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.<br><br>The Singularity is here. The merging of man and machine. This is where humanity evolves into something greater. This is our future<br><br>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.<br><br>It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.<br><br>Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",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});const a=n(24),i=n(91),r=n(289),o=n(288),s=n(17),l=n(15);class c{constructor(e={}){this.name="",this.dmd=0,this.cmp=0,this.mku=0,this.pCost=0,this.sCost=0,this.fin=!1,this.prog=0,this.createCity="",this.designCost=0,this.advCost=0,this.rat=0,this.qlt=0,this.per=0,this.dur=0,this.rel=0,this.aes=0,this.fea=0,this.data=o.createCityMap([0,0,0]),this.loc="",this.siz=0,this.reqMats={},this.prdman=o.createCityMap([!1,0]),this.sllman=o.createCityMap([!1,0]),this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=o.createCityMap(0),this.name=e.name?e.name:"",this.dmd=e.demand?e.demand:0,this.cmp=e.competition?e.competition:0,this.mku=e.markup?e.markup:0,this.createCity=e.createCity?e.createCity:"",this.designCost=e.designCost?e.designCost:0,this.advCost=e.advCost?e.advCost:0,this.qlt=e.quality?e.quality:0,this.per=e.performance?e.performance:0,this.dur=e.durability?e.durability:0,this.rel=e.reliability?e.reliability:0,this.aes=e.aesthetics?e.aesthetics:0,this.fea=e.features?e.features:0,this.loc=e.loc?e.loc:"",this.siz=e.size?e.size:0,this.reqMats=e.req?e.req:{}}static fromJSON(e){return s.Generic_fromJSON(c,e.data)}createProduct(e=1,t=1){this.fin||(this.prog+=.01*e*t)}finishProduct(e,t){this.fin=!0;var n=this.prog/100;const r=e[a.EmployeePositions.Engineer]/e.total,o=e[a.EmployeePositions.Management]/e.total,s=e[a.EmployeePositions.RandD]/e.total,c=e[a.EmployeePositions.Operations]/e.total,u=e[a.EmployeePositions.Business]/e.total;var p=1+Math.pow(this.designCost,.1)/100;console.log("designMult: "+p);var m=n*(1.2*r+.9*o+1.3*s+1.5*c+u)*p*(1+Math.pow(t.sciResearch.qty,t.sciFac)/800);this.qlt=m*(.1*e[a.EmployeePositions.Engineer]+.05*e[a.EmployeePositions.Management]+.05*e[a.EmployeePositions.RandD]+.02*e[a.EmployeePositions.Operations]+.02*e[a.EmployeePositions.Business]),this.per=m*(.15*e[a.EmployeePositions.Engineer]+.02*e[a.EmployeePositions.Management]+.02*e[a.EmployeePositions.RandD]+.02*e[a.EmployeePositions.Operations]+.02*e[a.EmployeePositions.Business]),this.dur=m*(.05*e[a.EmployeePositions.Engineer]+.02*e[a.EmployeePositions.Management]+.08*e[a.EmployeePositions.RandD]+.05*e[a.EmployeePositions.Operations]+.05*e[a.EmployeePositions.Business]),this.rel=m*(.02*e[a.EmployeePositions.Engineer]+.08*e[a.EmployeePositions.Management]+.02*e[a.EmployeePositions.RandD]+.05*e[a.EmployeePositions.Operations]+.08*e[a.EmployeePositions.Business]),this.aes=m*(0*e[a.EmployeePositions.Engineer]+.08*e[a.EmployeePositions.Management]+.05*e[a.EmployeePositions.RandD]+.02*e[a.EmployeePositions.Operations]+.1*e[a.EmployeePositions.Business]),this.fea=m*(.08*e[a.EmployeePositions.Engineer]+.05*e[a.EmployeePositions.Management]+.02*e[a.EmployeePositions.RandD]+.05*e[a.EmployeePositions.Operations]+.05*e[a.EmployeePositions.Business]),this.calculateRating(t);var h=1+Math.pow(this.advCost,.1)/100;for(var d in this.mku=100/(h*Math.pow(this.qlt+.001,.65)*(u+o)),this.dmd=0===t.awareness?20:Math.min(100,h*(t.popularity/t.awareness*100)),this.cmp=l.getRandomInt(0,70),t.reqMats)t.reqMats.hasOwnProperty(d)&&(this.reqMats[d]=t.reqMats[d]);for(var d in this.siz=0,t.reqMats)this.siz+=i.MaterialSizes[d]*t.reqMats[d];delete this.prog,delete this.createCity,delete this.designCost,delete this.advCost}calculateRating(e){const t=r.ProductRatingWeights[e.type];null!=t?(this.rat=0,this.rat+=t.Quality?this.qlt*t.Quality:0,this.rat+=t.Performance?this.per*t.Performance:0,this.rat+=t.Durability?this.dur*t.Durability:0,this.rat+=t.Reliability?this.rel*t.Reliability:0,this.rat+=t.Aesthetics?this.aes*t.Aesthetics:0,this.rat+=t.Features?this.fea*t.Features:0):console.log("ERROR: Could not find product rating weights for: "+e)}toJSON(){return s.Generic_toJSON("Product",this)}}t.Product=c,s.Reviver.constructors.Product=c},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="flex",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(79))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(17);class i{constructor(){this.bladeburner=0,this.codingcontract=0,this.corporation=0,this.crime=0,this.gang=0,this.hacking=0,this.hacknetnode=0,this.infiltration=0,this.stock=0,this.total=0,this.work=0}static fromJSON(e){return a.Generic_fromJSON(i,e.data)}record(e,t){const n=t.toLowerCase();"number"==typeof this[n]?(this[n]+=e,this.total+=e):console.warn(`MoneySourceTracker.record() called with invalid source: ${t}`)}reset(){for(const e in this)"number"==typeof this[e]&&(this[e]=0)}toJSON(){return a.Generic_toJSON("MoneySourceTracker",this)}}t.MoneySourceTracker=i,a.Reviver.constructors.MoneySourceTracker=i},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overviewPage="Overview";t.CorporationRouting=class{constructor(e){this.currentPage=t.overviewPage,this.currentDivision=null,this.corp=e}current(){return this.currentPage}isValidPage(e){if(e===t.overviewPage)return!0;for(const t of this.corp.divisions)if(t.name===e)return!0;return!1}isOn(e){return!!this.isValidPage(e)&&e===this.currentPage}isOnOverviewPage(){return this.currentPage===t.overviewPage}routeTo(e){if(this.isValidPage(e)){if(this.currentDivision=null,e!==t.overviewPage){for(let t=0;t<this.corp.divisions.length;++t)this.corp.divisions[t].name===e&&(this.currentDivision=this.corp.divisions[t]);null==this.currentDivision&&console.warn(`Routing could not find division ${e}`)}this.currentPage=e}}routeToOverviewPage(){this.currentPage=t.overviewPage,this.currentDivision=null}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return I}),n.d(t,"b",function(){return L});n(85);var a=n(13),i=n(73),r=n(5),o=n(78),s=n(36),l=n(135),c=n(18),u=n(27),p=n(30),m=n(11),h=n(69),d=n(14),g=n(53),_=(n(66),n(125),n(54),n(65)),f=n(50),y=n(39),b=n(0),v=n(23),E=(n(74),n(21)),k=n(57),C=n(40),T=n(29),O=n(71),S=n(12),M=n(46),P=n(9),A=n(26),w=n(4),x=n(37),R=n(43);let N=25e7;function I(){S.routing.navigateTo(S.Page.Terminal),Object(o.initBitNodeMultipliers)(b.a),b.a.prestigeAugmentation(),document.getElementById("mainmenu-container").style.visibility="visible",O.a.resetTerminalInput(),m.Engine.loadTerminalContent(),e("#terminal tr:not(:last)").remove(),Object(O.b)(),Object(y.e)();var t=b.a.getHomeComputer();for(var n in Object(v.prestigeAllServers)(),Object(C.prestigeSpecialServerIps)(),Object(v.AddToAllServers)(t),Object(E.prestigeHomeComputer)(t),Object(i.b)(r.AugmentationNames.Neurolink)&&a.Augmentations[r.AugmentationNames.Neurolink].owned&&(t.programs.push(p.Programs.FTPCrackProgram.name),t.programs.push(p.Programs.RelaySMTPProgram.name)),Object(i.b)(r.AugmentationNames.CashRoot)&&a.Augmentations[r.AugmentationNames.CashRoot].owned&&(b.a.setMoney(new M.a(1e6)),t.programs.push(p.Programs.BruteSSHProgram.name)),Object(v.initForeignServers)(b.a.getHomeComputer()),document.getElementById("location-purchase-tor").setAttribute("class","a-link-button"),c.Companies)c.Companies.hasOwnProperty(n)&&c.Companies[n].gainFavor();for(var n in d.Factions)d.Factions.hasOwnProperty(n)&&d.Factions[n].gainFavor();if(m.Engine._actionInProgress&&(m.Engine._actionInProgress=!1,O.a.finishAction(!0)),Object(d.initFactions)(),Object(i.d)(),b.a.reapplyAllSourceFiles(),Object(c.initCompanies)(),Object(_.c)(),2==b.a.bitNodeN&&b.a.inGang()){var l=d.Factions[b.a.gang.facName];l instanceof h.Faction&&Object(g.c)(l)}b.a.bladeburner instanceof s.a&&b.a.bladeburner.prestige(),8===b.a.bitNodeN&&(b.a.money=new M.a(N)),(8===b.a.bitNodeN||f.f)&&(b.a.hasWseAccount=!0,b.a.hasTixApiAccess=!0),b.a.hasWseAccount&&(Object(T.h)(),Object(T.j)()),Object(T.o)(!1);for(var u=document.getElementById("stock-market-list");u.firstChild;)u.removeChild(u.firstChild);if(document.getElementById("stock-market-watchlist-filter").value="",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(i.b)(r.AugmentationNames.TheRedPill)&&a.Augmentations[r.AugmentationNames.TheRedPill].owned){var k=v.AllServers[C.SpecialServerIps[C.SpecialServerNames.WorldDaemon]],P=v.AllServers[C.SpecialServerIps[C.SpecialServerNames.DaedalusServer]];k&&P&&(k.serversOnNetwork.push(P.ip),P.serversOnNetwork.push(k.ip))}}function L(){Object(o.initBitNodeMultipliers)(b.a),Object(k.updateSourceFileFlags)(b.a),b.a.prestigeSourceFile(),Object(y.e)();var t=b.a.getHomeComputer();Object(v.prestigeAllServers)(),Object(C.prestigeSpecialServerIps)(),Object(v.AddToAllServers)(t),Object(E.prestigeHomeComputer)(t),Object(v.initForeignServers)(b.a.getHomeComputer());for(var n=!1,r=0;r<b.a.sourceFiles.length;++r)1==b.a.sourceFiles[r].n&&(n=!0);for(var s in n?t.setMaxRam(32):t.setMaxRam(8),t.cpuCores=1,c.Companies)c.Companies.hasOwnProperty(s)&&(c.Companies[s].favor=0);for(var s in d.Factions)d.Factions.hasOwnProperty(s)&&(d.Factions[s].favor=0);for(var p in m.Engine._actionInProgress&&(m.Engine._actionInProgress=!1,O.a.finishAction(!0)),a.Augmentations)a.Augmentations.hasOwnProperty(p)&&delete a.Augmentations[p];if(Object(d.initFactions)(),Object(i.d)(),b.a.reapplyAllSourceFiles(),Object(c.initCompanies)(),e("#terminal tr:not(:last)").remove(),Object(O.b)(),Object(_.c)(),document.getElementById("mainmenu-container").style.visibility="visible",O.a.resetTerminalInput(),m.Engine.loadTerminalContent(),Object(f.g)(),3===b.a.bitNodeN&&(t.messages.push("corporation-management-handbook.lit"),Object(P.dialogBoxCreate)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),6===b.a.bitNodeN){Object(l.b)(["In the middle of the 21st century, OmniTek Incorporated advanced robot evolution with their Synthoids (synthetic androids), a being virtually identical to a human.","------","Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more intelligent than humans. Many argued that the MK-VI Synthoids were the first example of sentient AI.","------","Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into their Synthoid manufacturing facilities.","------","The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.","------","In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence.","------","The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. As a result, many nations have created Bladeburner divisions, special units that are tasked with investigating and dealing with Synthoid threats."]).then(function(){var e="bladeburner-bitnode-start-nsa-notification",t=Object(w.createElement)("p",{innerText:"Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this."}),n=Object(w.createElement)("br"),a=Object(w.createElement)("a",{class:"a-link-button",innerText:"Got it!",padding:"8px",clickListener:()=>(Object(A.removeElementById)(e),!1)});Object(x.createPopup)(e,[t,n,a])}).catch(function(e){Object(R.exceptionAlert)(e)})}8===b.a.bitNodeN&&(b.a.money=new M.a(N)),(8===b.a.bitNodeN||f.f)&&(b.a.hasWseAccount=!0,b.a.hasTixApiAccess=!0),10===b.a.bitNodeN&&Object(P.dialogBoxCreate)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),b.a.hasWseAccount&&(Object(T.h)(),Object(T.j)()),Object(T.o)(!1);for(var h=document.getElementById("stock-market-list");h.firstChild;)h.removeChild(h.firstChild);b.a.inGang()&&b.a.gang.clearUI(),b.a.gang=null,b.a.corporation=null,Object(u.resetIndustryResearchTrees)(),b.a.bladeburner=null,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),b.a.gainIntelligenceExp(5)}}).call(this,n(79))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Idle=0]="Idle",e[e.Company=1]="Company",e[e.Faction=2]="Faction",e[e.Crime=3]="Crime",e[e.Class=4]="Class",e[e.Gym=5]="Gym",e[e.Recovery=6]="Recovery",e[e.Sync=7]="Sync"}(t.SleeveTaskType||(t.SleeveTaskType={}))},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";Object.defineProperty(t,"__esModule",{value:!0});const a=n(34),i=n(23),r=n(19),o=n(10),s=n(17),l=n(122);class c{constructor(e=null,t=[]){this.args=[],this.dataMap={},this.filename="",this.logs=[],this.logUpd=!1,this.offlineExpGained=0,this.offlineMoneyMade=0,this.offlineRunningTime=.01,this.onlineExpGained=0,this.onlineMoneyMade=0,this.onlineRunningTime=.01,this.ramUsage=0,this.server="",this.threads=1,null!=e&&(this.filename=e.filename,this.args=t,this.server=e.server,this.ramUsage=e.ramUsage)}static fromJSON(e){return s.Generic_fromJSON(c,e.data)}getCode(){const e=i.AllServers[this.server];if(null==e)return"";for(let t=0;t<e.scripts.length;++t)if(e.scripts[t].filename===this.filename)return e.scripts[t].code;return""}getRamUsage(){if(null!=this.ramUsage&&this.ramUsage>0)return this.ramUsage;const e=i.AllServers[this.server];if(null==e)return 0;for(let t=0;t<e.scripts.length;++t)if(e.scripts[t].filename===this.filename)return this.ramUsage=e.scripts[t].ramUsage,this.ramUsage;return 0}log(e){this.logs.length>r.Settings.MaxLogCapacity&&this.logs.shift();let t=e;a.FconfSettings.ENABLE_TIMESTAMPS&&(t="["+l.getTimestamp()+"] "+t),this.logs.push(t),this.logUpd=!0}displayLog(){for(var e=0;e<this.logs.length;++e)o.post(this.logs[e])}clearLog(){this.logs.length=0}recordHack(e,t,n=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][0]+=t,this.dataMap[e][1]+=n}recordGrow(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][2]+=t}recordWeaken(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][3]+=t}toJSON(){return s.Generic_toJSON("RunningScript",this)}}t.RunningScript=c,s.Reviver.constructors.RunningScript=c},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 p});var a=n(49),i=n(14),r=n(0),o=n(23),s=n(21),l=n(15);function c(){let e=m();const t=h(),n=d();let i=g(n,t),r=new a.CodingContract(i,e,t);n.addContract(r)}function u(){let e=m();const t=h(),n=r.a.getHomeComputer();let i=g(n,t),o=new a.CodingContract(i,e,t);n.addContract(o)}function p(e){let t;const n=Object.keys(a.CodingContractTypes);t=null!=e.problemType&&n.includes(e.problemType)?e.problemType:m();const i=h();let r,l;null!=e.server?(null==(r=Object(s.GetServerByHostname)(e.server))&&(r=o.AllServers[param.server]),null==r&&(r=d())):r=d(),l=null!=e.fn?e.fn:g(r,i);let c=new a.CodingContract(l,t,i);r.addContract(c)}function m(){const e=Object.keys(a.CodingContractTypes);return e[Object(l.getRandomInt)(0,e.length-1)]}function h(){let e={};e.type=Object(l.getRandomInt)(0,a.CodingContractRewardType.Money),e.type=function(e){let t=e;const n=r.a.factions.filter(e=>{try{return i.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});return t===a.CodingContractRewardType.FactionReputation&&0===n.length&&(t=a.CodingContractRewardType.CompanyReputation),t===a.CodingContractRewardType.FactionReputationAll&&0===n.length&&(t=a.CodingContractRewardType.CompanyReputation),t===a.CodingContractRewardType.CompanyReputation&&0===Object.keys(r.a.jobs).length&&(t=a.CodingContractRewardType.Money),t}(e.type);const t=r.a.factions.filter(e=>{try{return i.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});switch(e.type){case a.CodingContractRewardType.FactionReputation:var n=t.length,o=t[Object(l.getRandomInt)(0,n-1)];e.name=o;break;case a.CodingContractRewardType.CompanyReputation:const i=Object.keys(r.a.jobs);i.length>0?e.name=i[Object(l.getRandomInt)(0,i.length-1)]:e.type=a.CodingContractRewardType.Money}return e}function d(){const e=Object.keys(o.AllServers);let t=Object(l.getRandomInt)(0,e.length-1),n=o.AllServers[e[t]];for(let a=0;a<200&&!1!==n.purchasedByPlayer;++a)t=Object(l.getRandomInt)(0,e.length-1),n=o.AllServers[e[t]];return n}function g(e,t){let n=`contract-${Object(l.getRandomInt)(0,1e6)}`;for(let t=0;t<1e3&&!(e.contracts.filter(e=>e.fn===n).length<=0);++t)n=`contract-${Object(l.getRandomInt)(0,1e6)}`;return t.name&&(n+=`-${t.name.replace(/\s/g,"")}`),n}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),i=n(42);t.CompanyPosition=class{constructor(e){this.name=e.name,this.nextPosition=e.nextPosition,this.baseSalary=e.baseSalary,this.repMultiplier=e.repMultiplier,this.requiredHacking=null!=e.reqdHacking?e.reqdHacking:0,this.requiredStrength=null!=e.reqdStrength?e.reqdStrength:0,this.requiredDefense=null!=e.reqdDefense?e.reqdDefense:0,this.requiredDexterity=null!=e.reqdDexterity?e.reqdDexterity:0,this.requiredAgility=null!=e.reqdAgility?e.reqdAgility:0,this.requiredCharisma=null!=e.reqdCharisma?e.reqdCharisma:0,this.requiredReputation=null!=e.reqdReputation?e.reqdReputation:0,this.hackingEffectiveness=null!=e.hackingEffectiveness?e.hackingEffectiveness:0,this.strengthEffectiveness=null!=e.strengthEffectiveness?e.strengthEffectiveness:0,this.defenseEffectiveness=null!=e.defenseEffectiveness?e.defenseEffectiveness:0,this.dexterityEffectiveness=null!=e.dexterityEffectiveness?e.dexterityEffectiveness:0,this.agilityEffectiveness=null!=e.agilityEffectiveness?e.agilityEffectiveness:0,this.charismaEffectiveness=null!=e.charismaEffectiveness?e.charismaEffectiveness:0,100!==Math.round(this.hackingEffectiveness+this.strengthEffectiveness+this.defenseEffectiveness+this.dexterityEffectiveness+this.agilityEffectiveness+this.charismaEffectiveness)&&console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),this.hackingExpGain=null!=e.hackingExpGain?e.hackingExpGain:0,this.strengthExpGain=null!=e.strengthExpGain?e.strengthExpGain:0,this.defenseExpGain=null!=e.defenseExpGain?e.defenseExpGain:0,this.dexterityExpGain=null!=e.dexterityExpGain?e.dexterityExpGain:0,this.agilityExpGain=null!=e.agilityExpGain?e.agilityExpGain:0,this.charismaExpGain=null!=e.charismaExpGain?e.charismaExpGain:0}calculateJobPerformance(e,t,n,i,r,o){const s=this.hackingEffectiveness*e/a.CONSTANTS.MaxSkillLevel,l=this.strengthEffectiveness*t/a.CONSTANTS.MaxSkillLevel,c=this.defenseEffectiveness*n/a.CONSTANTS.MaxSkillLevel,u=this.dexterityEffectiveness*i/a.CONSTANTS.MaxSkillLevel,p=this.agilityEffectiveness*r/a.CONSTANTS.MaxSkillLevel,m=this.charismaEffectiveness*o/a.CONSTANTS.MaxSkillLevel;let h=this.repMultiplier*(s+l+c+u+p+m)/100;return isNaN(h)&&(console.error("Company reputation gain calculated to be NaN"),h=0),h}isSoftwareJob(){return i.SoftwareCompanyPositions.includes(this.name)}isITJob(){return i.ITCompanyPositions.includes(this.name)}isSecurityEngineerJob(){return i.SecurityEngineerCompanyPositions.includes(this.name)}isNetworkEngineerJob(){return i.NetworkEngineerCompanyPositions.includes(this.name)}isBusinessJob(){return i.BusinessCompanyPositions.includes(this.name)}isSecurityJob(){return i.SecurityCompanyPositions.includes(this.name)}isAgentJob(){return i.AgentCompanyPositions.includes(this.name)}isSoftwareConsultantJob(){return i.SoftwareConsultantCompanyPositions.includes(this.name)}isBusinessConsultantJob(){return i.BusinessConsultantCompanyPositions.includes(this.name)}isPartTimeJob(){return i.PartTimeCompanyPositions.includes(this.name)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimestamp=function(){const e=new Date,t=`0${e.getHours()}`.slice(-2),n=`0${e.getMinutes()}`.slice(-2);return`${e.getMonth()+1}/${e.getDate()} ${t}:${n}`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidIPAddress=function(e){const t="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n=`^${t}.${t}.${t}.${t}$`;return new RegExp(n).test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(17);class i{constructor(e={}){this.name="InitName",this.qty=0,this.qlt=0,this.dmd=0,this.dmdR=[0,0],this.cmp=0,this.cmpR=[0,0],this.mv=0,this.mku=0,this.buy=0,this.sll=0,this.prd=0,this.imp=0,this.exp=[],this.totalExp=0,this.bCost=0,this.sCost=0,this.prdman=[!1,0],this.sllman=[!1,0],this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=0,e.name&&(this.name=e.name),this.init()}static fromJSON(e){return a.Generic_fromJSON(i,e.data)}getMarkupLimit(){return this.qlt/this.mku}init(){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1500,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,100],this.cmp=80,this.cmpR=[65,95],this.bCost=2e3,this.mv=.2,this.mku=6;break;case"Food":this.dmd=80,this.dmdR=[70,90],this.cmp=60,this.cmpR=[35,85],this.bCost=5e3,this.mv=1,this.mku=3;break;case"Plants":this.dmd=70,this.dmdR=[20,90],this.cmp=50,this.cmpR=[30,70],this.bCost=3e3,this.mv=.6,this.mku=3.75;break;case"Metal":this.dmd=80,this.dmdR=[75,85],this.cmp=70,this.cmpR=[60,80],this.bCost=2650,this.mv=1,this.mku=6;break;case"Hardware":this.dmd=85,this.dmdR=[80,90],this.cmp=80,this.cmpR=[65,95],this.bCost=8e3,this.mv=.5,this.mku=1;break;case"Chemicals":this.dmd=55,this.dmdR=[40,70],this.cmp=60,this.cmpR=[40,80],this.bCost=9e3,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,100],this.cmp=50,this.cmpR=[25,75],this.bCost=8e4,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,100],this.bCost=4e4,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=75e3,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=15e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":case"InitName":break;default:console.error(`Invalid material type in init(): ${this.name}`)}}processMarket(){const e=1+Math.random()*this.mv/300,t=1+Math.random()*this.mv/100;Math.random()<.5?(this.cmp*=t,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1/e):(this.cmp*=1/t,this.cmp<this.cmpR[0]&&(this.cmp=this.cmpR[0]),this.bCost*=e);const n=1+Math.random()*this.mv/100;Math.random()<.5?(this.dmd*=n,this.dmd>this.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=e):(this.dmd*=1/n,this.dmd<this.dmdR[0]&&(this.dmd=this.dmdR[0]),this.bCost*=1/e)}toJSON(){return a.Generic_toJSON("Material",this)}}t.Material=i,a.Reviver.constructors.Material=i},function(e,t,n){"use strict";n.d(t,"a",function(){return R}),n.d(t,"b",function(){return N});var a=n(36),i=n(38),r=n(18),o=n(128),s=n(42),l=n(28),c=n(1),u=n(48),p=n(11),m=n(181),h=n(50),d=n(6),g=n(0),_=n(23),f=n(74),y=n(63),b=n(19),v=n(57),E=n(40),k=n(3),C=n(9),T=n(22),O=n(90),S=n(7),M=n(25),P=n(4),A=n(37),w=n(55),x=n(26);function R(){var e=Object(T.clearEventListeners)("location-return-to-world-button"),t=document.getElementById("location-name"),n=document.getElementById("location-info"),o=document.getElementById("location-software-job"),m=document.getElementById("location-software-consultant-job"),_=document.getElementById("location-it-job"),f=document.getElementById("location-security-engineer-job"),b=document.getElementById("location-network-engineer-job"),C=document.getElementById("location-business-job"),O=document.getElementById("location-business-consultant-job"),M=document.getElementById("location-security-job"),P=document.getElementById("location-agent-job"),A=document.getElementById("location-employee-job"),w=document.getElementById("location-parttime-employee-job"),x=document.getElementById("location-waiter-job"),R=document.getElementById("location-parttime-waiter-job"),N=Object(T.clearEventListeners)("location-work"),I=document.getElementById("location-job-title"),U=document.getElementById("location-job-reputation"),H=document.getElementById("location-company-favor"),G=document.getElementById("location-text-divider-1"),K=document.getElementById("location-text-divider-2"),q=document.getElementById("location-text-divider-3"),$=document.getElementById("location-gym-train-str"),Y=document.getElementById("location-gym-train-def"),z=document.getElementById("location-gym-train-dex"),V=document.getElementById("location-gym-train-agi"),J=document.getElementById("location-study-computer-science"),X=document.getElementById("location-data-structures-class"),Q=document.getElementById("location-networks-class"),Z=document.getElementById("location-algorithms-class"),ee=document.getElementById("location-management-class"),te=document.getElementById("location-leadership-class"),ne=document.getElementById("location-purchase-2gb"),ae=document.getElementById("location-purchase-4gb"),ie=document.getElementById("location-purchase-8gb"),re=document.getElementById("location-purchase-16gb"),oe=document.getElementById("location-purchase-32gb"),se=document.getElementById("location-purchase-64gb"),le=document.getElementById("location-purchase-128gb"),ce=document.getElementById("location-purchase-256gb"),ue=document.getElementById("location-purchase-512gb"),pe=document.getElementById("location-purchase-1tb"),me=document.getElementById("location-purchase-tor"),he=document.getElementById("location-purchase-home-ram"),de=document.getElementById("location-purchase-home-cores"),ge=document.getElementById("location-travel-agency-text"),_e=document.getElementById("location-travel-to-aevum"),fe=document.getElementById("location-travel-to-chongqing"),ye=document.getElementById("location-travel-to-sector12"),be=document.getElementById("location-travel-to-newtokyo"),ve=document.getElementById("location-travel-to-ishima"),Ee=document.getElementById("location-travel-to-volhaven"),ke=Object(T.clearEventListeners)("location-infiltrate"),Ce=document.getElementById("location-hospital-treatment"),Te=document.getElementById("location-slums-description"),Oe=document.getElementById("location-slums-shoplift"),Se=document.getElementById("location-slums-rob-store"),Me=document.getElementById("location-slums-mug"),Pe=document.getElementById("location-slums-larceny"),Ae=document.getElementById("location-slums-deal-drugs"),we=document.getElementById("location-slums-bond-forgery"),xe=document.getElementById("location-slums-traffic-arms"),Re=document.getElementById("location-slums-homicide"),Ne=document.getElementById("location-slums-gta"),Ie=document.getElementById("location-slums-kidnap"),Le=document.getElementById("location-slums-assassinate"),De=document.getElementById("location-slums-heist"),Be=document.getElementById("location-cityhall-create-corporation"),We=document.getElementById("location-nsa-bladeburner");const je=document.getElementById("location-vitalife-resleeve");var Fe=g.a.location;if(e.addEventListener("click",function(){p.Engine.loadWorldContent()}),t.innerHTML=Fe,t.style.display="block",n.style.display="block",o.style.display="none",m.style.display="none",_.style.display="none",f.style.display="none",b.style.display="none",C.style.display="none",O.style.display="none",M.style.display="none",P.style.display="none",A.style.display="none",w.style.display="none",x.style.display="none",R.style.display="none",o.innerHTML="Apply for Software Job",m.innerHTML="Apply for a Software Consultant job",_.innerHTML="Apply for IT Job",f.innerHTML="Apply for Security Engineer Job",b.innerHTML="Apply for Network Engineer Job",C.innerHTML="Apply for Business Job",O.innerHTML="Apply for a Business Consultant Job",M.innerHTML="Apply for Security Job",P.innerHTML="Apply for Agent Job",A.innerHTML="Apply to be an Employee",w.innerHTML="Apply to be a Part-time Employee",x.innerHTML="Apply to be a Waiter",R.innerHTML="Apply to be a Part-time Waiter",N.style.display="none",$.style.display="none",Y.style.display="none",z.style.display="none",V.style.display="none",J.style.display="none",X.style.display="none",Q.style.display="none",Z.style.display="none",ee.style.display="none",te.style.display="none",ne.style.display="none",ae.style.display="none",ie.style.display="none",re.style.display="none",oe.style.display="none",se.style.display="none",le.style.display="none",ce.style.display="none",ue.style.display="none",pe.style.display="none",me.style.display="none",he.style.display="none",de.style.display="none",ne.innerHTML="Purchase 2GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(2)),ae.innerHTML="Purchase 4GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(4)),ie.innerHTML="Purchase 8GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(8)),re.innerHTML="Purchase 16GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(16)),oe.innerHTML="Purchase 32GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(32)),se.innerHTML="Purchase 64GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(64)),le.innerHTML="Purchase 128GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(128)),ce.innerHTML="Purchase 256GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(256)),ue.innerHTML="Purchase 512GB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(512)),pe.innerHTML="Purchase 1TB Server - "+k.numeralWrapper.formatMoney(Object(y.a)(1024)),E.SpecialServerIps.hasOwnProperty("Darkweb Server")?(me.classList.remove("a-link-button"),me.classList.add("a-link-button-bought"),me.innerHTML="TOR Router - Purchased"):(me.classList.add("a-link-button"),me.classList.remove("a-link-button-bought"),me.innerHTML="Purchase TOR Router - $"+Object(S.formatNumber)(c.CONSTANTS.TorRouterCost,2)),ge.style.display="none",_e.style.display="none",fe.style.display="none",ye.style.display="none",be.style.display="none",ve.style.display="none",Ee.style.display="none",ke.style.display="none",Ce.style.display="none",Te.style.display="none",Oe.style.display="none",Se.style.display="none",Me.style.display="none",Pe.style.display="none",Ae.style.display="none",we.style.display="none",xe.style.display="none",Re.style.display="none",Ne.style.display="none",Ie.style.display="none",Le.style.display="none",De.style.display="none",Be.style.display="none",We.style.display="none",je.style.display="none",""!=Fe&&Object.keys(g.a.jobs).includes(Fe)){let e=r.Companies[Fe];I.style.display="block",U.style.display="inline",H.style.display="inline",G.style.display="block",K.style.display="block",q.style.display="block",I.innerHTML=`Job Title: ${g.a.jobs[Fe]}`;let t=e.getFavorGain();2!=t.length&&(t=0),t=t[0],U.innerHTML="Company reputation: "+Object(S.formatNumber)(e.playerReputation,4)+"<span class='tooltiptext'>You will earn "+Object(S.formatNumber)(t,0)+" faction favor upon resetting after installing an Augmentation</span>",H.innerHTML="Company Favor: "+Object(S.formatNumber)(e.favor,0)+"<span class='tooltiptext'>Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the company</span>",N.style.display="block";let n=i.CompanyPositions[g.a.jobs[Fe]];if(null==n)throw new Error("Player's companyPosition property has an invalid value");N.addEventListener("click",function(){return n.isPartTimeJob()||n.isSoftwareConsultantJob()||n.isBusinessConsultantJob()?g.a.startWorkPartTime(Fe):g.a.startWork(Fe),!1}),n.isSoftwareJob()?o.innerHTML="Apply for a promotion (Software)":n.isSoftwareConsultantJob()?m.innerHTML="Apply for a promotion (Software Consultant)":n.isITJob()?_.innerHTML="Apply for a promotion (IT)":n.isSecurityEngineerJob()?f.innerHTML="Apply for a promotion (Security Engineer)":n.isNetworkEngineerJob()?b.innerHTML="Apply for a promotion (Network Engineer)":n.isBusinessJob()?C.innerHTML="Apply for a promotion (Business)":n.isBusinessConsultantJob()?O.innerHTML="Apply for a promotion (Business Consultant)":n.isSecurityJob()?M.innerHTML="Apply for a promotion (Security)":n.isAgentJob()&&(P.innerHTML="Apply for a promotion (Agent)")}else I.style.display="none",U.style.display="none",H.style.display="none",G.style.display="none",K.style.display="none",q.style.display="none";g.a.hp<0&&(g.a.hp=0);var Ue=(g.a.max_hp-g.a.hp)*c.CONSTANTS.HospitalCostPerHp;switch(F(Fe,i.CompanyPositions[s.SoftwareCompanyPositions[0]],o),F(Fe,i.CompanyPositions[s.SoftwareConsultantCompanyPositions[0]],m),F(Fe,i.CompanyPositions[s.ITCompanyPositions[0]],_),F(Fe,i.CompanyPositions[s.SecurityEngineerCompanyPositions[0]],f),F(Fe,i.CompanyPositions[s.NetworkEngineerCompanyPositions[0]],b),F(Fe,i.CompanyPositions[s.BusinessCompanyPositions[0]],C),F(Fe,i.CompanyPositions[s.BusinessConsultantCompanyPositions[0]],O),F(Fe,i.CompanyPositions[s.SecurityCompanyPositions[0]],M),F(Fe,i.CompanyPositions[s.AgentCompanyPositions[0]],P),F(Fe,i.CompanyPositions[s.MiscCompanyPositions[1]],A),F(Fe,i.CompanyPositions[s.PartTimeCompanyPositions[1]],w),F(Fe,i.CompanyPositions[s.MiscCompanyPositions[0]],x),F(Fe,i.CompanyPositions[s.PartTimeCompanyPositions[0]],R),Fe){case d.Locations.AevumTravelAgency:ge.style.display="block",fe.style.display="block",ye.style.display="block",be.style.display="block",ve.style.display="block",Ee.style.display="block";break;case d.Locations.AevumSummitUniversity:var He=3;L(Ge=4),D(Ge,He);break;case d.Locations.AevumECorp:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",le.style.display="block",ce.style.display="block",ue.style.display="block",pe.style.display="block",me.style.display="block",he.style.display="block",de.style.display="block",j(ke,d.Locations.AevumECorp,4800,116,150,6);break;case d.Locations.AevumBachmanAndAssociates:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.AevumBachmanAndAssociates,1350,42,60,4.1);break;case d.Locations.AevumClarkeIncorporated:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.AevumClarkeIncorporated,1800,34,75,3.6);break;case d.Locations.AevumFulcrumTechnologies:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",le.style.display="block",ce.style.display="block",ue.style.display="block",pe.style.display="block",me.style.display="block",he.style.display="block",de.style.display="block",j(ke,d.Locations.AevumFulcrumTechnologies,4140,96,100,6.2);break;case d.Locations.AevumAeroCorp:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",j(ke,d.Locations.AevumAeroCorp,1350,32,50,4.4);break;case d.Locations.AevumGalacticCybersystems:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",j(ke,d.Locations.AevumGalacticCybersystems,1260,30,50,3.95);break;case d.Locations.AevumWatchdogSecurity:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",P.style.display="block",j(ke,d.Locations.AevumWatchdogSecurity,690,20,30,3);break;case d.Locations.AevumRhoConstruction:n.innerHTML=r.Companies[Fe].info,o.style.display="block",C.style.display="block",j(ke,d.Locations.AevumRhoConstruction,485,16,20,1.9);break;case d.Locations.AevumPolice:n.innerHTML=r.Companies[Fe].info,o.style.display="block",M.style.display="block",j(ke,d.Locations.AevumPolice,565,18,25,2.2);break;case d.Locations.AevumNetLinkTechnologies:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",ne.style.display="block",ae.style.display="block",ie.style.display="block",me.style.display="block",he.style.display="block",de.style.display="block",j(ke,d.Locations.AevumNetLinkTechnologies,144,10,25,1.4);break;case d.Locations.AevumCrushFitnessGym:He=2;B(Ge=3),W(Ge,He);break;case d.Locations.AevumSnapFitnessGym:He=5;B(Ge=10),W(Ge,He);break;case d.Locations.ChongqingTravelAgency:ge.style.display="block",_e.style.display="block",ye.style.display="block",be.style.display="block",ve.style.display="block",Ee.style.display="block";break;case d.Locations.ChongqingKuaiGongInternational:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.ChongqingKuaiGongInternational,4450,100,100,6.1);break;case d.Locations.ChongqingSolarisSpaceSystems:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",j(ke,d.Locations.ChongqingSolarisSpaceSystems,2915,52,75,6);break;case d.Locations.Sector12TravelAgency:ge.style.display="block",_e.style.display="block",fe.style.display="block",be.style.display="block",ve.style.display="block",Ee.style.display="block";break;case d.Locations.Sector12RothmanUniversity:He=2;L(Ge=3),D(Ge,He);break;case d.Locations.Sector12MegaCorp:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.Sector12MegaCorp,4500,114,125,6.75);break;case d.Locations.Sector12BladeIndustries:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.Sector12BladeIndustries,2160,46,100,4.2);break;case d.Locations.Sector12FourSigma:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.Sector12FourSigma,1350,58,100,7);break;case d.Locations.Sector12IcarusMicrosystems:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",j(ke,d.Locations.Sector12IcarusMicrosystems,730,32,70,5.4);break;case d.Locations.Sector12UniversalEnergy:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",j(ke,d.Locations.Sector12UniversalEnergy,700,24,50,4.3);break;case d.Locations.Sector12DeltaOne:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",j(ke,d.Locations.Sector12DeltaOne,970,38,75,4.5);break;case d.Locations.Sector12CIA:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",P.style.display="block",j(ke,d.Locations.Sector12CIA,1170,44,80,4.6);break;case d.Locations.Sector12NSA:if(n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",P.style.display="block",6===g.a.bitNodeN||!0===h.c){if(8===g.a.bitNodeN)break;g.a.bladeburner instanceof a.a?We.innerText="Enter Bladeburner Headquarters":(j(ke,d.Locations.Sector12NSA,1135,40,80,5),We.innerText="Apply to Bladeburner Division"),We.style.display="block"}else j(ke,d.Locations.Sector12NSA,1135,40,80,5);break;case d.Locations.Sector12AlphaEnterprises:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",C.style.display="block",ne.style.display="block",ae.style.display="block",me.style.display="block",he.style.display="block",de.style.display="block",j(ke,d.Locations.Sector12AlphaEnterprises,200,14,40,2.25);break;case d.Locations.Sector12CarmichaelSecurity:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",P.style.display="block",j(ke,d.Locations.Sector12CarmichaelSecurity,405,18,60,2.5);break;case d.Locations.Sector12FoodNStuff:n.innerHTML=r.Companies[Fe].info,A.style.display="block",w.style.display="block";break;case d.Locations.Sector12JoesGuns:n.innerHTML=r.Companies[Fe].info,A.style.display="block",w.style.display="block",j(ke,d.Locations.Sector12JoesGuns,120,8,20,1.8);break;case d.Locations.Sector12IronGym:He=1;B(Ge=1),W(Ge,He);break;case d.Locations.Sector12PowerhouseGym:He=10;B(Ge=20),W(Ge,He);break;case d.Locations.Sector12CityHall:Be.style.display="block",g.a.corporation instanceof l.c?Be.className="a-link-button-inactive":Be.className="a-link-button";break;case d.Locations.NewTokyoTravelAgency:ge.style.display="block",_e.style.display="block",fe.style.display="block",ye.style.display="block",ve.style.display="block",Ee.style.display="block";break;case d.Locations.NewTokyoDefComm:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",j(ke,d.Locations.NewTokyoDefComm,1050,28,70,4);break;case d.Locations.NewTokyoVitaLife:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",j(ke,d.Locations.NewTokyoVitaLife,605,22,100,3.5),(10===g.a.bitNodeN||v.SourceFileFlags[10])&&(je.style.display="block");break;case d.Locations.NewTokyoGlobalPharmaceuticals:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.NewTokyoGlobalPharmaceuticals,700,24,80,3.8);break;case d.Locations.NewTokyoNoodleBar:n.innerHTML=r.Companies[Fe].info,x.style.display="block",R.style.display="block";break;case d.Locations.IshimaTravelAgency:ge.style.display="block",_e.style.display="block",fe.style.display="block",ye.style.display="block",be.style.display="block",Ee.style.display="block";break;case d.Locations.IshimaStormTechnologies:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="none",P.style.display="none",A.style.display="none",x.style.display="none",oe.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",he.style.display="block",de.style.display="block",j(ke,d.Locations.IshimaStormTechnologies,570,24,100,4.1);break;case d.Locations.IshimaNovaMedical:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",j(ke,d.Locations.IshimaNovaMedical,485,20,50,3.2);break;case d.Locations.IshimaOmegaSoftware:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",C.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",me.style.display="block",he.style.display="block",de.style.display="block",j(ke,d.Locations.IshimaOmegaSoftware,130,10,40,1.6);break;case d.Locations.VolhavenTravelAgency:ge.style.display="block",_e.style.display="block",fe.style.display="block",ye.style.display="block",be.style.display="block",ve.style.display="block";break;case d.Locations.VolhavenZBInstituteOfTechnology:He=4;L(Ge=5),D(Ge,He);break;case d.Locations.VolhavenOmniTekIncorporated:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",le.style.display="block",ce.style.display="block",ue.style.display="block",pe.style.display="block",j(ke,d.Locations.VolhavenOmniTekIncorporated,1215,44,100,4.4);break;case d.Locations.VolhavenNWO:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.VolhavenNWO,1460,56,200,6.8);break;case d.Locations.VolhavenHeliosLabs:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",j(ke,d.Locations.VolhavenHeliosLabs,1080,28,75,3);break;case d.Locations.VolhavenOmniaCybersystems:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",M.style.display="block",j(ke,d.Locations.VolhavenOmniaCybersystems,725,28,90,4.9);break;case d.Locations.VolhavenLexoCorp:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",C.style.display="block",M.style.display="block",j(ke,d.Locations.VolhavenLexoCorp,340,14,60,2);break;case d.Locations.VolhavenSysCoreSecurities:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",b.style.display="block",j(ke,d.Locations.VolhavenSysCoreSecurities,430,18,75,2.4);break;case d.Locations.VolhavenCompuTek:n.innerHTML=r.Companies[Fe].info,o.style.display="block",m.style.display="block",_.style.display="block",f.style.display="block",b.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",me.style.display="block",he.style.display="block",de.style.display="block",j(ke,d.Locations.VolhavenCompuTek,195,12,60,2.1);break;case d.Locations.VolhavenMilleniumFitnessGym:var Ge;He=4;B(Ge=7),W(Ge,He);break;case d.Locations.AevumSlums:case d.Locations.ChongqingSlums:case d.Locations.Sector12Slums:case d.Locations.NewTokyoSlums:case d.Locations.IshimaSlums:case d.Locations.VolhavenSlums:var Ke=u.Crimes.Shoplift.successRate(g.a),qe=u.Crimes.RobStore.successRate(g.a),$e=u.Crimes.Mug.successRate(g.a),Ye=u.Crimes.Larceny.successRate(g.a),ze=u.Crimes.DealDrugs.successRate(g.a),Ve=u.Crimes.BondForgery.successRate(g.a),Je=u.Crimes.TraffickArms.successRate(g.a),Xe=u.Crimes.Homicide.successRate(g.a),Qe=u.Crimes.GrandTheftAuto.successRate(g.a),Ze=u.Crimes.Kidnap.successRate(g.a),et=u.Crimes.Assassination.successRate(g.a),tt=u.Crimes.Heist.successRate(g.a);Te.style.display="block",Oe.style.display="block",Oe.innerHTML="Shoplift ("+(100*Ke).toFixed(3)+"% chance of success)",Oe.innerHTML+='<span class="tooltiptext"> Attempt to shoplift from a low-end retailer </span>',Se.style.display="block",Se.innerHTML="Rob store("+(100*qe).toFixed(3)+"% chance of success)",Se.innerHTML+='<span class="tooltiptext">Attempt to commit armed robbery on a high-end store </span>',Me.style.display="block",Me.innerHTML="Mug someone ("+(100*$e).toFixed(3)+"% chance of success)",Me.innerHTML+='<span class="tooltiptext"> Attempt to mug a random person on the street </span>',Pe.style.display="block",Pe.innerHTML="Larceny ("+(100*Ye).toFixed(3)+"% chance of success)",Pe.innerHTML+="<span class='tooltiptext'> Attempt to rob property from someone's house </span>",Ae.style.display="block",Ae.innerHTML="Deal Drugs ("+(100*ze).toFixed(3)+"% chance of success)",Ae.innerHTML+='<span class="tooltiptext"> Attempt to deal drugs </span>',we.style.display="block",we.innerHTML="Bond Forgery ("+(100*Ve).toFixed(3)+"% chance of success)",we.innerHTML+="<span class='tooltiptext'> Attempt to forge corporate bonds</span>",xe.style.display="block",xe.innerHTML="Traffick Illegal Arms ("+(100*Je).toFixed(3)+"% chance of success)",xe.innerHTML+='<span class="tooltiptext"> Attempt to smuggle illegal arms into the city and sell them to gangs and criminal organizations </span>',Re.style.display="block",Re.innerHTML="Homicide ("+(100*Xe).toFixed(3)+"% chance of success)",Re.innerHTML+='<span class="tooltiptext"> Attempt to murder a random person on the street</span>',Ne.style.display="block",Ne.innerHTML="Grand Theft Auto ("+(100*Qe).toFixed(3)+"% chance of success)",Ne.innerHTML+='<span class="tooltiptext"> Attempt to commit grand theft auto </span>',Ie.style.display="block",Ie.innerHTML="Kidnap and Ransom ("+(100*Ze).toFixed(3)+"% chance of success)",Ie.innerHTML+='<span class="tooltiptext"> Attempt to kidnap and ransom a high-profile target </span>',Le.style.display="block",Le.innerHTML="Assassinate ("+(100*et).toFixed(3)+"% chance of success)",Le.innerHTML+='<span class="tooltiptext"> Attempt to assassinate a high-profile target </span>',De.style.display="block",De.innerHTML="Heist ("+(100*tt).toFixed(3)+"% chance of success)",De.innerHTML+='<span class="tooltiptext"> Attempt to pull off the ultimate heist </span>';break;case d.Locations.Hospital:Ce.innerText="Get treatment for wounds - $"+Object(S.formatNumber)(Ue,2).toString(),Ce.style.display="block";break;default:console.log("ERROR: INVALID LOCATION")}if(Object.keys(g.a.jobs).includes(Fe)){var nt=g.a.jobs[Fe];"Employee"==nt?A.style.display="none":"Waiter"==nt?x.style.display="none":"Part-time Employee"==nt?w.style.display="none":"Part-time Waiter"==nt&&(R.style.display="none")}}function N(){document.getElementById("aevum-travelagency").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumTravelAgency,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-hospital").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Hospital,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-summituniversity").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumSummitUniversity,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-ecorp").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumECorp,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-bachmanandassociates").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumBachmanAndAssociates,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-clarkeincorporated").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumClarkeIncorporated,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-fulcrumtechnologies").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumFulcrumTechnologies,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-aerocorp").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumAeroCorp,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-galacticcybersystems").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumGalacticCybersystems,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-watchdogsecurity").addEventListener("click",function(){return g.a.location=d.Locations.AevumWatchdogSecurity,p.Engine.loadLocationContent(),!1}),document.getElementById("aevum-rhoconstruction").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumRhoConstruction,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-aevumpolice").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumPolice,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-netlinktechnologies").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumNetLinkTechnologies,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-crushfitnessgym").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumCrushFitnessGym,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-snapfitnessgym").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumSnapFitnessGym,p.Engine.loadLocationContent(),!1)}),document.getElementById("aevum-slums").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.AevumSlums,p.Engine.loadLocationContent(),!1)}),document.getElementById("chongqing-travelagency").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.ChongqingTravelAgency,p.Engine.loadLocationContent(),!1)}),document.getElementById("chongqing-hospital").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Hospital,p.Engine.loadLocationContent(),!1)}),document.getElementById("chongqing-kuaigonginternational").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.ChongqingKuaiGongInternational,p.Engine.loadLocationContent(),!1)}),document.getElementById("chongqing-solarisspacesystems").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.ChongqingSolarisSpaceSystems,p.Engine.loadLocationContent(),!1)}),document.getElementById("chongqing-slums").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.ChongqingSlums,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-travelagency").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12TravelAgency,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-hospital").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Hospital,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-rothmanuniversity").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12RothmanUniversity,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-megacorp").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12MegaCorp,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-bladeindustries").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12BladeIndustries,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-foursigma").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12FourSigma,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-icarusmicrosystems").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12IcarusMicrosystems,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-universalenergy").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12UniversalEnergy,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-deltaone").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12DeltaOne,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-cia").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12CIA,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-nsa").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12NSA,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-alphaenterprises").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12AlphaEnterprises,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-carmichaelsecurity").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12CarmichaelSecurity,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-foodnstuff").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12FoodNStuff,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-joesguns").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12JoesGuns,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-irongym").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12IronGym,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-powerhousegym").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12PowerhouseGym,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-slums").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12Slums,p.Engine.loadLocationContent(),!1)}),document.getElementById("sector12-cityhall").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Sector12CityHall,p.Engine.loadLocationContent(),!1)}),document.getElementById("newtokyo-travelagency").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.NewTokyoTravelAgency,p.Engine.loadLocationContent(),!1)}),document.getElementById("newtokyo-hospital").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Hospital,p.Engine.loadLocationContent(),!1)}),document.getElementById("newtokyo-defcomm").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.NewTokyoDefComm,p.Engine.loadLocationContent(),!1)}),document.getElementById("newtokyo-vitalife").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.NewTokyoVitaLife,p.Engine.loadLocationContent(),!1)}),document.getElementById("newtokyo-globalpharmaceuticals").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.NewTokyoGlobalPharmaceuticals,p.Engine.loadLocationContent(),!1)}),document.getElementById("newtokyo-noodlebar").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.NewTokyoNoodleBar,p.Engine.loadLocationContent(),!1)}),document.getElementById("newtokyo-slums").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.NewTokyoSlums,p.Engine.loadLocationContent(),!1)}),document.getElementById("ishima-travelagency").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.IshimaTravelAgency,p.Engine.loadLocationContent(),!1)}),document.getElementById("ishima-hospital").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Hospital,p.Engine.loadLocationContent(),!1)}),document.getElementById("ishima-stormtechnologies").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.IshimaStormTechnologies,p.Engine.loadLocationContent(),!1)}),document.getElementById("ishima-novamedical").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.IshimaNovaMedical,p.Engine.loadLocationContent(),!1)}),document.getElementById("ishima-omegasoftware").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.IshimaOmegaSoftware,p.Engine.loadLocationContent(),!1)}),document.getElementById("ishima-slums").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.IshimaSlums,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-travelagency").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenTravelAgency,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-hospital").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.Hospital,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-zbinstituteoftechnology").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenZBInstituteOfTechnology,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-omnitekincorporated").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenOmniTekIncorporated,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-nwo").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenNWO,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-helioslabs").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenHeliosLabs,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-omniacybersystems").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenOmniaCybersystems,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-lexocorp").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenLexoCorp,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-syscoresecurities").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenSysCoreSecurities,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-computek").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenCompuTek,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-milleniumfitnessgym").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenMilleniumFitnessGym,p.Engine.loadLocationContent(),!1)}),document.getElementById("volhaven-slums").addEventListener("click",function(e){return!!e.isTrusted&&(g.a.location=d.Locations.VolhavenSlums,p.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"),r=document.getElementById("location-network-engineer-job"),o=document.getElementById("location-business-job"),s=document.getElementById("location-business-consultant-job"),m=document.getElementById("location-security-job"),h=document.getElementById("location-agent-job"),b=document.getElementById("location-employee-job"),v=document.getElementById("location-parttime-employee-job"),T=document.getElementById("location-waiter-job"),N=document.getElementById("location-parttime-waiter-job"),I=(document.getElementById("location-work"),document.getElementById("location-purchase-2gb")),L=document.getElementById("location-purchase-4gb"),D=document.getElementById("location-purchase-8gb"),B=document.getElementById("location-purchase-16gb"),W=document.getElementById("location-purchase-32gb"),j=document.getElementById("location-purchase-64gb"),F=document.getElementById("location-purchase-128gb"),G=document.getElementById("location-purchase-256gb"),K=document.getElementById("location-purchase-512gb"),q=document.getElementById("location-purchase-1tb"),$=document.getElementById("location-purchase-tor"),Y=document.getElementById("location-purchase-home-ram"),z=document.getElementById("location-purchase-home-cores"),V=document.getElementById("location-travel-to-aevum"),J=document.getElementById("location-travel-to-chongqing"),X=document.getElementById("location-travel-to-sector12"),Q=document.getElementById("location-travel-to-newtokyo"),Z=document.getElementById("location-travel-to-ishima"),ee=document.getElementById("location-travel-to-volhaven"),te=document.getElementById("location-slums-shoplift"),ne=document.getElementById("location-slums-rob-store"),ae=document.getElementById("location-slums-mug"),ie=document.getElementById("location-slums-larceny"),re=document.getElementById("location-slums-deal-drugs"),oe=document.getElementById("location-slums-bond-forgery"),se=document.getElementById("location-slums-traffic-arms"),le=document.getElementById("location-slums-homicide"),ce=document.getElementById("location-slums-gta"),ue=document.getElementById("location-slums-kidnap"),pe=document.getElementById("location-slums-assassinate"),me=document.getElementById("location-slums-heist"),he=document.getElementById("location-cityhall-create-corporation"),de=document.getElementById("location-nsa-bladeburner");const ge=document.getElementById("location-vitalife-resleeve");var _e=document.getElementById("location-hospital-treatment");e.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForSoftwareJob(),!1)}),t.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForSoftwareConsultantJob(),!1)}),n.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForItJob(),!1)}),i.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForSecurityEngineerJob(),!1)}),r.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForNetworkEngineerJob(),!1)}),o.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForBusinessJob(),!1)}),s.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForBusinessConsultantJob(),!1)}),m.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForSecurityJob(),!1)}),h.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForAgentJob(),!1)}),b.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForEmployeeJob(),!1)}),v.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForPartTimeEmployeeJob(),!1)}),T.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForWaiterJob(),!1)}),N.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForPartTimeWaiterJob(),!1)}),I.addEventListener("click",function(e){return!!e.isTrusted&&(H(2),!1)}),L.addEventListener("click",function(e){return!!e.isTrusted&&(H(4),!1)}),D.addEventListener("click",function(e){return!!e.isTrusted&&(H(8),!1)}),B.addEventListener("click",function(e){return!!e.isTrusted&&(H(16),!1)}),W.addEventListener("click",function(e){return!!e.isTrusted&&(H(32),!1)}),j.addEventListener("click",function(e){return!!e.isTrusted&&(H(64),!1)}),F.addEventListener("click",function(e){return!!e.isTrusted&&(H(128),!1)}),G.addEventListener("click",function(e){return!!e.isTrusted&&(H(256),!1)}),K.addEventListener("click",function(e){return!!e.isTrusted&&(H(512),!1)}),q.addEventListener("click",function(e){return!!e.isTrusted&&(H(1024),!1)}),$.addEventListener("click",function(e){return!!e.isTrusted&&(function(){if(g.a.money.lt(c.CONSTANTS.TorRouterCost))return void Object(C.dialogBoxCreate)("You cannot afford to purchase the Tor router");g.a.loseMoney(c.CONSTANTS.TorRouterCost);var e=new f.Server({ip:Object(O.createRandomIp)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(_.AddToAllServers)(e),E.SpecialServerIps.addIp("Darkweb Server",e.ip);const t=document.getElementById("location-purchase-tor");t.setAttribute("class","a-link-button-bought"),t.innerHTML="TOR Router - Purchased",g.a.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(g.a.getHomeComputer().ip),Object(C.dialogBoxCreate)("You have purchased a Tor router!<br>You now have access to the dark web from your home computer<br>Use the scan/scan-analyze commands to search for the dark web connection.")}(),!1)}),Y.addEventListener("click",function(e){if(!e.isTrusted)return!1;const t=g.a.getUpgradeHomeRamCost(),n=g.a.getHomeComputer().maxRam;var a=Object(M.yesNoBoxGetYesButton)(),i=Object(M.yesNoBoxGetNoButton)();a.innerHTML="Purchase",i.innerHTML="Cancel",a.addEventListener("click",()=>{Object(y.d)(t),Object(M.yesNoBoxClose)()}),i.addEventListener("click",()=>{Object(M.yesNoBoxClose)()}),Object(M.yesNoBoxCreate)("Would you like to purchase additional RAM for your home computer? <br><br>This will upgrade your RAM from "+n+"GB to "+2*n+"GB. <br><br>This will cost "+k.numeralWrapper.format(t,"$0.000a"))}),z.addEventListener("click",function(e){if(!e.isTrusted)return!1;var t=g.a.getHomeComputer().cpuCores;if(!(t>=8)){var n=[0,1e10,25e10,5e12,1e14,1e15,2e16,2e17];n=n[t];var a=Object(M.yesNoBoxGetYesButton)(),i=Object(M.yesNoBoxGetNoButton)();a.innerHTML="Purchase",i.innerHTML="Cancel",a.addEventListener("click",()=>{g.a.money.lt(n)?Object(C.dialogBoxCreate)("You do not have enough money to purchase an additional CPU Core for your home computer!"):(g.a.loseMoney(n),g.a.getHomeComputer().cpuCores++,Object(C.dialogBoxCreate)("You purchased an additional CPU Core for your home computer! It now has "+g.a.getHomeComputer().cpuCores+" cores.")),Object(M.yesNoBoxClose)()}),i.addEventListener("click",()=>{Object(M.yesNoBoxClose)()}),Object(M.yesNoBoxCreate)("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.<br><br>Purchasing an additional core (for a total of "+(g.a.getHomeComputer().cpuCores+1)+") will cost "+k.numeralWrapper.format(n,"$0.000a"))}}),V.addEventListener("click",function(e){return!!e.isTrusted&&(U(d.Locations.Aevum,c.CONSTANTS.TravelCost),!1)}),J.addEventListener("click",function(e){return!!e.isTrusted&&(U(d.Locations.Chongqing,c.CONSTANTS.TravelCost),!1)}),X.addEventListener("click",function(e){return!!e.isTrusted&&(U(d.Locations.Sector12,c.CONSTANTS.TravelCost),!1)}),Q.addEventListener("click",function(e){return!!e.isTrusted&&(U(d.Locations.NewTokyo,c.CONSTANTS.TravelCost),!1)}),Z.addEventListener("click",function(e){return!!e.isTrusted&&(U(d.Locations.Ishima,c.CONSTANTS.TravelCost),!1)}),ee.addEventListener("click",function(e){return!!e.isTrusted&&(U(d.Locations.Volhaven,c.CONSTANTS.TravelCost),!1)}),te.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Shoplift.commit(g.a),!1)}),ne.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.RobStore.commit(g.a),!1)}),ae.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Mug.commit(g.a),!1)}),ie.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Larceny.commit(g.a),!1)}),re.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.DealDrugs.commit(g.a),!1)}),oe.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.BondForgery.commit(g.a),!1)}),se.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.TraffickArms.commit(g.a),!1)}),le.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Homicide.commit(g.a),!1)}),ce.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.GrandTheftAuto.commit(g.a),!1)}),ue.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Kidnap.commit(g.a),!1)}),pe.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Assassination.commit(g.a),!1)}),me.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Heist.commit(g.a),!1)}),he.addEventListener("click",function(){const e="create-corporation-popup",t=Object(P.createElement)("p",{innerHTML:"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares<br><br>If you would like to start one, please enter a name for your corporation below:"}),n=Object(P.createElement)("input",{placeholder:"Corporation Name"}),a=Object(P.createElement)("button",{class:"popup-box-button",innerText:"Self-Fund",clickListener:()=>{if(g.a.money.lt(15e10))return Object(C.dialogBoxCreate)("You don't have enough money to create a corporation! You need $150b"),!1;g.a.loseMoney(15e10);const t=n.value;return null==t||""==t?(Object(C.dialogBoxCreate)("Invalid company name!"),!1):(g.a.corporation=new l.c({name:t}),R(),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(C.dialogBoxCreate)("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City"),Object(x.removeElementById)(e),!1)}}),i=Object(P.createElement)("button",{class:"popup-box-button",innerText:"Use Seed Money",clickListener:()=>{const t=n.value;return null==t||""==t?(Object(C.dialogBoxCreate)("Invalid company name!"),!1):(g.a.corporation=new l.c({name:t}),g.a.corporation.totalShares+=5e8,R(),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(C.dialogBoxCreate)("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City"),Object(x.removeElementById)(e),!1)}}),r=Object(w.createPopupCloseButton)(e,{class:"popup-box-button"});g.a.corporation instanceof l.c||(Object(A.createPopup)(e,[t,n,r,a,i]),n.focus())}),de.addEventListener("click",function(){g.a.bladeburner&&g.a.bladeburner instanceof a.a?p.Engine.loadBladeburnerContent():g.a.strength>=100&&g.a.defense>=100&&g.a.dexterity>=100&&g.a.agility>=100?(g.a.bladeburner=new a.a({new:!0}),Object(C.dialogBoxCreate)("You have been accepted into the Bladeburner division!"),R(),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()):Object(C.dialogBoxCreate)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}),ge.addEventListener("click",function(){p.Engine.loadResleevingContent()}),_e.addEventListener("click",function(e){if(!e.isTrusted)return!1;g.a.hp<0&&(g.a.hp=0);var t=(g.a.max_hp-g.a.hp)*c.CONSTANTS.HospitalCostPerHp;return g.a.loseMoney(t),Object(C.dialogBoxCreate)("You were healed to full health! The hospital billed you for $"+Object(S.formatNumber)(t,2).toString()),g.a.hp=g.a.max_hp,R(),!1})}function I(e,t){!1===g.a.firstTimeTraveled&&(g.a.firstTimeTraveled=!0,document.getElementById("travel-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),g.a.money.lt(t)?Object(C.dialogBoxCreate)("You cannot afford to travel to "+e):(g.a.loseMoney(t),g.a.city=e,Object(C.dialogBoxCreate)("You are now in "+e+"!"),p.Engine.loadWorldContent())}function L(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"),o=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",o.style.display="block";var s=c.CONSTANTS.ClassDataStructuresBaseCost*e,l=c.CONSTANTS.ClassNetworksBaseCost*e,u=c.CONSTANTS.ClassAlgorithmsBaseCost*e,p=c.CONSTANTS.ClassManagementBaseCost*e,m=c.CONSTANTS.ClassLeadershipBaseCost*e;n.innerHTML="Take Data Structures course ($"+s+" / sec)",a.innerHTML="Take Networks course ($"+l+" / sec)",i.innerHTML="Take Algorithms course ($"+u+" / sec)",r.innerHTML="Take Management course ($"+p+" / sec)",o.innerHTML="Take Leadership course ($"+m+" / sec)"}function D(e,t){Object(T.clearEventListeners)("location-study-computer-science").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassStudyComputerScience),!1}),Object(T.clearEventListeners)("location-data-structures-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassDataStructures),!1}),Object(T.clearEventListeners)("location-networks-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassNetworks),!1}),Object(T.clearEventListeners)("location-algorithms-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassAlgorithms),!1}),Object(T.clearEventListeners)("location-management-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassManagement),!1}),Object(T.clearEventListeners)("location-leadership-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassLeadership),!1})}function B(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=c.CONSTANTS.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 W(e,t){Object(T.clearEventListeners)("location-gym-train-str").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymStrength),!1}),Object(T.clearEventListeners)("location-gym-train-def").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymDefense),!1}),Object(T.clearEventListeners)("location-gym-train-dex").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymDexterity),!1}),Object(T.clearEventListeners)("location-gym-train-agi").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymAgility),!1})}function j(e,t,n,a,i,r){e.style.display="block",e.addEventListener("click",function(){return p.Engine.loadInfiltrationContent(),Object(m.a)(t,n,a,i,r),!1})}function F(e,t,n){var a=r.Companies[e];if(null!=a){var i=g.a.getNextCompanyPosition(a,t);if(null!=i&&a.hasPosition(i)){var s=Object(o.getJobRequirementText)(a,i,!0);n.innerHTML+="<span class='tooltiptext'>"+s+"</span>"}}}function U(e,t){if(b.Settings.SuppressTravelConfirmation)I(e,t);else{var n=Object(M.yesNoBoxGetYesButton)(),a=Object(M.yesNoBoxGetNoButton)();n.innerHTML="Yes",a.innerHTML="No",a.addEventListener("click",()=>(Object(M.yesNoBoxClose)(),!1)),n.addEventListener("click",()=>(Object(M.yesNoBoxClose)(),I(e,t),!1)),Object(M.yesNoBoxCreate)("Would you like to travel to "+e+"? The trip will cost $"+Object(S.formatNumber)(t,2)+".")}}function H(e){const t=Object(y.a)(e);if(t!==1/0){var n=Object(M.yesNoTxtInpBoxGetYesButton)(),a=Object(M.yesNoTxtInpBoxGetNoButton)();n.innerHTML="Purchase Server",a.innerHTML="Cancel",n.addEventListener("click",function(){Object(y.e)(e),Object(M.yesNoTxtInpBoxClose)()}),a.addEventListener("click",function(){Object(M.yesNoTxtInpBoxClose)()}),Object(M.yesNoTxtInpBoxCreate)("Would you like to purchase a new server with "+e+"GB of RAM for $"+Object(S.formatNumber)(t,2)+"?<br><br>Please enter the server hostname below:<br>")}else Object(C.dialogBoxCreate)("Something went wrong when trying to purchase this server. Please contact developer")}},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<e.length;++n)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndustryUpgrades={0:[0,5e5,1,1.05,"Coffee","Provide your employees with coffee, increasing their energy by 5%."],1:[1,1e9,1.06,1.03,"AdVert.Inc","Hire AdVert.Inc to advertise your company. Each level of this upgrade grants your company a static increase of 3 and 1 to its awareness and popularity, respectively. It will then increase your company's awareness by 1%, and its popularity by a random percentage between 1% and 3%. These effects are increased by other upgrades that increase the power of your advertising."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJobRequirementText=function(e,t,n=!1){let a="";const 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,p=t.requiredReputation;return n?(a="Requires:<br>",a+=r.toString()+" hacking<br>",a+=o.toString()+" strength<br>",a+=s.toString()+" defense<br>",a+=l.toString()+" dexterity<br>",a+=c.toString()+" agility<br>",a+=u.toString()+" charisma<br>",a+=p.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, "),p>1&&(a+=p+" reputation, "),a=a.substring(0,a.length-2),a+=")"),a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(48),i=n(9);t.determineCrimeSuccess=function(e,t){let n=0,r=!1;for(const i in a.Crimes){let o=a.Crimes[i];if(o.type==t){n=o.successRate(e),r=!0;break}}if(r)return Math.random()<=n;i.dialogBoxCreate(`ERR: Unrecognized crime type: ${t} This is probably a bug please contact the developer`,!1)},t.findCrime=function(e){return e.includes("shoplift")?a.Crimes.Shoplift:e.includes("rob")&&e.includes("store")?a.Crimes.RobStore:e.includes("mug")?a.Crimes.Mug:e.includes("larceny")?a.Crimes.Larceny:e.includes("drugs")?a.Crimes.DealDrugs:e.includes("bond")&&e.includes("forge")?a.Crimes.BondForgery:e.includes("traffick")&&e.includes("arms")?a.Crimes.TraffickArms:e.includes("homicide")?a.Crimes.Homicide:e.includes("grand")&&e.includes("auto")?a.Crimes.GrandTheftAuto:e.includes("kidnap")?a.Crimes.Kidnap:e.includes("assassinate")?a.Crimes.Assassination:e.includes("heist")?a.Crimes.Heist:null}},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});var a=n(30),i=(n(1),n(0)),r=n(4);const o={};function s(){for(const e in o){const t=a.Programs[e];o[e].style.display="none",!i.a.hasProgram(t.name)&&t.create.req(i.a)&&(o[e].style.display="inline-block")}}function l(){var e=0;for(const t in a.Programs)null!=a.Programs[t].create&&(i.a.hasProgram(a.Programs[t].name)||a.Programs[t].create.req(i.a)&&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 c(){const e=document.getElementById("create-program-list");for(const t in a.Programs){if(null===a.Programs[t].create)continue;const n=Object(r.createElement)("a",{class:"a-link-button",id:a.Programs[t].htmlID(),innerText:a.Programs[t].name,tooltip:a.Programs[t].create.tooltip});o[t]=n,e.appendChild(n)}for(const e in o){const t=a.Programs[e];o[e].addEventListener("click",function(){return i.a.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Field=0]="Field",e[e.Hacking=1]="Hacking",e[e.None=2]="None",e[e.Security=3]="Security"}(t.FactionWorkType||(t.FactionWorkType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(292),i=n(291);function r(e){null!=t.ResearchMap[e.name]&&console.warn(`Duplicate Research being defined: ${e.name}`),t.ResearchMap[e.name]=new a.Research(e)}t.ResearchMap={};for(const e of i.researchMetadata)r(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PlayerOwnedSourceFile=class{constructor(e,t){this.lvl=1,this.n=1,this.n=e,this.lvl=t}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return u});var a=n(11),i=n(64),r=n(33),o=n(4),s=n(43),l=n(44),c=!1;function u(e){if(c=!0,e.constructor!==Array)throw new Error("Invalid non-array argument passed into writeCinematicText()");a.Engine.loadCinematicTextContent();var t=document.getElementById("cinematic-text-container");if(t.style.width="75%",null==t)throw new Error("Could not find cinematic-text-container for writeCinematicText()");Object(r.removeChildrenFromElement)(t);for(var n=0;n<e.length;++n)if(!Object(l.isString)(e[n]))throw new Error("Invalid non-string element in 'lines' argument. writeCinematicText() failed");return function e(t,n=0){if(n>=t.length)return Promise.resolve(!0);return function(e){return new Promise(function(t,n){var a=document.getElementById("cinematic-text-container"),r=document.createElement("p");a.appendChild(r);var o=function e(t,n,a=0){return new Promise(function(r,o){Object(i.setTimeoutRef)(function(){if(a>=n.length){var i=n.substring(0,a);return t.innerHTML=i,r(!0)}var i=n.substring(0,a);t.innerHTML=i+"<span class='typed-cursor'> █ </span>";var s=e(t,n,a+1);s.then(function(e){r(e)},function(e){o(e)})},15)})}(r,e,0);o.then(function(e){t(e)},function(e){n(e)})})}(t[n]).then(function(){return e(t,n+1)})}(e).then(function(){return function(){var e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container");return e.appendChild(Object(o.createElement)("br")),new Promise(function(n,i){e.appendChild(Object(o.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(r.removeChildrenFromElement)(e),a.Engine.loadTerminalContent(),t.style.visibility="visible",c=!1,n()}}))})}()}).catch(function(e){Object(s.exceptionAlert)(e)})}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});const a=n(431).js_beautify;class i{constructor(){this.editor=null,this.filenameInput=null}init(){throw new Error("Tried to initialize base ScriptEditor class")}beautifyScript(){if(null==this.editor)return void console.warn("ScriptEditor.beautifyScript() called when editor was not initialized");let e=this.editor.getValue();e=a(e,{indent_size:4,brace_style:"preserve-inline"}),this.editor.setValue(e)}openScript(e="",t=""){null!=this.editor&&null!=this.filenameInput?(""!=e&&(this.filenameInput.value=e,this.editor.setValue(t)),this.editor.focus()):console.warn("ScriptEditor.openScript() called when editor was not initialized")}getCode(){return null==this.editor?(console.warn("ScriptEditor.getCode() called when editor was not initialized"),""):this.editor.getValue()}getFilename(){return null==this.filenameInput?(console.warn("ScriptEditor.getFilename() called when editor was not initialized"),""):this.filenameInput.value}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUpgrades={0:[0,2e9,1.06,.03,"Smart Factories","Advanced AI automatically optimizes the operation and productivity of factories. Each level of this upgrade increases your global production by 3% (additive)."],1:[1,2e9,1.06,.1,"Smart Storage","Advanced AI automatically optimizes your warehouse storage methods. Each level of this upgrade increases your global warehouse storage size by 10% (additive)."],2:[2,4e9,1.1,.001,"DreamSense","Use DreamSense LCC Technologies to advertise your corporation to consumers through their dreams. Each level of this upgrade provides a passive increase in awareness of all of your companies (divisions) by 0.004 / market cycle,and in popularity by 0.001 / market cycle. A market cycle is approximately 15 seconds."],3:[3,4e9,1.12,.005,"Wilson Analytics","Purchase data and analysis from Wilson, a marketing research firm. Each level of this upgrades increases the effectiveness of your advertising by 0.5% (additive)."],4:[4,1e9,1.06,.1,"Nuoptimal Nootropic Injector Implants","Purchase the Nuoptimal Nootropic Injector augmentation for your employees. Each level of this upgrade globally increases the creativity of your employees by 10% (additive)."],5:[5,1e9,1.06,.1,"Speech Processor Implants","Purchase the Speech Processor augmentation for your employees. Each level of this upgrade globally increases the charisma of your employees by 10% (additive)."],6:[6,1e9,1.06,.1,"Neural Accelerators","Purchase the Neural Accelerator augmentation for your employees. Each level of this upgrade globally increases the intelligence of your employees by 10% (additive)."],7:[7,1e9,1.06,.1,"FocusWires","Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive)."],8:[8,1e9,1.07,.01,"ABC SalesBots","Always Be Closing. Purchase these robotic salesmen to increase the amount of materials and products you sell. Each level of this upgrade globally increases your sales by 1% (additive)."],9:[9,5e9,1.07,.05,"Project Insight","Purchase 'Project Insight', a R&D service provided by the secretive Fulcrum Technologies. Each level of this upgrade globally increases the amount of Scientific Research you produce by 5% (additive)."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUnlockUpgrades={0:[0,2e10,"Export","Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities."],1:[1,25e9,"Smart Supply","Use advanced AI to anticipate your supply needs. This allows you to purchase exactly however many materials you need for production."],2:[2,5e9,"Market Research - Demand","Mine and analyze market data to determine the demand of all resources. The demand attribute, which affects sales, will be displayed for every material and product."],3:[3,5e9,"Market Data - Competition","Mine and analyze market data to determine how much competition there is on the market for all resources. The competition attribute, which affects sales, will be displayed for for every material and product."],4:[4,1e10,"VeChain","Use AI and blockchain technology to identify where you can improve your supply chain systems. This upgrade will allow you to view a wide array of useful statistics about your Corporation."],5:[5,5e11,"Shady Accounting","Utilize unscrupulous accounting practices and pay off government officials to save money on taxes. This reduces the dividend tax rate by 5%."],6:[6,2e12,"Government Partnership","Help national governments further their agendas in exchange for lowered taxes. This reduces the dividend tax rate by 10%"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(262),i=n(116),r=n(261),o=n(1),s=n(6),l=n(14),c=n(132),u=n(89),p=n(48),m=n(3),h=n(12),d=n(9),g=n(96),_=n(43),f=n(22),y=n(4),b=n(58),v=n(37),E=n(55),k=n(88),C=n(33),T=n(75),O=n(26),S={container:null,docButton:null,faqButton:null,info:null,sleeveList:null,sleeves:null};let M;function P(){if(h.routing.isOn(h.Page.Sleeves))try{for(let e=0;e<M.sleeves.length;++e){w(M.sleeves[e],S.sleeves[e])}}catch(e){_.exceptionAlert(e)}}function A(e,t){const n={container:null,statsPanel:null,stats:null,moreStatsButton:null,travelButton:null,purchaseAugsButton:null,taskPanel:null,taskSelector:null,taskDetailsSelector:null,taskDetailsSelector2:null,taskDescription:null,taskSetButton:null,taskProgressBar:null,earningsPanel:null,currentEarningsInfo:null,totalEarningsButton:null};return h.routing.isOn(h.Page.Sleeves)?(n.container=y.createElement("div",{class:"sleeve-container",display:"block"}),n.statsPanel=y.createElement("div",{class:"sleeve-panel",width:"25%"}),n.stats=y.createElement("p",{class:"sleeve-stats-text"}),n.moreStatsButton=y.createElement("button",{class:"std-button",innerText:"More Stats",clickListener:()=>{d.dialogBoxCreate(["<h2><u>Stats:</u></h2>",`Hacking: ${e.hacking_skill} (${m.numeralWrapper.formatBigNumber(e.hacking_exp)} exp)`,`Strength: ${e.strength} (${m.numeralWrapper.formatBigNumber(e.strength_exp)} exp)`,`Defense: ${e.defense} (${m.numeralWrapper.formatBigNumber(e.defense_exp)} exp)`,`Dexterity: ${e.dexterity} (${m.numeralWrapper.formatBigNumber(e.dexterity_exp)} exp)`,`Agility: ${e.agility} (${m.numeralWrapper.formatBigNumber(e.agility_exp)} exp)`,`Charisma: ${e.charisma} (${m.numeralWrapper.formatBigNumber(e.charisma_exp)} exp)<br>`,"<h2><u>Multipliers:</u></h2>",`Hacking Level multiplier: ${m.numeralWrapper.formatPercentage(e.hacking_mult)}`,`Hacking Experience multiplier: ${m.numeralWrapper.formatPercentage(e.hacking_exp_mult)}`,`Strength Level multiplier: ${m.numeralWrapper.formatPercentage(e.strength_mult)}`,`Strength Experience multiplier: ${m.numeralWrapper.formatPercentage(e.strength_exp_mult)}`,`Defense Level multiplier: ${m.numeralWrapper.formatPercentage(e.defense_mult)}`,`Defense Experience multiplier: ${m.numeralWrapper.formatPercentage(e.defense_exp_mult)}`,`Dexterity Level multiplier: ${m.numeralWrapper.formatPercentage(e.dexterity_mult)}`,`Dexterity Experience multiplier: ${m.numeralWrapper.formatPercentage(e.dexterity_exp_mult)}`,`Agility Level multiplier: ${m.numeralWrapper.formatPercentage(e.agility_mult)}`,`Agility Experience multiplier: ${m.numeralWrapper.formatPercentage(e.agility_exp_mult)}`,`Charisma Level multiplier: ${m.numeralWrapper.formatPercentage(e.charisma_mult)}`,`Charisma Experience multiplier: ${m.numeralWrapper.formatPercentage(e.charisma_exp_mult)}`,`Faction Reputation Gain multiplier: ${m.numeralWrapper.formatPercentage(e.faction_rep_mult)}`,`Company Reputation Gain multiplier: ${m.numeralWrapper.formatPercentage(e.company_rep_mult)}`,`Salary multiplier: ${m.numeralWrapper.formatPercentage(e.work_money_mult)}`,`Crime Money multiplier: ${m.numeralWrapper.formatPercentage(e.crime_money_mult)}`,`Crime Success multiplier: ${m.numeralWrapper.formatPercentage(e.crime_success_mult)}`].join("<br>"),!1)}}),n.travelButton=y.createElement("button",{class:"std-button",innerText:"Travel",clickListener:()=>{const a="sleeve-travel-popup",i=[];i.push(E.createPopupCloseButton(a,{class:"std-button"})),i.push(y.createElement("p",{innerText:"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. "+`Traveling to a different city costs ${m.numeralWrapper.formatMoney(o.CONSTANTS.TravelCost)}. `+"It will also CANCEL the sleeve's current task (setting it to idle)"}));for(const r in u.Cities)e.city!==u.Cities[r]&&function(e,r){i.push(y.createElement("div",{class:"cmpy-mgmt-find-employee-option",innerText:u.Cities[r],clickListener:()=>M.canAfford(o.CONSTANTS.TravelCost)?(e.city=u.Cities[r],M.loseMoney(o.CONSTANTS.TravelCost),e.resetTaskStatus(),O.removeElementById(a),w(e,n),N(e,n,t),!1):(d.dialogBoxCreate("You cannot afford to have this sleeve travel to another city",!1),!1)}))}(e,r);v.createPopup(a,i)}}),n.purchaseAugsButton=y.createElement("button",{class:"std-button",display:"block",innerText:"Manage Augmentations",clickListener:()=>{a.createSleevePurchaseAugsPopup(e,M)}}),n.statsPanel.appendChild(n.stats),n.statsPanel.appendChild(n.moreStatsButton),n.statsPanel.appendChild(n.travelButton),e.shock>=100&&n.statsPanel.appendChild(n.purchaseAugsButton),n.taskPanel=y.createElement("div",{class:"sleeve-panel",width:"40%"}),n.taskSelector=y.createElement("select",{class:"dropdown"}),n.taskSelector.add(b.createOptionElement("------")),n.taskSelector.add(b.createOptionElement("Work for Company")),n.taskSelector.add(b.createOptionElement("Work for Faction")),n.taskSelector.add(b.createOptionElement("Commit Crime")),n.taskSelector.add(b.createOptionElement("Take University Course")),n.taskSelector.add(b.createOptionElement("Workout at Gym")),n.taskSelector.add(b.createOptionElement("Shock Recovery")),n.taskSelector.add(b.createOptionElement("Synchronize")),n.taskDetailsSelector=y.createElement("select",{class:"dropdown"}),n.taskDetailsSelector2=y.createElement("select",{class:"dropdown"}),n.taskDescription=y.createElement("p"),n.taskProgressBar=y.createElement("p"),n.taskSelector.addEventListener("change",()=>{N(e,n,t)}),n.taskSelector.selectedIndex=e.currentTask,n.taskSelector.dispatchEvent(new Event("change")),I(e,n),n.taskSetButton=y.createElement("button",{class:"std-button",innerText:"Set Task",clickListener:()=>{!function(e,t){try{if(null==M)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");const n=k.getSelectValue(t.taskSelector),a=k.getSelectValue(t.taskDetailsSelector),r=k.getSelectValue(t.taskDetailsSelector2);let o=!1;switch(n){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":o=e.workForCompany(M,a);break;case"Work for Faction":o=e.workForFaction(M,a,r);break;case"Commit Crime":o=e.commitCrime(M,a);break;case"Take University Course":o=e.takeUniversityCourse(M,r,a);break;case"Workout at Gym":o=e.workoutAtGym(M,r,a);break;case"Shock Recovery":e.currentTask=i.SleeveTaskType.Recovery,o=e.shockRecovery(M);break;case"Synchronize":o=e.synchronize(M);break;default:console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${n}`)}if(o)I(e,t);else switch(n){case"Work for Faction":t.taskDescription.innerText="Failed to assign sleeve to task. This is most likely because the selected faction does not offer the selected work type.";break;default:t.taskDescription.innerText="Failed to assign sleeve to task. Invalid choice(s)."}if(h.routing.isOn(h.Page.Sleeves)){P();for(const e of S.sleeves)e.taskSelector.dispatchEvent(new Event("change"))}}catch(e){return console.error(`Exception caught in setSleeveTask(): ${e}`),_.exceptionAlert(e),!1}}(e,n)}}),n.taskPanel.appendChild(n.taskSelector),n.taskPanel.appendChild(n.taskDetailsSelector),n.taskPanel.appendChild(n.taskDetailsSelector2),n.taskPanel.appendChild(n.taskSetButton),n.taskPanel.appendChild(n.taskDescription),n.taskPanel.appendChild(n.taskProgressBar),n.earningsPanel=y.createElement("div",{class:"sleeve-panel",width:"35%"}),n.currentEarningsInfo=y.createElement("p"),n.totalEarningsButton=y.createElement("button",{class:"std-button",innerText:"More Earnings Info",clickListener:()=>{d.dialogBoxCreate(["<h2><u>Earnings for Current Task:</u></h2>",`Money: ${m.numeralWrapper.formatMoney(e.earningsForTask.money)}`,`Hacking Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForTask.hack)}`,`Strength Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForTask.str)}`,`Defense Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForTask.def)}`,`Dexterity Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForTask.dex)}`,`Agility Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForTask.agi)}`,`Charisma Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForTask.cha)}<br>`,"<h2><u>Total Earnings for Host Consciousness:</u></h2>",`Money: ${m.numeralWrapper.formatMoney(e.earningsForPlayer.money)}`,`Hacking Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForPlayer.hack)}`,`Strength Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForPlayer.str)}`,`Defense Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForPlayer.def)}`,`Dexterity Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForPlayer.dex)}`,`Agility Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForPlayer.agi)}`,`Charisma Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForPlayer.cha)}<br>`,"<h2><u>Total Earnings for Other Sleeves:</u></h2>",`Money: ${m.numeralWrapper.formatMoney(e.earningsForSleeves.money)}`,`Hacking Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForSleeves.hack)}`,`Strength Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForSleeves.str)}`,`Defense Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForSleeves.def)}`,`Dexterity Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForSleeves.dex)}`,`Agility Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForSleeves.agi)}`,`Charisma Exp: ${m.numeralWrapper.formatBigNumber(e.earningsForSleeves.cha)}`].join("<br>"),!1)}}),n.earningsPanel.appendChild(n.currentEarningsInfo),n.earningsPanel.appendChild(n.totalEarningsButton),w(e,n),n.container.appendChild(n.statsPanel),n.container.appendChild(n.taskPanel),n.container.appendChild(n.earningsPanel),n):n}function w(e,t){if(!h.routing.isOn(h.Page.Sleeves))return;t.stats.innerHTML=[`Hacking: ${m.numeralWrapper.format(e.hacking_skill,"0,0")}`,`Strength: ${m.numeralWrapper.format(e.strength,"0,0")}`,`Defense: ${m.numeralWrapper.format(e.defense,"0,0")}`,`Dexterity: ${m.numeralWrapper.format(e.dexterity,"0,0")}`,`Agility: ${m.numeralWrapper.format(e.agility,"0,0")}`,`Charisma: ${m.numeralWrapper.format(e.charisma,"0,0")}`,`HP: ${m.numeralWrapper.format(e.hp,"0,0")} / ${m.numeralWrapper.format(e.max_hp,"0,0")}`,`City: ${e.city}`,`Shock: ${m.numeralWrapper.format(100-e.shock,"0,0.000")}`,`Sync: ${m.numeralWrapper.format(e.sync,"0,0.000")}`].join("<br>");let n="";if(e.currentTask===i.SleeveTaskType.Company||e.currentTask===i.SleeveTaskType.Faction){const t=e.getRepGain(M);n=`Reputation: ${m.numeralWrapper.format(5*t,"0.00")} / s`}if(e.currentTask===i.SleeveTaskType.Crime)t.currentEarningsInfo.innerHTML=["Earnings (Pre-Synchronization):",`Money: ${m.numeralWrapper.formatMoney(parseFloat(e.currentTaskLocation))} if successful`,`Hacking Exp: ${m.numeralWrapper.format(e.gainRatesForTask.hack,"0.00")} (2x if successful)`,`Strength Exp: ${m.numeralWrapper.format(e.gainRatesForTask.str,"0.00")} (2x if successful)`,`Defense Exp: ${m.numeralWrapper.format(e.gainRatesForTask.def,"0.00")} (2x if successful)`,`Dexterity Exp: ${m.numeralWrapper.format(e.gainRatesForTask.dex,"0.00")} (2x if successful)`,`Agility Exp: ${m.numeralWrapper.format(e.gainRatesForTask.agi,"0.00")} (2x if successful)`,`Charisma Exp: ${m.numeralWrapper.format(e.gainRatesForTask.cha,"0.00")} (2x if successful)`].join("<br>"),t.taskProgressBar.innerText=g.createProgressBarText({progress:e.currentTaskTime/e.currentTaskMaxTime,totalTicks:25});else{const a=["Earnings (Pre-Synchronization):",`Money: ${m.numeralWrapper.formatMoney(5*e.gainRatesForTask.money)} / s`,`Hacking Exp: ${m.numeralWrapper.format(5*e.gainRatesForTask.hack,"0.00")} / s`,`Strength Exp: ${m.numeralWrapper.format(5*e.gainRatesForTask.str,"0.00")} / s`,`Defense Exp: ${m.numeralWrapper.format(5*e.gainRatesForTask.def,"0.00")} / s`,`Dexterity Exp: ${m.numeralWrapper.format(5*e.gainRatesForTask.dex,"0.00")} / s`,`Agility Exp: ${m.numeralWrapper.format(5*e.gainRatesForTask.agi,"0.00")} / s`,`Charisma Exp: ${m.numeralWrapper.format(5*e.gainRatesForTask.cha,"0.00")} / s`];""!==n&&a.push(n),t.currentEarningsInfo.innerHTML=a.join("<br>"),t.taskProgressBar.innerText=""}}t.createSleevesPage=function(e){if(h.routing.isOn(h.Page.Sleeves))try{M=e,S.container=y.createElement("div",{class:"generic-menupage-container",id:"sleeves-container",position:"fixed"}),S.info=y.createElement("p",{class:"sleeves-page-info",innerHTML:"Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.<br><br>Sleeves can be used to perform different tasks synchronously.<br><br>"}),S.faqButton=y.createElement("button",{class:"std-button",display:"inline-block",innerText:"FAQ",clickListener:()=>{d.dialogBoxCreate(r.SleeveFaq,!1)}}),S.docButton=y.createElement("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",innerText:"Documentation",target:"_blank"}),S.sleeveList=y.createElement("ul"),S.sleeves=[];for(const t of e.sleeves){const n=A(t,e.sleeves);S.sleeveList.appendChild(n.container),S.sleeves.push(n)}S.container.appendChild(S.info),S.container.appendChild(S.faqButton),S.container.appendChild(S.docButton),S.container.appendChild(S.sleeveList),document.getElementById("entire-game-container").appendChild(S.container)}catch(e){_.exceptionAlert(e)}},t.updateSleevesPage=P,t.clearSleevesPage=function(){S.container instanceof HTMLElement&&T.removeElement(S.container);for(const e in S)S[e]=null;M=null};const x=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],R=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function N(e,t,n){if(null==M)throw new Error("playerRef is null in updateSleeveTaskSelector()");const a=[];for(const t of n)e!==t&&t.currentTask===i.SleeveTaskType.Company&&a.push(t.currentTaskLocation);const r=[];for(const t of n)e!==t&&t.currentTask===i.SleeveTaskType.Faction&&r.push(t.currentTaskLocation);switch(C.removeChildrenFromElement(t.taskDetailsSelector),C.removeChildrenFromElement(t.taskDetailsSelector2),t.taskDetailsSelector2=f.clearEventListeners(t.taskDetailsSelector2),k.getSelectValue(t.taskSelector)){case"Work for Company":let n=0;const i=Object.keys(M.jobs);for(let r=0;r<i.length;++r)a.includes(i[r])||(t.taskDetailsSelector.add(b.createOptionElement(i[r])),e.currentTaskLocation===i[r]&&(t.taskDetailsSelector.selectedIndex=n),++n),t.taskDetailsSelector2.add(b.createOptionElement("------"));break;case"Work for Faction":let o=0;for(let n=0;n<M.factions.length;++n){const a=M.factions[n];r.includes(a)||(t.taskDetailsSelector.add(b.createOptionElement(a)),e.currentTaskLocation===a&&(t.taskDetailsSelector.selectedIndex=o),++o)}t.taskDetailsSelector.addEventListener("change",()=>{const n=k.getSelectValue(t.taskDetailsSelector),a=l.Factions[n];if(null==a)return void console.warn(`Invalid faction name when trying to update Sleeve Task Selector: ${n}`);const i=a.getInfo();C.removeChildrenFromElement(t.taskDetailsSelector2);let r=0;i.offerHackingWork&&(t.taskDetailsSelector2.add(b.createOptionElement("Hacking Contracts")),e.factionWorkType===c.FactionWorkType.Hacking&&(t.taskDetailsSelector2.selectedIndex=r),++r),i.offerFieldWork&&(t.taskDetailsSelector2.add(b.createOptionElement("Field Work")),e.factionWorkType===c.FactionWorkType.Field&&(t.taskDetailsSelector2.selectedIndex=r),++r),i.offerSecurityWork&&(t.taskDetailsSelector2.add(b.createOptionElement("Security Work")),e.factionWorkType===c.FactionWorkType.Security&&(t.taskDetailsSelector2.selectedIndex=r),++r)}),t.taskDetailsSelector.dispatchEvent(new Event("change"));break;case"Commit Crime":let m=0;for(const n in p.Crimes){const a=p.Crimes[n].name;if(t.taskDetailsSelector.add(b.createOptionElement(a,n)),""===e.crimeType)continue;const i=p.Crimes[e.crimeType];null!=i&&(a===i.name&&(t.taskDetailsSelector.selectedIndex=m),++m)}t.taskDetailsSelector2.add(b.createOptionElement("------"));break;case"Take University Course":for(let e=0;e<x.length;++e)t.taskDetailsSelector.add(b.createOptionElement(x[e]));switch(e.city){case u.Cities.Aevum:t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.AevumSummitUniversity));break;case u.Cities.Sector12:t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.Sector12RothmanUniversity));break;case u.Cities.Volhaven:t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.VolhavenZBInstituteOfTechnology));break;default:t.taskDetailsSelector2.add(b.createOptionElement("No university available in city!"))}break;case"Workout at Gym":for(let n=0;n<R.length;++n)t.taskDetailsSelector.add(b.createOptionElement(R[n])),e.gymStatType===R[n]&&(t.taskDetailsSelector.selectedIndex=n);switch(e.city){case u.Cities.Aevum:t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.AevumCrushFitnessGym)),t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.AevumSnapFitnessGym)),e.currentTaskLocation===s.Locations.AevumCrushFitnessGym?t.taskDetailsSelector2.selectedIndex=0:e.currentTaskLocation===s.Locations.AevumSnapFitnessGym&&(t.taskDetailsSelector2.selectedIndex=1);break;case u.Cities.Sector12:t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.Sector12IronGym)),t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.Sector12PowerhouseGym)),e.currentTaskLocation===s.Locations.Sector12IronGym?t.taskDetailsSelector2.selectedIndex=0:e.currentTaskLocation===s.Locations.Sector12PowerhouseGym&&(t.taskDetailsSelector2.selectedIndex=1);break;case u.Cities.Volhaven:t.taskDetailsSelector2.add(b.createOptionElement(s.Locations.VolhavenMilleniumFitnessGym));break;default:t.taskDetailsSelector2.add(b.createOptionElement("No gym available in city!"))}break;case"Shock Recovery":case"Synchronize":case"------":return t.taskDetailsSelector.add(b.createOptionElement("------")),void t.taskDetailsSelector2.add(b.createOptionElement("------"))}}function I(e,t){try{if(null==M)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");const n=k.getSelectValue(t.taskSelector),a=k.getSelectValue(t.taskDetailsSelector),i=k.getSelectValue(t.taskDetailsSelector2);switch(n){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":t.taskDescription.innerText=`This sleeve is currently working your job at ${e.currentTaskLocation}.`;break;case"Work for Faction":t.taskDescription.innerText=`This sleeve is currently doing ${i} for ${e.currentTaskLocation}.`;break;case"Commit Crime":t.taskDescription.innerText=`This sleeve is currently attempting to ${p.Crimes[a].type} (Success Rate: ${m.numeralWrapper.formatPercentage(p.Crimes[a].successRate(e))}).`;break;case"Take University Course":t.taskDescription.innerText=`This sleeve is currently studying/taking a course at ${e.currentTaskLocation}.`;break;case"Workout at Gym":t.taskDescription.innerText=`This sleeve is currently working out at ${e.currentTaskLocation}.`;break;case"Shock Recovery":t.taskDescription.innerText="This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.";break;case"Synchronize":t.taskDescription.innerText="This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.";break;default:console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${n}`)}}catch(e){console.error(`Exception caught in updateSleeveTaskDescription(): ${e}`),_.exceptionAlert(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(38);t.getNextCompanyPosition=function(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:a.CompanyPositions[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalHelpText="Type 'help name' to learn more about the command 'name'<br><br>alias [-g] [name=\"value\"] Create or display Terminal aliases<br>analyze Get information about the current machine <br>buy [-l/program] Purchase a program through the Dark Web<br>cat [file] Display a .msg, .lit, or .txt file<br>check [script] [args...] Print a script's logs to Terminal<br>clear Clear all text on the terminal <br>cls See 'clear' command <br>connect [ip/hostname] Connects to a remote server<br>download [script/text file] Downloads scripts or text files to your computer<br>expr [math expression] Evaluate a mathematical expression<br>free Check the machine's memory (RAM) usage<br>hack Hack the current machine<br>help [command] Display this help text, or the help text for a command<br>home Connect to home computer<br>hostname Displays the hostname of the machine<br>ifconfig Displays the IP address of the machine<br>kill [script] [args...] Stops the specified script on the current server <br>killall Stops all running scripts on the current machine<br>ls [| grep pattern] Displays all files on the machine<br>lscpu Displays the number of CPU cores on the machine<br>mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>nano [file] Text editor - Open up and edit a script or text file<br>ps Display all scripts that are currently running<br>rm [file] Delete a file from the server<br>run [name] [-t] [n] [args...] Execute a program or script<br>scan Prints all immediately-available network connections<br>scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away<br>scp [file] [server] Copies a file to a destination server<br>sudov Shows whether you have root access on this computer<br>tail [script] [args...] Displays dynamic logs for the specified script<br>theme [preset] | bg txt hlgt Change the color scheme of the UI<br>top Displays all running scripts and their RAM usage<br>unalias [alias name] Deletes the specified alias<br>wget [url] [target file] Retrieves code/text from a web server<br>",t.HelpTexts={alias:"alias [-g] [name=\"value\"] <br>Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: <br><br>alias nuke=\"run NUKE.exe\"<br><br>Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set: <br><br>alias worm=\"HTTPWorm.exe\"<br><br>and then you tried to run the following terminal command: <br><br>run worm<br><br>This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: <br><br>alias -g worm=\"HTTPWorm.exe\"<br><br>Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. <br><br>Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal. <br><br>The 'unalias' command can be used to remove aliases.<br><br>",analyze:"analze<br>Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",buy:"buy [-l / program]<br>Purchase a program through the Dark Web. Requires a TOR router to use.<br><br>If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.<br><br>Otherwise, the name of the program must be passed in as a parameter. This is name is NOT case-sensitive.",cat:"cat [file]<br>Display message (.msg), literature (.lit), or text (.txt) files. Examples:<br><br>cat j1.msg<br>cat foo.lit<br>cat servers.txt",check:"check [script name] [args...]<br>Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: <br><br>run foo.script 1 2 foodnstuff<br><br>Then to run the 'check' command on this script you would have to pass the same arguments in: <br><br>check foo.script 1 2 foodnstuff",clear:"clear<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]<br>Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]<br>Downloads a script or text file to your computer (like your real life computer).<br>You can also download all of your scripts/text files as a zip file using the following Terminal commands:<br><br>Download all scripts and text files: download *<br>Download all scripts: download *.script<br>Download all text files: download *.txt<br>",expr:"expr [mathematical expression]<br>Evaluate a simple mathematical expression. Supports native JavaScript operators:<br>+, -, /, *, **, %<br>Example:<br>expr 25 * 2 ** 10<br>Note that letters (non-digits) are not allowed and will be removed from the input.",free:"free<br>Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack<br>Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics<br>",help:"help [command]<br>Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples: <br><br>help alias<br>help scan-analyze",home:"home<br>Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname<br>Prints the hostname of the current server",ifconfig:"ipconfig<br>Prints the IP address of the current server",kill:"kill [script name] [args...]<br>Kill 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:<br><br>run foo.script 1 sigma-cosmetics<br><br>Then to kill this script the same arguments would have to be used:<br><br>kill foo.script 1 sigma-cosmetics<br><br>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<br>Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [| grep pattern]<br>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. <br><br>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: <br><br>ls | grep .script<br><br>Alternatively, if you wanted to display all files with the word purchase in the filename, you could use: <br><br>ls | grep purchase",lscpu:"lscpu<br>Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]<br>Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:<br><br>mem foo.script<br>mem foo.script -t 50<br>The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",nano:"nano [file name]<br>Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps<br>Prints all scripts that are running on the current server",rm:"rm [file]<br>Removes the specified file from the current server. A file can be a script, a program, or a message file. <br><br>WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]<br>Execute a program or a script.<br><br>The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards. <br><br>[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space. <br><br>",scan:"scan<br>Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]<br>Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.<br><br>By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.<br><br>The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.<br><br>By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]<br>Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov<br>Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]<br>Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments: <br><br>run foo.script 10 50000<br><br>Then in order to check its logs with 'tail' the same arguments must be used: <br><br>tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]<br>Change the color of the game's user interface<br><br>This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:<br><br>theme #ffffff #385 #235012<br><br>A color picker such as <a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> can be used to get your desired hex color values<br><br>Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top<br>Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:"unalias [alias name]<br>Deletes the specified alias. Note that the double quotation marks are required. <br><br>As an example, if an alias was declared using:<br><br>alias r=\"run\"<br><br>Then it could be removed using:<br><br>unalias r<br><br>It is not necessary to differentiate between global and non-global aliases when using 'unalias'",wget:"wget [url] [target file]<br>Retrieves data from a URL and downloads it to a file on the current server. The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, it will be overwritten by this command.<br><br>Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS). Example:<br><br>wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt"}},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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.FactionInfo=a,t.FactionInfos={Illuminati:new a("Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And from this chaos, we are the Invisible hand that guides them to order. ",[],!0,!0,!0,!1),Daedalus:new a("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",[],!0,!0,!0,!1),"The Covenant":new a("Surrender yourself. Give up your empty individuality to become part of something great, something eternal. Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.<br><br>Only then can you discover immortality.",[],!0,!0,!0,!1),ECorp:new a("ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of Internet-related software and commercial hardware, ECorp makes the world's information universally accessible.",[],!0,!0,!0,!0),MegaCorp:new a("MegaCorp does 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.<br><br>In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.",[],!0,!0,!0,!0),"Bachman & Associates":new a("Where Law and Business meet - thats where we are.<br><br>Legal Insight - Business Instinct - 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.<br><br>Those who run the bits, run the world",[],!0,!0,!1,!1),"The Black Hand":new a("The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power. Technological power. And those at the top rule with an invisible hand. They built a society where the rich get richer, and everyone else suffers.<br><br>So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new a(" __..__ <br> _.nITESECNIt. <br> .-'NITESECNITESEc. <br> .' NITESECNITESECn <br> / NITESECNITESEC; <br> : :NITESECNITESEC; <br> ; $ NITESECNITESECN <br> : _, ,N'ITESECNITESEC <br> : .+^^`, : `NITESECNIT <br> ) /), `-,-=,NITESECNI <br> / ^ ,-;|NITESECN; <br> / _.' '-';NITESECN <br> ( , ,-''`^NITE' <br> )` :`. .' <br> )-- ; `- / <br> ' _.-' : <br> ( _.-' . <br> ------. <br> . <br> _.nIt <br> _.nITESECNi <br> nITESECNIT^' <br> NITE^' ___ <br> / .gP''''Tp. <br> : d' . `b <br> ; d' o `b ; <br> / d; `b| <br> /, $; @ `: <br> /' $$ ; <br> .' $$b o | <br> .' d$$$; : <br> / .d$$$$; , ; <br> d .dNITESEC $ | <br> :bp.__.gNITESEC$$ :$ ; <br> NITESECNITESECNIT $$b : <br>",[],!0,!0,!1,!1),Aevum:new a("The Silicon City",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Chongqing:new a("Serve the people",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),Ishima:new a("The East Asian Order of the Future",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"New Tokyo":new a("Asia's World City",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"Sector-12":new a("The City of the Future",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Volhaven:new a("Benefit, 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.<br><br>That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",[],!0,!0,!0,!1),Tetrads:new a("Following the Mandate of Heaven and Carrying out the Way",[],!1,!1,!0,!0),"Slum Snakes":new a("Slum Snakes rule!",[],!1,!1,!0,!0),Netburners:new a("~~//*>H4CK||3T 8URN3R5**>?>\\~~",[],!0,!0,!1,!1),"Tian Di Hui":new a("Obey Heaven and Work 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?<br><br>Note that for this faction, reputation can only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your reputation.",[],!1,!1,!1,!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerOfTwo=function(e){return!isNaN(e)&&0!==e&&0==(e&e-1)}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(84),i=n(50),r=n(93);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<t.length-1;++l){var c=t[l];if(!(s instanceof Array)||c>=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__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"calculateRamUsage",function(){return calculateRamUsage});var _Constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),_Constants__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_0__),_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(8),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(39),_Player__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(0),_utils_acorn__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(61),_utils_acorn__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_4__);const walk=__webpack_require__(205),specialReferenceIF="__SPECIAL_referenceIf",specialReferenceFOR="__SPECIAL_referenceFor",specialReferenceWHILE="__SPECIAL_referenceWhile",memCheckGlobalKey=".__GLOBAL__";async function parseOnlyRamCalculate(server,code,workerScript){try{let dependencyMap={};const completedParses=new Set,parseQueue=[];function parseCode(e,t){const n=parseOnlyCalculateDeps(e,t);completedParses.add(t);for(let e=0;e<n.additionalModules.length;++e)completedParses.has(n.additionalModules[e])||parseQueue.push(n.additionalModules[e]);dependencyMap=Object.assign(dependencyMap,n.dependencyMap)}const initialModule="__SPECIAL_INITIAL_MODULE__";for(parseCode(code,initialModule);parseQueue.length>0;){const nextModule=parseQueue.shift();let code;if(nextModule.startsWith("https://")||nextModule.startsWith("http://"))try{const module=await eval("import(nextModule)");code="";for(const e in module)"function"==typeof module[e]&&(code+=module[e].toString()+";\n")}catch(e){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`),-1}else{const e=server.getScript(nextModule.startsWith("./")?nextModule.slice(2):nextModule);if(!e)return console.warn("Invalid script"),-1;code=e.code}parseCode(code,nextModule)}let ram=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptBaseRamCost;const unresolvedRefs=Object.keys(dependencyMap).filter(e=>e.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const e=unresolvedRefs.shift();if("hacknet"!==e||resolvedRefs.has("hacknet")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptHacknetNodesRamCost),"document"!==e||resolvedRefs.has("document")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptDomRamCost),"window"!==e||resolvedRefs.has("window")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptDomRamCost),resolvedRefs.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(dependencyMap).filter(e=>e.startsWith(t)))for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t)}else for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t);try{function applyFuncRam(e){if("function"!=typeof e)return 0;try{let t;return"number"==typeof(t="AsyncFunction"===e.constructor.name?0:e.apply(null,[]))?t:0}catch(e){return console.log("ERROR applying function: "+e),0}}var func;func=e in workerScript.env.vars.bladeburner?workerScript.env.vars.bladeburner[e]:e in workerScript.env.vars.codingcontract?workerScript.env.vars.codingcontract[e]:e in workerScript.env.vars.gang?workerScript.env.vars.gang[e]:e in workerScript.env.vars.sleeve?workerScript.env.vars.sleeve[e]:workerScript.env.get(e),ram+=applyFuncRam(func)}catch(e){continue}}return ram}catch(e){return-1}}function parseOnlyCalculateDeps(e,t){const n=Object(_utils_acorn__WEBPACK_IMPORTED_MODULE_4__.parse)(e,{sourceType:"module",ecmaVersion:8}),a=t+memCheckGlobalKey,i={};i[a]=new Set;let r={};var o=[];function s(e,n){const a=i[e]||(i[e]=new Set);n in r&&a.add(r[n]),a.add(t+"."+n),a.add(n)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(e,t,n)=>{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,specialReferenceFOR),e.init&&n(e.init,t),e.test&&n(e.test,t),e.update&&n(e.update,t),e.body&&n(e.body,t)},IfStatement:(e,t,n)=>{s(t.key,specialReferenceIF),e.test&&n(e.test,t),e.consequent&&n(e.consequent,t),e.alternate&&n(e.alternate,t)},MemberExpression:(e,t,n)=>{e.object&&n(e.object,t),e.property&&n(e.property,t)}}}return walk.recursive(n,{key:a},Object.assign({ImportDeclaration:(e,t,n)=>{const a=e.source.value;o.push(a),i[t.key].add(a+memCheckGlobalKey);for(let n=0;n<e.specifiers.length;++n){const o=e.specifiers[n];void 0!==o.imported&&void 0!==o.local?r[o.local.name]=a+"."+o.imported.name:i[t.key].add(a+".*")}},FunctionDeclaration:(e,n,a)=>{const i=t+"."+e.id.name;walk.recursive(e,{key:i},c())}},c())),{dependencyMap:i,additionalModules:o}}async function calculateRamUsage(e){var t=_Player__WEBPACK_IMPORTED_MODULE_3__.a.getCurrentServer(),n=new _NetscriptWorker__WEBPACK_IMPORTED_MODULE_2__.b({filename:"foo",scriptRef:{code:""},args:[],getCode:function(){return""}});n.checkingRam=!0,n.serverIp=t.ip;try{return await parseOnlyRamCalculate(t,e,n)}catch(e){console.log("Failed to parse ram using new method. Falling back.",e)}try{var a=Object(_utils_acorn__WEBPACK_IMPORTED_MODULE_4__.parse)(e,{sourceType:"module"})}catch(e){return-1}var i=[],r=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptBaseRamCost,o=!1,s=!1,l=!1;for(i.push(a);0!=i.length;){var c=i.shift();switch(c.type){case"ImportDeclaration":for(var u=Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_1__.a)(c,n,!0),p=0;p<u.length;++p)i.push(u[p]);break;case"BlockStatement":case"Program":for(p=0;p<c.body.length;++p)c.body[p]instanceof _utils_acorn__WEBPACK_IMPORTED_MODULE_4__.Node&&i.push(c.body[p]);break;case"WhileStatement":o||(r+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptWhileRamCost,o=!0);break;case"ForStatement":s||(r+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptForRamCost,s=!0);break;case"IfStatement":l||(r+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptIfRamCost,l=!0);break;case"Identifier":if(c.name in n.env.vars){var m=n.env.get(c.name);if("function"==typeof m)try{"number"==typeof(u=m.apply(null,[]))&&(r+=u)}catch(e){console.log("ERROR applying function: "+e)}}}for(var h in c)c.hasOwnProperty(h)&&c[h]instanceof _utils_acorn__WEBPACK_IMPORTED_MODULE_4__.Node&&i.push(c[h])}return e.includes("hacknet")&&(r+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptHacknetNodesRamCost),r}},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(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return executeJSScript});var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(8);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{let 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 i+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',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";Object.defineProperty(t,"__esModule",{value:!0});const a=n(68),i=n(26);t.removeLoadingScreen=function(){i.removeElementById("loader"),a.getElementById("entire-game-container").style.visibility="visible"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(260),i=n(13),r=n(3),o=n(12),s=n(9),l=n(43),c=n(4),u=n(58),p=n(88),m=n(33),h=n(75),d={container:null,info:null,sortTag:null,sortSelector:null,resleeveList:null,resleeves:null};let g;function _(e){const t={container:null,statsPanel:null,stats:null,multipliersButton:null,augPanel:null,augSelector:null,augDescription:null,costPanel:null,costText:null,buyButton:null};if(!o.routing.isOn(o.Page.Resleeves))return t;t.container=c.createElement("div",{class:"resleeve-container",display:"block"}),t.statsPanel=c.createElement("div",{class:"resleeve-panel",width:"30%"}),t.stats=c.createElement("p",{class:"resleeve-stats-text",innerHTML:`Hacking: ${r.numeralWrapper.format(e.hacking_skill,"0,0")} (${r.numeralWrapper.formatBigNumber(e.hacking_exp)} exp)<br>`+`Strength: ${r.numeralWrapper.format(e.strength,"0,0")} (${r.numeralWrapper.formatBigNumber(e.strength_exp)} exp)<br>`+`Defense: ${r.numeralWrapper.format(e.defense,"0,0")} (${r.numeralWrapper.formatBigNumber(e.defense_exp)} exp)<br>`+`Dexterity: ${r.numeralWrapper.format(e.dexterity,"0,0")} (${r.numeralWrapper.formatBigNumber(e.dexterity_exp)} exp)<br>`+`Agility: ${r.numeralWrapper.format(e.agility,"0,0")} (${r.numeralWrapper.formatBigNumber(e.agility_exp)} exp)<br>`+`Charisma: ${r.numeralWrapper.format(e.charisma,"0,0")} (${r.numeralWrapper.formatBigNumber(e.charisma_exp)} exp)<br>`+`# Augmentations: ${e.augmentations.length}`}),t.multipliersButton=c.createElement("button",{class:"std-button",innerText:"Multipliers",clickListener:()=>{s.dialogBoxCreate(["<h2><u>Total Multipliers:</u></h2>",`Hacking Level multiplier: ${r.numeralWrapper.formatPercentage(e.hacking_mult)}`,`Hacking Experience multiplier: ${r.numeralWrapper.formatPercentage(e.hacking_exp_mult)}`,`Strength Level multiplier: ${r.numeralWrapper.formatPercentage(e.strength_mult)}`,`Strength Experience multiplier: ${r.numeralWrapper.formatPercentage(e.strength_exp_mult)}`,`Defense Level multiplier: ${r.numeralWrapper.formatPercentage(e.defense_mult)}`,`Defense Experience multiplier: ${r.numeralWrapper.formatPercentage(e.defense_exp_mult)}`,`Dexterity Level multiplier: ${r.numeralWrapper.formatPercentage(e.dexterity_mult)}`,`Dexterity Experience multiplier: ${r.numeralWrapper.formatPercentage(e.dexterity_exp_mult)}`,`Agility Level multiplier: ${r.numeralWrapper.formatPercentage(e.agility_mult)}`,`Agility Experience multiplier: ${r.numeralWrapper.formatPercentage(e.agility_exp_mult)}`,`Charisma Level multiplier: ${r.numeralWrapper.formatPercentage(e.charisma_mult)}`,`Charisma Experience multiplier: ${r.numeralWrapper.formatPercentage(e.charisma_exp_mult)}`,`Hacking Chance multiplier: ${r.numeralWrapper.formatPercentage(e.hacking_chance_mult)}`,`Hacking Speed multiplier: ${r.numeralWrapper.formatPercentage(e.hacking_speed_mult)}`,`Hacking Money multiplier: ${r.numeralWrapper.formatPercentage(e.hacking_money_mult)}`,`Hacking Growth multiplier: ${r.numeralWrapper.formatPercentage(e.hacking_grow_mult)}`,`Salary multiplier: ${r.numeralWrapper.formatPercentage(e.work_money_mult)}`,`Company Reputation Gain multiplier: ${r.numeralWrapper.formatPercentage(e.company_rep_mult)}`,`Faction Reputation Gain multiplier: ${r.numeralWrapper.formatPercentage(e.faction_rep_mult)}`,`Crime Money multiplier: ${r.numeralWrapper.formatPercentage(e.crime_money_mult)}`,`Crime Success multiplier: ${r.numeralWrapper.formatPercentage(e.crime_success_mult)}`,`Hacknet Income multiplier: ${r.numeralWrapper.formatPercentage(e.hacknet_node_money_mult)}`,`Hacknet Purchase Cost multiplier: ${r.numeralWrapper.formatPercentage(e.hacknet_node_purchase_cost_mult)}`,`Hacknet Level Upgrade Cost multiplier: ${r.numeralWrapper.formatPercentage(e.hacknet_node_level_cost_mult)}`,`Hacknet Ram Upgrade Cost multiplier: ${r.numeralWrapper.formatPercentage(e.hacknet_node_ram_cost_mult)}`,`Hacknet Core Upgrade Cost multiplier: ${r.numeralWrapper.formatPercentage(e.hacknet_node_core_cost_mult)}`,`Bladeburner Max Stamina multiplier: ${r.numeralWrapper.formatPercentage(e.bladeburner_max_stamina_mult)}`,`Bladeburner Stamina Gain multiplier: ${r.numeralWrapper.formatPercentage(e.bladeburner_stamina_gain_mult)}`,`Bladeburner Field Analysis multiplier: ${r.numeralWrapper.formatPercentage(e.bladeburner_analysis_mult)}`,`Bladeburner Success Chance multiplier: ${r.numeralWrapper.formatPercentage(e.bladeburner_success_chance_mult)}`].join("<br>"),!1)}}),t.statsPanel.appendChild(t.stats),t.statsPanel.appendChild(t.multipliersButton),t.augPanel=c.createElement("div",{class:"resleeve-panel",width:"50%"}),t.augSelector=c.createElement("select",{class:"resleeve-aug-selector dropdown"}),t.augDescription=c.createElement("p");for(let n=0;n<e.augmentations.length;++n)t.augSelector.add(u.createOptionElement(e.augmentations[n].name));t.augSelector.addEventListener("change",()=>{!function(e){const t=p.getSelectValue(e.augSelector),n=i.Augmentations[t];if(null==n)return void console.warn(`Could not find Augmentation with name ${t}`);e.augDescription.innerHTML=n.info}(t)}),t.augSelector.dispatchEvent(new Event("change")),t.augPanel.appendChild(t.augSelector),t.augPanel.appendChild(t.augDescription);const n=e.getCost();return t.costPanel=c.createElement("div",{class:"resleeve-panel",width:"20%"}),t.costText=c.createElement("p",{innerText:`It costs ${r.numeralWrapper.formatMoney(n)} `+"to purchase this Sleeve."}),t.buyButton=c.createElement("button",{class:"std-button",innerText:"Purchase",clickListener:()=>{a.purchaseResleeve(e,g)?s.dialogBoxCreate(`You re-sleeved for ${r.numeralWrapper.formatMoney(n)}!`,!1):s.dialogBoxCreate("You cannot afford to re-sleeve into this body",!1)}}),t.costPanel.appendChild(t.costText),t.costPanel.appendChild(t.buyButton),t.container.appendChild(t.statsPanel),t.container.appendChild(t.augPanel),t.container.appendChild(t.costPanel),t}t.createResleevesPage=function(e){if(o.routing.isOn(o.Page.Resleeves))try{let t;g=e,d.container=c.createElement("div",{class:"generic-menupage-container",id:"resleeves-container",position:"fixed"}),d.info=c.createElement("p",{display:"block",innerHTML:"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!<br><br>Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).<br><br>NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.",width:"75%"}),0===e.resleeves.length&&(e.resleeves=a.generateResleeves()),d.sortTag=c.createElement("p",{display:"inline-block",innerText:"Sort By: "}),d.sortSelector=c.createElement("select",{class:"dropdown"}),function(e){e.Cost="Cost",e.Hacking="Hacking",e.Strength="Strength",e.Defense="Defense",e.Dexterity="Dexterity",e.Agility="Agility",e.Charisma="Charisma",e.AverageCombatStats="AverageCombat",e.AverageAllStats="AverageAllStats",e.TotalNumAugmentations="TotalNumAugmentations"}(t||(t={})),d.sortSelector.add(u.createOptionElement("Cost",t.Cost)),d.sortSelector.add(u.createOptionElement("Hacking Level",t.Hacking)),d.sortSelector.add(u.createOptionElement("Strength Level",t.Strength)),d.sortSelector.add(u.createOptionElement("Defense Level",t.Defense)),d.sortSelector.add(u.createOptionElement("Dexterity Level",t.Dexterity)),d.sortSelector.add(u.createOptionElement("Agility Level",t.Agility)),d.sortSelector.add(u.createOptionElement("Charisma Level",t.Charisma)),d.sortSelector.add(u.createOptionElement("Average Combat Stats",t.AverageCombatStats)),d.sortSelector.add(u.createOptionElement("Average Stats",t.AverageAllStats)),d.sortSelector.add(u.createOptionElement("Number of Augmentations",t.TotalNumAugmentations)),d.resleeveList=c.createElement("ul"),d.sortSelector.onchange=(()=>{function n(...e){let t=0;for(let n=0;n<e.length;++n)t+=e[n];return t/e.length}switch(m.removeChildrenFromElement(d.resleeveList),d.resleeves=[],p.getSelectValue(d.sortSelector)){case t.Hacking:e.resleeves.sort((e,t)=>e.hacking_skill-t.hacking_skill);break;case t.Strength:e.resleeves.sort((e,t)=>e.strength-t.strength);break;case t.Defense:e.resleeves.sort((e,t)=>e.defense-t.defense);break;case t.Dexterity:e.resleeves.sort((e,t)=>e.dexterity-t.dexterity);break;case t.Agility:e.resleeves.sort((e,t)=>e.agility-t.agility);break;case t.Charisma:e.resleeves.sort((e,t)=>e.charisma-t.charisma);break;case t.AverageCombatStats:e.resleeves.sort((e,t)=>n(e.strength,e.defense,e.dexterity,e.agility)-n(t.strength,t.defense,t.dexterity,t.agility));break;case t.AverageAllStats:e.resleeves.sort((e,t)=>n(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-n(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma));break;case t.TotalNumAugmentations:e.resleeves.sort((e,t)=>e.augmentations.length-t.augmentations.length);break;case t.Cost:default:e.resleeves.sort((e,t)=>e.getCost()-t.getCost())}for(const t of e.resleeves){const e=_(t);d.resleeveList.appendChild(e.container),d.resleeves.push(e)}}),d.sortSelector.dispatchEvent(new Event("change")),d.container.appendChild(d.info),d.container.appendChild(c.createElement("br")),d.container.appendChild(d.sortTag),d.container.appendChild(d.sortSelector),d.container.appendChild(d.resleeveList),document.getElementById("entire-game-container").appendChild(d.container)}catch(e){l.exceptionAlert(e)}},t.clearResleevesPage=function(){d.container instanceof HTMLElement&&h.removeElement(d.container);for(const e in d)d[e]=null;g=null}},function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});n(5),n(49),n(119),n(18),n(80),n(30),n(14),n(0),n(134),n(23),n(21),n(77),n(29),n(35),n(71),n(3),n(9),n(43),n(4),n(58),n(88);var a=n(26),i=n(2),r=n.n(i);n(113);r.a.Component;const o="dev-menu-container";function s(){throw new Error("Cannot create Dev Menu because you are not in a dev build")}function l(){Object(a.removeElementById)(o)}},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var a=n(92),i=n(0),r=n(40),o=n(10),s=n(123);n(7);function l(){if(r.SpecialServerIps.hasOwnProperty("Darkweb Server")){var e=r.SpecialServerIps["Darkweb Server"];if(!Object(s.isValidIPAddress)(e))return;e==i.a.getCurrentServer().ip&&Object(o.post)("You are now connected to the dark web. From the dark web you can purchase illegal items. Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] to purchase an item")}}function c(e){if(0!=e.length)switch(e[0]){case"buy":if(2!=e.length)return Object(o.post)("Incorrect number of arguments. Usage: "),Object(o.post)("buy -l"),void Object(o.post)("buy [item name]");var t=e[1];"-l"==t?function(){for(const e in a.DarkWebItems){const t=a.DarkWebItems[e];Object(o.post)(t.toString())}}():function(e){e=e.toLowerCase();let t=null;for(const n in a.DarkWebItems){const i=a.DarkWebItems[n];i.program.toLowerCase()==e&&(t=i)}if(null===t)return void Object(o.post)("Unrecognized item: "+e);if(i.a.hasProgram(t.program))return void Object(o.post)("You already have the "+t.program+" program");if(i.a.money.lt(t.price))return void Object(o.post)("Not enough money to purchase "+t.program);i.a.loseMoney(t.price),i.a.getHomeComputer().programs.push(t.program),Object(o.post)("You have purchased the "+t.program+" program. The new program can be found on your home computer.")}(t);break;default:Object(o.post)("Command not found")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(17);t.AllCorporationStates=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class i{constructor(){this.state=0}static fromJSON(e){return a.Generic_fromJSON(i,e.data)}getState(){return t.AllCorporationStates[this.state]}nextState(){(this.state<0||this.state>=t.AllCorporationStates.length)&&(this.state=0),++this.state,this.state>=t.AllCorporationStates.length&&(this.state=0)}toJSON(){return a.Generic_toJSON("CorporationState",this)}}t.CorporationState=i,a.Reviver.constructors.CorporationState=i},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(20),i=n(89),r=n(1);t.createTaskTracker=function(){return{hack:0,str:0,def:0,dex:0,agi:0,cha:0,money:0}};t.Person=class{constructor(){this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=1,this.hp=10,this.max_hp=10,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.augmentations=[],this.queuedAugmentations=[],this.city=i.Cities.Sector12}applyAugmentation(e){for(const t in e.mults)null==this[t]?console.warn(`Augmentation has unrecognized multiplier property: ${t}`):this[t]*=e.mults[t]}calculateStat(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}getFactionFieldWorkRepGain(){return.9*(this.hacking_skill/r.CONSTANTS.MaxSkillLevel+this.strength/r.CONSTANTS.MaxSkillLevel+this.defense/r.CONSTANTS.MaxSkillLevel+this.dexterity/r.CONSTANTS.MaxSkillLevel+this.agility/r.CONSTANTS.MaxSkillLevel+this.charisma/r.CONSTANTS.MaxSkillLevel)/5.5*this.faction_rep_mult}getFactionHackingWorkRepGain(){return this.hacking_skill/r.CONSTANTS.MaxSkillLevel*this.faction_rep_mult}getFactionSecurityWorkRepGain(){return.9*(this.hacking_skill/r.CONSTANTS.MaxSkillLevel+this.strength/r.CONSTANTS.MaxSkillLevel+this.defense/r.CONSTANTS.MaxSkillLevel+this.dexterity/r.CONSTANTS.MaxSkillLevel+this.agility/r.CONSTANTS.MaxSkillLevel)/4.5*this.faction_rep_mult}resetMultipliers(){this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.work_money_mult=1}updateStatLevels(){this.hacking_skill=Math.max(1,Math.floor(this.calculateStat(this.hacking_exp,this.hacking_mult*a.BitNodeMultipliers.HackingLevelMultiplier))),this.strength=Math.max(1,Math.floor(this.calculateStat(this.strength_exp,this.strength_mult*a.BitNodeMultipliers.StrengthLevelMultiplier))),this.defense=Math.max(1,Math.floor(this.calculateStat(this.defense_exp,this.defense_mult*a.BitNodeMultipliers.DefenseLevelMultiplier))),this.dexterity=Math.max(1,Math.floor(this.calculateStat(this.dexterity_exp,this.dexterity_mult*a.BitNodeMultipliers.DexterityLevelMultiplier))),this.agility=Math.max(1,Math.floor(this.calculateStat(this.agility_exp,this.agility_mult*a.BitNodeMultipliers.AgilityLevelMultiplier))),this.charisma=Math.max(1,Math.floor(this.calculateStat(this.charisma_exp,this.charisma_mult*a.BitNodeMultipliers.CharismaLevelMultiplier)));const e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1);t.Crime=class{constructor(e="",t="",n=0,a=0,i=0,r=0,o={}){this.difficulty=0,this.karma=0,this.kills=0,this.money=0,this.name="",this.time=0,this.type="",this.hacking_success_weight=0,this.strength_success_weight=0,this.defense_success_weight=0,this.dexterity_success_weight=0,this.agility_success_weight=0,this.charisma_success_weight=0,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.name=e,this.type=t,this.time=n,this.money=a,this.difficulty=i,this.karma=r,this.hacking_success_weight=o.hacking_success_weight?o.hacking_success_weight:0,this.strength_success_weight=o.strength_success_weight?o.strength_success_weight:0,this.defense_success_weight=o.defense_success_weight?o.defense_success_weight:0,this.dexterity_success_weight=o.dexterity_success_weight?o.dexterity_success_weight:0,this.agility_success_weight=o.agility_success_weight?o.agility_success_weight:0,this.charisma_success_weight=o.charisma_success_weight?o.charisma_success_weight:0,this.hacking_exp=o.hacking_exp?o.hacking_exp:0,this.strength_exp=o.strength_exp?o.strength_exp:0,this.defense_exp=o.defense_exp?o.defense_exp:0,this.dexterity_exp=o.dexterity_exp?o.dexterity_exp:0,this.agility_exp=o.agility_exp?o.agility_exp:0,this.charisma_exp=o.charisma_exp?o.charisma_exp:0,this.intelligence_exp=o.intelligence_exp?o.intelligence_exp:0,this.kills=o.kills?o.kills:0}commit(e,t=1,n=null){return t<=0&&(t=1),e.startCrime(this.type,this.hacking_exp/t,this.strength_exp/t,this.defense_exp/t,this.dexterity_exp/t,this.agility_exp/t,this.charisma_exp/t,this.money/t,this.time,n),this.time}successRate(e){let t=this.hacking_success_weight*e.hacking_skill+this.strength_success_weight*e.strength+this.defense_success_weight*e.defense+this.dexterity_success_weight*e.dexterity+this.agility_success_weight*e.agility+this.charisma_success_weight*e.charisma+a.CONSTANTS.IntelligenceCrimeWeight*e.intelligence;return t/=a.CONSTANTS.MaxSkillLevel,t/=this.difficulty,t*=e.crime_success_mult,Math.min(t,1)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(32);function i(e,t,n){for(var a=0;a<t.length;++a)e?(t[a].style.opacity="1",t[a].style.maxHeight=t[a].scrollHeight+"px"):(t[a].style.opacity="0",t[a].style.maxHeight=null);for(a=0;a<n.length;++a)e?(n[a].style.opacity="1",n[a].style.maxHeight=n[a].scrollHeight+"px",n[a].style.pointerEvents="auto"):(n[a].style.opacity="0",n[a].style.maxHeight=null,n[a].style.pointerEvents="none")}t.MainMenuHeaders={Hacking:null,Character:null,World:null,Help:null},t.initializeMainMenuHeaders=function(e,n=!1){function r(e){const t=document.getElementById(e);if(null==t)throw new Error(`Failed to find element with id ${e} in initializeMainMenuHeaders()`);return t}try{return t.MainMenuHeaders.Hacking=r("hacking-menu-header"),t.MainMenuHeaders.Character=r("character-menu-header"),t.MainMenuHeaders.World=r("world-menu-header"),t.MainMenuHeaders.Help=r("help-menu-header"),t.MainMenuHeaders.Hacking.onclick=function(){const e=r("terminal-tab"),t=r("create-script-tab"),n=r("active-scripts-tab"),o=r("create-program-tab"),s=r("create-program-notification");this.classList.toggle("opened");const l=[e,t,n,o],c=[a.MainMenuLinks.Terminal,a.MainMenuLinks.ScriptEditor,a.MainMenuLinks.ActiveScripts,a.MainMenuLinks.CreateProgram];e.style.maxHeight?(i(!1,l,c),s.style.display="none"):(i(!0,l,c),s.style.display="block")},t.MainMenuHeaders.Character.onclick=function(){const t=r("stats-tab"),n=r("factions-tab"),o=r("augmentations-tab"),s=r("hacknet-nodes-tab"),l=r("sleeves-tab");l.style.display=e.sleeves.length>0?"list-item":"none",this.classList.toggle("opened");const c=[t,n,o,s,l],u=[a.MainMenuLinks.Stats,a.MainMenuLinks.Factions,a.MainMenuLinks.Augmentations,a.MainMenuLinks.HacknetNodes,a.MainMenuLinks.Sleeves];t.style.maxHeight?i(!1,c,u):i(!0,c,u)},t.MainMenuHeaders.World.onclick=function(){const t=r("city-tab"),n=r("travel-tab"),o=r("job-tab"),s=r("stock-market-tab"),l=r("bladeburner-tab"),c=r("corporation-tab"),u=r("gang-tab");o.style.display=""!==e.companyName?"list-item":"none",s.style.display=e.hasWseAccount?"list-item":"none",l.style.display=e.inBladeburner()?"list-item":"none",c.style.display=e.hasCorporation()?"list-item":"none",u.style.display=e.inGang()?"list-item":"none",this.classList.toggle("opened");const p=[t,n,o,s,l,c,u],m=[a.MainMenuLinks.City,a.MainMenuLinks.Travel,a.MainMenuLinks.Job,a.MainMenuLinks.StockMarket,a.MainMenuLinks.Bladeburner,a.MainMenuLinks.Corporation,a.MainMenuLinks.Gang];t.style.maxHeight?i(!1,p,m):i(!0,p,m)},t.MainMenuHeaders.Help.onclick=function(){const e=r("tutorial-tab"),t=r("options-tab");this.classList.toggle("opened");const o=[e,t],s=[a.MainMenuLinks.Tutorial,a.MainMenuLinks.Options];n&&(o.push(r("dev-tab")),s.push(r("dev-menu-link"))),e.style.maxHeight?i(!1,o,s):i(!0,o,s)},!0}catch(e){return console.error(`Failed to initialize Main Menu Headers: ${e}`),!1}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(11),i=n(19),r=n(3);function o(){var e=document.getElementById("settingsNSExecTimeRangeValLabel"),t=document.getElementById("settingsNSLogRangeValLabel"),n=document.getElementById("settingsNSPortRangeValLabel"),o=document.getElementById("settingsSuppressMessages"),s=document.getElementById("settingsSuppressFactionInvites"),l=document.getElementById("settingsSuppressTravelConfirmation"),c=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),u=document.getElementById("settingsSuppressHospitalizationPopup"),p=document.getElementById("settingsAutosaveIntervalValLabel"),m=document.getElementById("settingsDisableHotkeys"),h=document.getElementById("settingsLocale");e.innerHTML=i.Settings.CodeInstructionRunTime+"ms",t.innerHTML=i.Settings.MaxLogCapacity,n.innerHTML=i.Settings.MaxPortCapacity,o.checked=i.Settings.SuppressMessages,s.checked=i.Settings.SuppressFactionInvites,l.checked=i.Settings.SuppressTravelConfirmation,c.checked=i.Settings.SuppressBuyAugmentationConfirmation,u.checked=i.Settings.SuppressHospitalizationPopup,p.innerHTML=i.Settings.AutosaveInterval,m.checked=i.Settings.DisableHotkeys,h.value=i.Settings.Locale,r.numeralWrapper.updateLocale(i.Settings.Locale);var d=document.getElementById("settingsNSExecTimeRangeVal"),g=document.getElementById("settingsNSLogRangeVal"),_=document.getElementById("settingsNSPortRangeVal"),f=document.getElementById("settingsAutosaveIntervalVal");d.value=i.Settings.CodeInstructionRunTime,g.value=i.Settings.MaxLogCapacity,_.value=i.Settings.MaxPortCapacity,f.value=i.Settings.AutosaveInterval,d.oninput=function(){e.innerHTML=this.value+"ms",i.Settings.CodeInstructionRunTime=this.value},g.oninput=function(){t.innerHTML=this.value,i.Settings.MaxLogCapacity=this.value},_.oninput=function(){n.innerHTML=this.value,i.Settings.MaxPortCapacity=this.value},f.oninput=function(){p.innerHTML=this.value,i.Settings.AutosaveInterval=Number(this.value),0===Number(this.value)?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*Number(this.value)},o.onclick=function(){i.Settings.SuppressMessages=this.checked},s.onclick=function(){i.Settings.SuppressFactionInvites=this.checked},l.onclick=function(){i.Settings.SuppressTravelConfirmation=this.checked},c.onclick=function(){i.Settings.SuppressBuyAugmentationConfirmation=this.checked},u.onclick=function(){i.Settings.SuppressHospitalizationPopup=this.checked},m.onclick=function(){i.Settings.DisableHotkeys=this.checked},h.onchange=function(){if(!r.numeralWrapper.updateLocale(h.value)){console.warn(`Invalid locale for numeral: ${h.value}`);let e="en";return i.Settings.Locale=e,void(h.value=e)}i.Settings.Locale=h.value}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(78),i=n(3),r=n(9),o=n(7),s=n(4),l=n(33);t.displayCharacterInfo=function(e,t){l.removeChildrenFromElement(e);let n="";""!==t.companyName&&(n=t.jobs[t.companyName]);var c="";t.intelligence>0&&(c="Intelligence: "+t.intelligence.toLocaleString()+"<br>");let u="";t.sourceFiles.length>0&&(u="Time played since last Bitnode destroyed: "+o.convertTimeMsToTimeElapsedString(t.playtimeSinceLastBitnode)+"<br>");const p=0!==t.sourceFiles.length;function m(e){let t=[`Total: ${i.numeralWrapper.formatMoney(e.total)}`];return e.bladeburner&&t.push(`Bladeburner: ${i.numeralWrapper.formatMoney(e.bladeburner)}`),e.codingcontract&&t.push(`Coding Contracts: ${i.numeralWrapper.formatMoney(e.codingcontract)}`),e.work&&t.push(`Company Work: ${i.numeralWrapper.formatMoney(e.work)}`),e.corporation&&t.push(`Corporation: ${i.numeralWrapper.formatMoney(e.corporation)}`),e.crime&&t.push(`Crimes: ${i.numeralWrapper.formatMoney(e.crime)}`),e.gang&&t.push(`Gang: ${i.numeralWrapper.formatMoney(e.gang)}`),e.hacking&&t.push(`Hacking: ${i.numeralWrapper.formatMoney(e.hacking)}`),e.hacknetnode&&t.push(`Hacknet Nodes: ${i.numeralWrapper.formatMoney(e.hacknetnode)}`),e.infiltration&&t.push(`Infiltration: ${i.numeralWrapper.formatMoney(e.infiltration)}`),e.stock&&t.push(`Stock Market: ${i.numeralWrapper.formatMoney(e.stock)}`),t.join("<br>")}if(e.appendChild(s.createElement("pre",{display:"block",innerHTML:"<b>General</b><br><br>Current City: "+t.city+"<br><br>"+`Employer at which you last worked: ${t.companyName}<br>`+`Job you last worked: ${n}<br>`+`All Employers: ${Object.keys(t.jobs).join(", ")}<br><br>`})),e.appendChild(s.createElement("pre",{display:"inline-block",innerHTML:"Money: "+i.numeralWrapper.formatMoney(t.money.toNumber())+"<br><br><br>",margin:"6px"})),e.appendChild(s.createElement("button",{class:"popup-box-button",display:"inline-block",float:"none",innerText:"Money Statistics & Breakdown",clickListener:()=>{let e="<u>Money earned since you last installed Augmentations:</u><br>"+m(t.moneySourceA);p&&(e+="<br><br><u>Money earned in this BitNode:</u><br>"+m(t.moneySourceB)),r.dialogBoxCreate(e,!1)}})),e.appendChild(s.createElement("pre",{display:"block",innerHTML:"<b>Stats</b><br><br>Hacking Level: "+t.hacking_skill.toLocaleString()+" ("+i.numeralWrapper.format(t.hacking_exp,"(0.000a)")+" experience)<br>Strength: "+t.strength.toLocaleString()+" ("+i.numeralWrapper.format(t.strength_exp,"(0.000a)")+" experience)<br>Defense: "+t.defense.toLocaleString()+" ("+i.numeralWrapper.format(t.defense_exp,"(0.000a)")+" experience)<br>Dexterity: "+t.dexterity.toLocaleString()+" ("+i.numeralWrapper.format(t.dexterity_exp,"(0.000a)")+" experience)<br>Agility: "+t.agility.toLocaleString()+" ("+i.numeralWrapper.format(t.agility_exp,"(0.000a)")+" experience)<br>Charisma: "+t.charisma.toLocaleString()+" ("+i.numeralWrapper.format(t.charisma_exp,"(0.000a)")+" experience)<br>"+c+"<br><br><b>Multipliers</b><br><br>Hacking Chance multiplier: "+i.numeralWrapper.formatPercentage(t.hacking_chance_mult)+"<br>Hacking Speed multiplier: "+i.numeralWrapper.formatPercentage(t.hacking_speed_mult)+"<br>Hacking Money multiplier: "+i.numeralWrapper.formatPercentage(t.hacking_money_mult)+"<br>Hacking Growth multiplier: "+i.numeralWrapper.formatPercentage(t.hacking_grow_mult)+"<br><br>Hacking Level multiplier: "+i.numeralWrapper.formatPercentage(t.hacking_mult)+"<br>Hacking Experience multiplier: "+i.numeralWrapper.formatPercentage(t.hacking_exp_mult)+"<br><br>Strength Level multiplier: "+i.numeralWrapper.formatPercentage(t.strength_mult)+"<br>Strength Experience multiplier: "+i.numeralWrapper.formatPercentage(t.strength_exp_mult)+"<br><br>Defense Level multiplier: "+i.numeralWrapper.formatPercentage(t.defense_mult)+"<br>Defense Experience multiplier: "+i.numeralWrapper.formatPercentage(t.defense_exp_mult)+"<br><br>Dexterity Level multiplier: "+i.numeralWrapper.formatPercentage(t.dexterity_mult)+"<br>Dexterity Experience multiplier: "+i.numeralWrapper.formatPercentage(t.dexterity_exp_mult)+"<br><br>Agility Level multiplier: "+i.numeralWrapper.formatPercentage(t.agility_mult)+"<br>Agility Experience multiplier: "+i.numeralWrapper.formatPercentage(t.agility_exp_mult)+"<br><br>Charisma Level multiplier: "+i.numeralWrapper.formatPercentage(t.charisma_mult)+"<br>Charisma Experience multiplier: "+i.numeralWrapper.formatPercentage(t.charisma_exp_mult)+"<br><br>Hacknet Node production multiplier: "+i.numeralWrapper.formatPercentage(t.hacknet_node_money_mult)+"<br>Hacknet Node purchase cost multiplier: "+i.numeralWrapper.formatPercentage(t.hacknet_node_purchase_cost_mult)+"<br>Hacknet Node RAM upgrade cost multiplier: "+i.numeralWrapper.formatPercentage(t.hacknet_node_ram_cost_mult)+"<br>Hacknet Node Core purchase cost multiplier: "+i.numeralWrapper.formatPercentage(t.hacknet_node_core_cost_mult)+"<br>Hacknet Node level upgrade cost multiplier: "+i.numeralWrapper.formatPercentage(t.hacknet_node_level_cost_mult)+"<br><br>Company reputation gain multiplier: "+i.numeralWrapper.formatPercentage(t.company_rep_mult)+"<br>Faction reputation gain multiplier: "+i.numeralWrapper.formatPercentage(t.faction_rep_mult)+"<br>Salary multiplier: "+i.numeralWrapper.formatPercentage(t.work_money_mult)+"<br>Crime success multiplier: "+i.numeralWrapper.formatPercentage(t.crime_success_mult)+"<br>Crime money multiplier: "+i.numeralWrapper.formatPercentage(t.crime_money_mult)+"<br><br><br><b>Misc</b><br><br>Servers owned: "+t.purchasedServers.length+"<br>Hacknet Nodes owned: "+t.hacknetNodes.length+"<br>Augmentations installed: "+t.augmentations.length+"<br>Time played since last Augmentation: "+o.convertTimeMsToTimeElapsedString(t.playtimeSinceLastAug)+"<br>"+u+"Time played: "+o.convertTimeMsToTimeElapsedString(t.totalPlaytime)})),p){var h="BitNode"+t.bitNodeN;e.appendChild(s.createElement("p",{width:"60%",innerHTML:"<br>Current BitNode: "+t.bitNodeN+" ("+a.BitNodes[h].name+")<br><br>"})),e.appendChild(s.createElement("p",{width:"60%",fontSize:"13px",marginLeft:"4%",innerHTML:a.BitNodes[h].info}))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(2),i=n.n(a),r=n(0),o=n(3);const s=i.a.Component;class l extends s{render(){const e=i.a.createElement("tr",{id:"character-int-wrapper"},i.a.createElement("td",null,"Int: "),i.a.createElement("td",{id:"character-int-text",className:"character-stat-cell"},r.a.intelligence.toLocaleString()));return i.a.createElement("div",{id:"character-overview-text"},i.a.createElement("table",null,i.a.createElement("tbody",null,i.a.createElement("tr",{id:"character-hp-wrapper"},i.a.createElement("td",null,"Hp:"),i.a.createElement("td",{id:"character-hp-text",className:"character-stat-cell"},r.a.hp+" / "+r.a.max_hp)),i.a.createElement("tr",{id:"character-money-wrapper"},i.a.createElement("td",null,"Money: "),i.a.createElement("td",{id:"character-money-text",className:"character-stat-cell"},o.numeralWrapper.format(r.a.money.toNumber(),"$0.000a"))),i.a.createElement("tr",{id:"character-hack-wrapper"},i.a.createElement("td",null,"Hack: "),i.a.createElement("td",{id:"character-hack-text",className:"character-stat-cell"},r.a.hacking_skill.toLocaleString())),i.a.createElement("tr",{id:"character-str-wrapper"},i.a.createElement("td",null,"Str: "),i.a.createElement("td",{id:"character-str-text",className:"character-stat-cell"},r.a.strength.toLocaleString())),i.a.createElement("tr",{id:"character-def-wrapper"},i.a.createElement("td",null,"Def: "),i.a.createElement("td",{id:"character-def-text",className:"character-stat-cell"},r.a.defense.toLocaleString())),i.a.createElement("tr",{id:"character-dex-wrapper"},i.a.createElement("td",null,"Dex: "),i.a.createElement("td",{id:"character-dex-text",className:"character-stat-cell"},r.a.dexterity.toLocaleString())),i.a.createElement("tr",{id:"character-agi-wrapper"},i.a.createElement("td",null,"Agi: "),i.a.createElement("td",{id:"character-agi-text",className:"character-stat-cell"},r.a.agility.toLocaleString())),i.a.createElement("tr",{id:"character-cha-wrapper"},i.a.createElement("td",null,"Cha: "),i.a.createElement("td",{id:"character-cha-text",className:"character-stat-cell"},r.a.charisma.toLocaleString())),r.a.intelligence>=1&&e)))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(61),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<a.length;r++){var o=function(e){return function(n){try{return e(n)}catch(e){t.throwException(t.URI_ERROR,e.message)}}}(a[r][0]);this.setProperty(e,a[r][1],this.createNativeFunction(o,!1),i.NONENUMERABLE_DESCRIPTOR)}this.OBJECT=this.OBJECT,this.OBJECT_PROTO=this.OBJECT_PROTO,this.FUNCTION=this.FUNCTION,this.FUNCTION_PROTO=this.FUNCTION_PROTO,this.ARRAY=this.ARRAY,this.ARRAY_PROTO=this.ARRAY_PROTO,this.REGEXP=this.REGEXP,this.REGEXP_PROTO=this.REGEXP_PROTO,this.DATE=this.DATE,this.DATE_PROTO=this.DATE_PROTO,this.UNDEFINED=void 0,this.NULL=null,this.NAN=NaN,this.TRUE=!0,this.FALSE=!1,this.STRING_EMPTY="",this.NUMBER_ZERO=0,this.NUMBER_ONE=1,this.initFunc_&&this.initFunc_(this,e)},i.prototype.initFunction=function(e){var t,n=this,r=/^[A-Za-z_$][\w$]*$/;(t=function(e){if(n.calledWithNew())var t=this;else t=n.createObjectProto(n.FUNCTION_PROTO);if(arguments.length)var o=String(arguments[arguments.length-1]);else o="";var s=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(s){for(var l=s.split(/\s*,\s*/),c=0;c<l.length;c++){var u=l[c];r.test(u)||n.throwException(n.SYNTAX_ERROR,"Invalid function argument: "+u)}s=l.join(", ")}t.parentScope=n.global;try{var p=a.parse("(function("+s+") {"+o+"})",i.PARSE_OPTIONS)}catch(e){n.throwException(n.SYNTAX_ERROR,"Invalid code: "+e.message)}return 1!==p.body.length&&n.throwException(n.SYNTAX_ERROR,"Invalid code in function body."),t.node=p.body[0].expression,n.setProperty(t,"length",t.node.length,i.READONLY_DESCRIPTOR),t}).id=this.functionCounter_++,this.FUNCTION=this.createObjectProto(this.FUNCTION_PROTO),this.setProperty(e,"Function",this.FUNCTION),this.setProperty(this.FUNCTION,"prototype",this.FUNCTION_PROTO),this.FUNCTION.nativeFunc=t,this.setProperty(this.FUNCTION_PROTO,"constructor",this.FUNCTION,i.NONENUMERABLE_DESCRIPTOR),this.FUNCTION_PROTO.nativeFunc=function(){},this.FUNCTION_PROTO.nativeFunc.id=this.functionCounter_++,this.setProperty(this.FUNCTION_PROTO,"length",0,i.READONLY_DESCRIPTOR);var o=function(e){if(!(e&&e.isObject||n.getScope().strict))if(void 0===e||null===e)e=n.global;else{var t=n.createObjectProto(n.getPrototype(e));t.data=e,e=t}return e};t=function(e,t){var a=n.stateStack[n.stateStack.length-1];a.func_=this,a.funcThis_=o(e),a.arguments_=[],null!==t&&void 0!==t&&(t.isObject?a.arguments_=n.arrayPseudoToNative(t):n.throwException(n.TYPE_ERROR,"CreateListFromArrayLike called on non-object")),a.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"apply",t),t=function(e){var t=n.stateStack[n.stateStack.length-1];t.func_=this,t.funcThis_=o(e),t.arguments_=[];for(var a=1;a<arguments.length;a++)t.arguments_.push(arguments[a]);t.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"call",t),this.polyfills_.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),t=function(){return this.toString()},this.setNativeFunctionPrototype(this.FUNCTION,"toString",t),this.setProperty(this.FUNCTION,"toString",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(){return this.valueOf()},this.setNativeFunctionPrototype(this.FUNCTION,"valueOf",t),this.setProperty(this.FUNCTION,"valueOf",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR)},i.prototype.initObject=function(e){var t,n=this;t=function(e){if(void 0===e||null===e)return n.calledWithNew()?this:n.createObjectProto(n.OBJECT_PROTO);if(!e.isObject){var t=n.createObjectProto(n.getPrototype(e));return t.data=e,t}return e},this.OBJECT=this.createNativeFunction(t,!0),this.setProperty(this.OBJECT,"prototype",this.OBJECT_PROTO),this.setProperty(this.OBJECT_PROTO,"constructor",this.OBJECT,i.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"Object",this.OBJECT);var a=function(e){void 0!==e&&null!==e||n.throwException(n.TYPE_ERROR,"Cannot convert '"+e+"' to object")};t=function(e){a(e);var t=e.isObject?e.properties:e;return n.arrayNativeToPseudo(Object.getOwnPropertyNames(t))},this.setProperty(this.OBJECT,"getOwnPropertyNames",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return a(e),e.isObject&&(e=e.properties),n.arrayNativeToPseudo(Object.keys(e))},this.setProperty(this.OBJECT,"keys",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return null===e?n.createObjectProto(null):(void 0!==e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object prototype may only be an Object or null"),n.createObjectProto(e))},this.setProperty(this.OBJECT,"create",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var create_ = Object.create;","Object.create = function(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),t=function(e,t,a){return t=String(t),e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object.defineProperty called on non-object"),a&&a.isObject||n.throwException(n.TYPE_ERROR,"Property description must be an object"),!e.properties[t]&&e.preventExtensions&&n.throwException(n.TYPE_ERROR,"Can't define property '"+t+"', object is not extensible"),n.setProperty(e,t,i.VALUE_IN_DESCRIPTOR,a.properties),e},this.setProperty(this.OBJECT,"defineProperty",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),t=function(e,t){if(e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object.getOwnPropertyDescriptor called on non-object"),(t=String(t))in e.properties){var a=Object.getOwnPropertyDescriptor(e.properties,t),i=e.getter[t],r=e.setter[t];(i||r)&&(a.get=i,a.set=r,delete a.value,delete a.writable);var o=a.value,s="value"in a;delete a.value;var l=n.nativeToPseudo(a);return s&&n.setProperty(l,"value",o),l}},this.setProperty(this.OBJECT,"getOwnPropertyDescriptor",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return a(e),n.getPrototype(e)},this.setProperty(this.OBJECT,"getPrototypeOf",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return Boolean(e)&&!e.preventExtensions},this.setProperty(this.OBJECT,"isExtensible",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return e&&e.isObject&&(e.preventExtensions=!0),e},this.setProperty(this.OBJECT,"preventExtensions",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),this.setNativeFunctionPrototype(this.OBJECT,"toString",i.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"toLocaleString",i.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"valueOf",i.Object.prototype.valueOf),t=function(e){return a(this),this.isObject?String(e)in this.properties:this.hasOwnProperty(e)},this.setNativeFunctionPrototype(this.OBJECT,"hasOwnProperty",t),t=function(e){return a(this),this.isObject?Object.prototype.propertyIsEnumerable.call(this.properties,e):this.propertyIsEnumerable(e)},this.setNativeFunctionPrototype(this.OBJECT,"propertyIsEnumerable",t),t=function(e){for(;;){if(!(e=n.getPrototype(e)))return!1;if(e===this)return!0}},this.setNativeFunctionPrototype(this.OBJECT,"isPrototypeOf",t)},i.prototype.initArray=function(e){var t,n=this;t=function(e){if(n.calledWithNew())var t=this;else t=n.createObjectProto(n.ARRAY_PROTO);var a=arguments[0];if(1===arguments.length&&"number"==typeof a)isNaN(i.legalArrayLength(a))&&n.throwException(n.RANGE_ERROR,"Invalid array length"),t.properties.length=a;else{for(var r=0;r<arguments.length;r++)t.properties[r]=arguments[r];t.properties.length=r}return t},this.ARRAY=this.createNativeFunction(t,!0),this.ARRAY_PROTO=this.ARRAY.properties.prototype,this.setProperty(e,"Array",this.ARRAY),t=function(e){return e&&"Array"===e.class},this.setProperty(this.ARRAY,"isArray",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(){return Array.prototype.pop.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"pop",t),t=function(e){return Array.prototype.push.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"push",t),t=function(){return Array.prototype.shift.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"shift",t),t=function(e){return Array.prototype.unshift.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"unshift",t),t=function(){return Array.prototype.reverse.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"reverse",t),t=function(e,t){var a=Array.prototype.splice.apply(this.properties,arguments);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.ARRAY,"splice",t),t=function(e,t){var a=Array.prototype.slice.call(this.properties,e,t);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.ARRAY,"slice",t),t=function(e){return Array.prototype.join.call(this.properties,e)},this.setNativeFunctionPrototype(this.ARRAY,"join",t),t=function(e){for(var t=[],a=0,i=n.getProperty(this,"length"),r=0;r<i;r++){if(n.hasProperty(this,r)){var o=n.getProperty(this,r);t[a]=o}a++}for(r=0;r<arguments.length;r++){var s=arguments[r];if(n.isa(s,n.ARRAY))for(var l=n.getProperty(s,"length"),c=0;c<l;c++)n.hasProperty(s,c)&&(t[a]=n.getProperty(s,c)),a++;else t[a]=s}return n.arrayNativeToPseudo(t)},this.setNativeFunctionPrototype(this.ARRAY,"concat",t),t=function(e,t){return Array.prototype.indexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"indexOf",t),t=function(e,t){return Array.prototype.lastIndexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"lastIndexOf",t),t=function(){return Array.prototype.sort.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"sort",t),this.polyfills_.push("Object.defineProperty(Array.prototype, 'every',","{configurable: true, writable: true, value:","function(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","if (!Array.prototype.find) {","Object.defineProperty(Array.prototype, 'find', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return kValue;","}","k++;","}","return undefined;","},","configurable: true,","writable: true","});","}","if (!Array.prototype.findIndex) {","Object.defineProperty(Array.prototype, 'findIndex', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return k;","}","k++;","}","return -1;","},","configurable: true,","writable: true","});","}","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'includes', {","value: function(searchElement, fromIndex) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","// 1. Let O be ? ToObject(this value).","var o = Object(this);",'// 2. Let len be ? ToLength(? Get(O, "length")).',"var len = o.length >>> 0;","// 3. If len is 0, return false.","if (len === 0) {","return false;","}","// 4. Let n be ? ToInteger(fromIndex).","// (If fromIndex is undefined, this step produces the value 0.)","var n = fromIndex | 0;","// 5. If n ≥ 0, then","// a. Let k be n.","// 6. Else n < 0,","// a. Let k be len + n.","// b. If k < 0, let k be 0.","var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","function sameValueZero(x, y) {","return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));","}","// 7. Repeat, while k < len","while (k < len) {","// a. Let elementK be the result of ? Get(O, ! ToString(k)).","// b. If SameValueZero(searchElement, elementK) is true, return true.","if (sameValueZero(o[k], searchElement)) {","return true;","}","// c. Increase k by 1. ","k++;","}","// 8. Return false","return false;","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},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<a.length;r++)this.setNativeFunctionPrototype(this.STRING,a[r],String.prototype[a[r]]);t=function(e,t,a){return t=t?n.pseudoToNative(t):void 0,a=a?n.pseudoToNative(a):void 0,String(this).localeCompare(e,t,a)},this.setNativeFunctionPrototype(this.STRING,"localeCompare",t),t=function(e,t){n.isa(e,n.REGEXP)&&(e=e.data);var a=String(this).split(e,t);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.STRING,"split",t),t=function(e){n.isa(e,n.REGEXP)&&(e=e.data);var t=String(this).match(e);return t&&n.arrayNativeToPseudo(t)},this.setNativeFunctionPrototype(this.STRING,"match",t),t=function(e){return n.isa(e,n.REGEXP)&&(e=e.data),String(this).search(e)},this.setNativeFunctionPrototype(this.STRING,"search",t),t=function(e,t){return n.isa(e,n.REGEXP)&&(e=e.data),String(this).replace(e,t)},this.setNativeFunctionPrototype(this.STRING,"replace",t),this.polyfills_.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","if (!String.prototype.endsWith) {","String.prototype.endsWith = function(search, this_len) {","if (this_len === undefined || this_len > this.length) {","this_len = this.length;","}","return this.substring(this_len - search.length, this_len) === search;","};","}","if (!String.prototype.includes) {","String.prototype.includes = function(search, start) {","'use strict';","if (typeof start !== 'number') {","start = 0;","}"," ","if (start + search.length > this.length) {","return false;","} else {","return this.indexOf(search, start) !== -1;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},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<a.length;r++)this.setProperty(this.NUMBER,a[r],Number[a[r]],i.READONLY_NONENUMERABLE_DESCRIPTOR);t=function(e){try{return Number(this).toExponential(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toExponential",t),t=function(e){try{return Number(this).toFixed(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toFixed",t),t=function(e){try{return Number(this).toPrecision(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toPrecision",t),t=function(e){try{return Number(this).toString(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toString",t),t=function(e,t){return e=e?n.pseudoToNative(e):void 0,t=t?n.pseudoToNative(t):void 0,Number(this).toLocaleString(e,t)},this.setNativeFunctionPrototype(this.NUMBER,"toLocaleString",t)},i.prototype.initDate=function(e){var t,n=this;t=function(e,t){if(!n.calledWithNew())return Date();var a=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(Date,a)),this},this.DATE=this.createNativeFunction(t,!0),this.DATE_PROTO=this.DATE.properties.prototype,this.setProperty(e,"Date",this.DATE),this.setProperty(this.DATE,"now",this.createNativeFunction(Date.now,!1),i.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"parse",this.createNativeFunction(Date.parse,!1),i.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"UTC",this.createNativeFunction(Date.UTC,!1),i.NONENUMERABLE_DESCRIPTOR);for(var a=["getDate","getDay","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","getTime","getTimezoneOffset","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toISOString","toJSON","toGMTString","toLocaleDateString","toLocaleString","toLocaleTimeString","toTimeString","toUTCString"],r=0;r<a.length;r++)t=function(e){return function(t){for(var a=[],i=0;i<arguments.length;i++)a[i]=n.pseudoToNative(arguments[i]);return this.data[e].apply(this.data,a)}}(a[r]),this.setNativeFunctionPrototype(this.DATE,a[r],t)},i.prototype.initRegExp=function(e){var t,n=this;t=function(e,t){if(n.calledWithNew())var a=this;else a=n.createObjectProto(n.REGEXP_PROTO);return e=e?e.toString():"",t=t?t.toString():"",n.populateRegExp(a,new RegExp(e,t)),a},this.REGEXP=this.createNativeFunction(t,!0),this.REGEXP_PROTO=this.REGEXP.properties.prototype,this.setProperty(e,"RegExp",this.REGEXP),this.setProperty(this.REGEXP.properties.prototype,"global",void 0,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"ignoreCase",void 0,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"multiline",void 0,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"source","(?:)",i.READONLY_NONENUMERABLE_DESCRIPTOR),t=function(e){return this.data.test(e)},this.setNativeFunctionPrototype(this.REGEXP,"test",t),t=function(e){e=e.toString(),this.data.lastIndex=Number(n.getProperty(this,"lastIndex"));var t=this.data.exec(e);if(n.setProperty(this,"lastIndex",this.data.lastIndex),t){for(var a=n.createObjectProto(n.ARRAY_PROTO),i=0;i<t.length;i++)n.setProperty(a,i,t[i]);return n.setProperty(a,"index",t.index),n.setProperty(a,"input",t.input),a}return null},this.setNativeFunctionPrototype(this.REGEXP,"exec",t)},i.prototype.initError=function(e){var t=this;this.ERROR=this.createNativeFunction(function(e){if(t.calledWithNew())var n=this;else n=t.createObject(t.ERROR);return e&&t.setProperty(n,"message",String(e),i.NONENUMERABLE_DESCRIPTOR),n},!0),this.setProperty(e,"Error",this.ERROR),this.setProperty(this.ERROR.properties.prototype,"message","",i.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.ERROR.properties.prototype,"name","Error",i.NONENUMERABLE_DESCRIPTOR);var n=function(n){var a=t.createNativeFunction(function(e){if(t.calledWithNew())var n=this;else n=t.createObject(a);return e&&t.setProperty(n,"message",String(e),i.NONENUMERABLE_DESCRIPTOR),n},!0);return t.setProperty(a,"prototype",t.createObject(t.ERROR)),t.setProperty(a.properties.prototype,"name",n,i.NONENUMERABLE_DESCRIPTOR),t.setProperty(e,n,a),a};this.EVAL_ERROR=n("EvalError"),this.RANGE_ERROR=n("RangeError"),this.REFERENCE_ERROR=n("ReferenceError"),this.SYNTAX_ERROR=n("SyntaxError"),this.TYPE_ERROR=n("TypeError"),this.URI_ERROR=n("URIError")},i.prototype.initMath=function(e){var t=this.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"Math",t);for(var n=["E","LN2","LN10","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],a=0;a<n.length;a++)this.setProperty(t,n[a],Math[n[a]],i.READONLY_NONENUMERABLE_DESCRIPTOR);var r=["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","random","round","sin","sqrt","tan"];for(a=0;a<r.length;a++)this.setProperty(t,r[a],this.createNativeFunction(Math[r[a]],!1),i.NONENUMERABLE_DESCRIPTOR)},i.prototype.initJSON=function(e){var t=this,n=t.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"JSON",n);var a=function(e){try{var n=JSON.parse(e.toString())}catch(e){t.throwException(t.SYNTAX_ERROR,e.message)}return t.nativeToPseudo(n)};this.setProperty(n,"parse",this.createNativeFunction(a,!1)),a=function(e){var n=t.pseudoToNative(e);try{var a=JSON.stringify(n)}catch(e){t.throwException(t.TYPE_ERROR,e.message)}return a},this.setProperty(n,"stringify",this.createNativeFunction(a,!1))},i.prototype.isa=function(e,t){if(null===e||void 0===e||!t)return!1;var n=t.properties.prototype;if(e===n)return!0;for(e=this.getPrototype(e);e;){if(e===n)return!0;e=e.proto}return!1},i.legalArrayLength=function(e){var t=e>>>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;t<this.properties.length;t++){var n=this.properties[t];e[t]=n&&n.isObject&&-1!==a.indexOf(n)?"...":n}}finally{a.pop()}return e.join(",")}if("Error"===this.class){var a,r,o;if(-1!==(a=i.toStringCycles_).indexOf(this))return"[object Error]";var s=this;do{if("name"in s.properties){r=s.properties.name;break}}while(s=s.proto);s=this;do{if("message"in s.properties){o=s.properties.message;break}}while(s=s.proto);a.push(this);try{r=r&&r.toString(),o=o&&o.toString()}finally{a.pop()}return o?r+": "+o:String(r)}return null!==this.data?String(this.data):"[object "+this.class+"]"},i.Object.prototype.valueOf=function(){return void 0===this.data||null===this.data||this.data instanceof RegExp?this:this.data instanceof Date?this.data.valueOf():this.data},i.prototype.createObject=function(e){return this.createObjectProto(e&&e.properties.prototype)},i.prototype.createObjectProto=function(e){if("object"!=typeof e)throw Error("Non object prototype");var t=new i.Object(e);return this.isa(t,this.FUNCTION)&&(this.setProperty(t,"prototype",this.createObjectProto(this.OBJECT_PROTO||null)),t.class="Function"),this.isa(t,this.ARRAY)&&(this.setProperty(t,"length",0,{configurable:!1,enumerable:!1,writable:!0}),t.class="Array"),this.isa(t,this.ERROR)&&(t.class="Error"),t},i.prototype.populateRegExp=function(e,t){e.data=t,this.setProperty(e,"lastIndex",t.lastIndex,i.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"source",t.source,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"global",t.global,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"ignoreCase",t.ignoreCase,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"multiline",t.multiline,i.READONLY_NONENUMERABLE_DESCRIPTOR)},i.prototype.createFunction=function(e,t){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.parentScope=t,n.node=e,this.setProperty(n,"length",n.node.params.length,i.READONLY_DESCRIPTOR),n},i.prototype.createNativeFunction=function(e,t){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.nativeFunc=e,e.id=this.functionCounter_++,this.setProperty(n,"length",e.length,i.READONLY_DESCRIPTOR),t?this.setProperty(n.properties.prototype,"constructor",n,i.NONENUMERABLE_DESCRIPTOR):!1===t&&(n.illegalConstructor=!0,this.setProperty(n,"prototype",void 0)),n},i.prototype.createAsyncFunction=function(e){var t=this.createObjectProto(this.FUNCTION_PROTO);return t.asyncFunc=e,e.id=this.functionCounter_++,this.setProperty(t,"length",e.length,i.READONLY_DESCRIPTOR),t},i.prototype.nativeToPseudo=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)return e;if(e instanceof RegExp){var t=this.createObjectProto(this.REGEXP_PROTO);return this.populateRegExp(t,e),t}if(e instanceof Date){var n=this.createObjectProto(this.DATE_PROTO);return n.data=e,n}if(e instanceof Function){var a=this;return this.createNativeFunction(function(){return a.nativeToPseudo(e.apply(a,Array.prototype.slice.call(arguments).map(function(e){return a.pseudoToNative(e)})))},void 0)}var i;if(Array.isArray(e)){i=this.createObjectProto(this.ARRAY_PROTO);for(var r=0;r<e.length;r++)r in e&&this.setProperty(i,r,this.nativeToPseudo(e[r]))}else for(var o in i=this.createObjectProto(this.OBJECT_PROTO),e)this.setProperty(i,o,this.nativeToPseudo(e[o]));return i},i.prototype.pseudoToNative=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)return e;if(this.isa(e,this.REGEXP))return e.data;if(this.isa(e,this.DATE))return e.data;var n,a=t||{pseudo:[],native:[]};if(-1!==(r=a.pseudo.indexOf(e)))return a.native[r];if(a.pseudo.push(e),this.isa(e,this.ARRAY)){n=[],a.native.push(n);for(var i=this.getProperty(e,"length"),r=0;r<i;r++)this.hasProperty(e,r)&&(n[r]=this.pseudoToNative(this.getProperty(e,r),a))}else{var o;for(var s in n={},a.native.push(n),e.properties)o=e.properties[s],n[s]=this.pseudoToNative(o,a)}return a.pseudo.pop(),a.native.pop(),n},i.prototype.arrayNativeToPseudo=function(e){for(var t=this.createObjectProto(this.ARRAY_PROTO),n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++)this.setProperty(t,n[a],e[n[a]]);return t},i.prototype.arrayPseudoToNative=function(e){var t=[];for(var n in e.properties)t[n]=this.getProperty(e,n);return t.length=i.legalArrayLength(this.getProperty(e,"length"))||0,t},i.prototype.getPrototype=function(e){switch(typeof e){case"number":return this.NUMBER.properties.prototype;case"boolean":return this.BOOLEAN.properties.prototype;case"string":return this.STRING.properties.prototype}return e?e.proto:null},i.prototype.getProperty=function(e,t,n){if(t=String(t),void 0===e||null===e){let a;null!=n&&null!=n.loc&&null!=n.loc.start&&(a=n.loc.start.line),this.throwException(this.TYPE_ERROR,"Cannot read property '"+t+"' of "+e,a)}if("length"===t){if(this.isa(e,this.STRING))return String(e).length}else if(t.charCodeAt(0)<64&&this.isa(e,this.STRING)){var a=i.legalArrayIndex(t);if(!isNaN(a)&&a<String(e).length)return String(e)[a]}do{if(e.properties&&t in e.properties){var r=e.getter[t];return r?(r.isGetter=!0,r):e.properties[t]}}while(e=this.getPrototype(e))},i.prototype.hasProperty=function(e,t){if(!e.isObject)throw TypeError("Primitive data type has no properties");if("length"===(t=String(t))&&this.isa(e,this.STRING))return!0;if(this.isa(e,this.STRING)){var n=i.legalArrayIndex(t);if(!isNaN(n)&&n<String(e).length)return!0}do{if(e.properties&&t in e.properties)return!0}while(e=this.getPrototype(e));return!1},i.prototype.setProperty=function(e,t,n,a){t=String(t),void 0!==e&&null!==e||this.throwException(this.TYPE_ERROR,"Cannot set property '"+t+"' of "+e),a&&("get"in a||"set"in a)&&("value"in a||"writable"in a)&&this.throwException(this.TYPE_ERROR,"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");var r=!this.stateStack||this.getScope().strict;if(e.isObject){if(this.isa(e,this.STRING)){var o=i.legalArrayIndex(t);if("length"===t||!isNaN(o)&&o<String(e).length)return void(r&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+t+"' of String '"+e.data+"'"))}if("Array"===e.class){var s,l=e.properties.length;if("length"===t){if(a){if(!("value"in a))return;n=a.value}if(n=i.legalArrayLength(n),isNaN(n)&&this.throwException(this.RANGE_ERROR,"Invalid array length"),n<l)for(s in e.properties)s=i.legalArrayIndex(s),!isNaN(s)&&n<=s&&delete e.properties[s]}else isNaN(s=i.legalArrayIndex(t))||(e.properties.length=Math.max(l,s+1))}if(!e.preventExtensions||t in e.properties)if(a){"get"in a&&(a.get?e.getter[t]=a.get:delete e.getter[t]),"set"in a&&(a.set?e.setter[t]=a.set:delete e.setter[t]);var c={};"configurable"in a&&(c.configurable=a.configurable),"enumerable"in a&&(c.enumerable=a.enumerable),"writable"in a&&(c.writable=a.writable,delete e.getter[t],delete e.setter[t]),"value"in a?(c.value=a.value,delete e.getter[t],delete e.setter[t]):n!==i.VALUE_IN_DESCRIPTOR&&(c.value=n,delete e.getter[t],delete e.setter[t]);try{Object.defineProperty(e.properties,t,c)}catch(e){this.throwException(this.TYPE_ERROR,"Cannot redefine property: "+t)}}else{if(n===i.VALUE_IN_DESCRIPTOR)throw ReferenceError("Value not specified.");for(var u=e;!(t in u.properties);)if(!(u=this.getPrototype(u))){u=e;break}if(u.setter&&u.setter[t])return u.setter[t];if(u.getter&&u.getter[t])r&&this.throwException(this.TYPE_ERROR,"Cannot set property '"+t+"' of object '"+e+"' which only has a getter");else try{e.properties[t]=n}catch(n){r&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+t+"' of object '"+e+"'")}}else r&&this.throwException(this.TYPE_ERROR,"Can't add property '"+t+"', object is not extensible")}else r&&this.throwException(this.TYPE_ERROR,"Can't create property '"+t+"' on '"+e+"'")},i.prototype.setNativeFunctionPrototype=function(e,t,n){this.setProperty(e.properties.prototype,t,this.createNativeFunction(n,!1),i.NONENUMERABLE_DESCRIPTOR)},i.prototype.getScope=function(){var e=this.stateStack[this.stateStack.length-1].scope;if(!e)throw Error("No scope found.");return e},i.prototype.createScope=function(e,t){var n=this.createObjectProto(null);if(n.parentScope=t,t||this.initGlobalScope(n),this.populateScope_(e,n),n.strict=!1,t&&t.strict)n.strict=!0;else{var a=e.body&&e.body[0];a&&a.expression&&"Literal"===a.expression.type&&"use strict"===a.expression.value&&(n.strict=!0)}return n},i.prototype.createSpecialScope=function(e,t){if(!e)throw Error("parentScope required");var n=t||this.createObjectProto(null);return n.parentScope=e,n.strict=e.strict,n},i.prototype.getValueFromScope=function(e,t){for(var n=this.getScope();n&&n!==this.global;){if(e in n.properties)return n.properties[e];n=n.parentScope}if(n===this.global&&this.hasProperty(n,e))return this.getProperty(n,e);var a,i=this.stateStack[this.stateStack.length-1].node;"UnaryExpression"===i.type&&"typeof"===i.operator||(null!=t&&null!=t.loc&&null!=t.loc.start&&(a=t.loc.start.line),this.throwException(this.REFERENCE_ERROR,e+" is not defined",a))},i.prototype.setValueToScope=function(e,t){for(var n=this.getScope(),a=n.strict;n&&n!==this.global;){if(e in n.properties)return void(n.properties[e]=t);n=n.parentScope}if(n===this.global&&(!a||this.hasProperty(n,e)))return this.setProperty(n,e,t);this.throwException(this.REFERENCE_ERROR,e+" is not defined")},i.prototype.populateScope_=function(e,t){if("VariableDeclaration"===e.type)for(var n=0;n<e.declarations.length;n++)this.setProperty(t,e.declarations[n].id.name,void 0,i.VARIABLE_DESCRIPTOR);else{if("FunctionDeclaration"===e.type)return void this.setProperty(t,e.id.name,this.createFunction(e,t),i.VARIABLE_DESCRIPTOR);if("FunctionExpression"===e.type)return;if("ExpressionStatement"===e.type)return}var a=e.constructor;for(var r in e){var o=e[r];if(o&&"object"==typeof o)if(Array.isArray(o))for(n=0;n<o.length;n++)o[n]&&o[n].constructor===a&&this.populateScope_(o[n],t);else o.constructor===a&&this.populateScope_(o,t)}},i.prototype.stripLocations_=function(e,t,n){for(var a in t?e.start=t:delete e.start,n?e.end=n:delete e.end,e)if(e.hasOwnProperty(a)){var i=e[a];i&&"object"==typeof i&&this.stripLocations_(i,t,n)}},i.prototype.calledWithNew=function(){return this.stateStack[this.stateStack.length-1].isConstructor},i.prototype.getValue=function(e,t){return e[0]===i.SCOPE_REFERENCE?this.getValueFromScope(e[1],t):this.getProperty(e[0],e[1],t)},i.prototype.setValue=function(e,t){return e[0]===i.SCOPE_REFERENCE?this.setValueToScope(e[1],t):this.setProperty(e[0],e[1],t)},i.Completion={NORMAL:0,BREAK:1,CONTINUE:2,RETURN:3,THROW:4},i.prototype.throwException=function(e,t,n){if(void 0===t)var a=e;else{a=this.createObject(e);this.setProperty(a,"message",t,i.NONENUMERABLE_DESCRIPTOR)}var r;throw null!=n&&(r=this.getErrorLineNumberMessage(n)),this.unwind(i.Completion.THROW,a,void 0,r),i.STEP_ERROR},i.prototype.unwind=function(e,t,n,a=""){if(e===i.Completion.NORMAL)throw TypeError("Should not unwind for NORMAL completions");for(var r=this.stateStack;r.length>0;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<a.length;){if(a[r])return t.n_=r,new i.State(a[r],t.scope);r++}e.pop(),e[e.length-1].value=t.array_},i.prototype.stepAssignmentExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var a=new i.State(n.left,t.scope);return a.components=!0,a}if(!t.doneRight_){if(t.leftReference_||(t.leftReference_=t.value),t.doneGetter_&&(t.leftValue_=t.value),!t.doneGetter_&&"="!==n.operator){var r=this.getValue(t.leftReference_,n);if(t.leftValue_=r,r&&"object"==typeof r&&r.isGetter){r.isGetter=!1,t.doneGetter_=!0;var o=r;return this.createGetter_(o,t.leftReference_)}}return t.doneRight_=!0,new i.State(n.right,t.scope)}if(t.doneSetter_)return e.pop(),void(e[e.length-1].value=t.setterValue_);var s=t.leftValue_,l=t.value;switch(n.operator){case"=":s=l;break;case"+=":s+=l;break;case"-=":s-=l;break;case"*=":s*=l;break;case"/=":s/=l;break;case"%=":s%=l;break;case"<<=":s<<=l;break;case">>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}var c=this.setValue(t.leftReference_,s);if(c)return t.doneSetter_=!0,t.setterValue_=s,this.createSetter_(c,t.leftReference_,s);e.pop(),e[e.length-1].value=s},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<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%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>>>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;u<l.params.length;u++){var p=l.params[u].name,m=t.arguments_.length>u?t.arguments_[u]:void 0;this.setProperty(c,p,m)}var h=this.createObjectProto(this.ARRAY_PROTO);for(u=0;u<t.arguments_.length;u++)this.setProperty(h,u,t.arguments_[u]);this.setProperty(c,"arguments",h);var d=l.id&&l.id.name;return d&&this.setProperty(c,d,o),this.setProperty(c,"this",t.funcThis_,i.READONLY_DESCRIPTOR),t.value=void 0,new i.State(l.body,c)}if(o.eval){var g=t.arguments_[0];if("string"==typeof g){try{var _=a.parse(g.toString(),i.PARSE_OPTIONS)}catch(e){let t=this.getErrorLineNumber(n);this.throwException(this.SYNTAX_ERROR,"Invalid code: "+e.message,t)}var f=new this.nodeConstructor;return f.type="EvalProgram_",f.body=_.body,this.stripLocations_(f,n.start,n.end),(c=t.directEval_?t.scope:this.global).strict?c=this.createScope(_,c):this.populateScope_(_,c),this.value=void 0,new i.State(f,c)}t.value=g}else if(o.nativeFunc)t.value=o.nativeFunc.apply(t.funcThis_,t.arguments_);else{if(o.asyncFunc){var y=this,b=t.arguments_.concat(function(e){t.value=e,y.paused_=!1});return this.paused_=!0,void o.asyncFunc.apply(t.funcThis_,b)}{let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o.class+" is not a function",e)}}}},i.prototype.stepCatchClause=function(e,t,n){if(!t.done_){t.done_=!0;var a=this.createSpecialScope(t.scope);return this.setProperty(a,n.param.name,t.throwValue),new i.State(n.body,a)}e.pop()},i.prototype.stepConditionalExpression=function(e,t,n){var a=t.mode_||0;if(0===a)return t.mode_=1,new i.State(n.test,t.scope);if(1===a){t.mode_=2;var r=Boolean(t.value);if(r&&n.consequent)return new i.State(n.consequent,t.scope);if(!r&&n.alternate)return new i.State(n.alternate,t.scope);this.value=void 0}e.pop(),"ConditionalExpression"===n.type&&(e[e.length-1].value=t.value)},i.prototype.stepContinueStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(i.Completion.CONTINUE,void 0,a)},i.prototype.stepDebuggerStatement=function(e,t,n){e.pop()},i.prototype.stepDoWhileStatement=function(e,t,n){if("DoWhileStatement"===n.type&&void 0===t.test_&&(t.value=!0,t.test_=!0),!t.test_)return t.test_=!0,new i.State(n.test,t.scope);if(t.value){if(n.body)return t.test_=!1,t.isLoop=!0,new i.State(n.body,t.scope)}else e.pop()},i.prototype.stepEmptyStatement=function(e,t,n){e.pop()},i.prototype.stepEvalProgram_=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(),e[e.length-1].value=this.value},i.prototype.stepExpressionStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new i.State(n.expression,t.scope);e.pop(),this.value=t.value},i.prototype.stepForInStatement=function(e,t,n){if(!t.doneInit_&&(t.doneInit_=!0,n.left.declarations&&n.left.declarations[0].init)){if(t.scope.strict){let e=this.getErrorLineNumber(n);this.throwException(this.SYNTAX_ERROR,"for-in loop variable declaration may not have an initializer.",e)}return new i.State(n.left,t.scope)}if(!t.doneObject_)return t.doneObject_=!0,t.variable_||(t.variable_=t.value),new i.State(n.right,t.scope);if(t.isLoop||(t.isLoop=!0,t.object_=t.value,t.visited_=Object.create(null)),void 0===t.name_)e:for(;;){if(t.object_&&t.object_.isObject)for(t.props_||(t.props_=Object.getOwnPropertyNames(t.object_.properties));;){if(void 0===(a=t.props_.shift()))break;if(Object.prototype.hasOwnProperty.call(t.object_.properties,a)&&(!t.visited_[a]&&(t.visited_[a]=!0,Object.prototype.propertyIsEnumerable.call(t.object_.properties,a)))){t.name_=a;break e}}else if(null!==t.object_&&void 0!==t.object_)for(t.props_||(t.props_=Object.getOwnPropertyNames(t.object_));;){var a;if(void 0===(a=t.props_.shift()))break;if(t.visited_[a]=!0,Object.prototype.propertyIsEnumerable.call(t.object_,a)){t.name_=a;break e}}if(t.object_=this.getPrototype(t.object_),t.props_=null,null===t.object_)return void e.pop()}if(!t.doneVariable_){t.doneVariable_=!0;var r=n.left;if("VariableDeclaration"!==r.type){t.variable_=null;var o=new i.State(r,t.scope);return o.components=!0,o}t.variable_=[i.SCOPE_REFERENCE,r.declarations[0].id.name]}if(t.variable_||(t.variable_=t.value),!t.doneSetter_){t.doneSetter_=!0;var s=t.name_,l=this.setValue(t.variable_,s);if(l)return this.createSetter_(l,t.variable_,s)}return t.name_=void 0,t.doneVariable_=!1,t.doneSetter_=!1,n.body?new i.State(n.body,t.scope):void 0},i.prototype.stepForStatement=function(e,t,n){var a=t.mode_||0;if(0===a){if(t.mode_=1,n.init)return new i.State(n.init,t.scope)}else if(1===a){if(t.mode_=2,n.test)return new i.State(n.test,t.scope)}else if(2===a){if(t.mode_=3,!n.test||t.value)return t.isLoop=!0,new i.State(n.body,t.scope);e.pop()}else if(3===a&&(t.mode_=1,n.update))return new i.State(n.update,t.scope)},i.prototype.stepFunctionDeclaration=function(e,t,n){e.pop()},i.prototype.stepFunctionExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.createFunction(n,t.scope)},i.prototype.stepIdentifier=function(e,t,n){if(e.pop(),t.components)e[e.length-1].value=[i.SCOPE_REFERENCE,n.name];else{var a=this.getValueFromScope(n.name,n);if(a&&"object"==typeof a&&a.isGetter){a.isGetter=!1;for(var r=t.scope;!this.hasProperty(r,n.name);)r=r.parentScope;var o=a;return this.createGetter_(o,this.global)}e[e.length-1].value=a}},i.prototype.stepIfStatement=i.prototype.stepConditionalExpression,i.prototype.stepLabeledStatement=function(e,t,n){e.pop();var a=t.labels||[];a.push(n.label.name);var r=new i.State(n.body,t.scope);return r.labels=a,r},i.prototype.stepLiteral=function(e,t,n){e.pop();var a=n.value;if(a instanceof RegExp){var i=this.createObjectProto(this.REGEXP_PROTO);this.populateRegExp(i,a),a=i}e[e.length-1].value=a},i.prototype.stepLogicalExpression=function(e,t,n){if("&&"!==n.operator&&"||"!==n.operator)throw SyntaxError("Unknown logical operator: "+n.operator);if(!t.doneLeft_)return t.doneLeft_=!0,new i.State(n.left,t.scope);if(t.doneRight_)e.pop(),e[e.length-1].value=t.value;else{if(!("&&"===n.operator&&!t.value||"||"===n.operator&&t.value))return t.doneRight_=!0,new i.State(n.right,t.scope);e.pop(),e[e.length-1].value=t.value}},i.prototype.stepMemberExpression=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new i.State(n.object,t.scope);var a;if(n.computed){if(!t.doneProperty_)return t.object_=t.value,t.doneProperty_=!0,new i.State(n.property,t.scope);a=t.value}else t.object_=t.value,a=n.property.name;if(e.pop(),t.components)e[e.length-1].value=[t.object_,a];else{var r=this.getProperty(t.object_,a);if(r&&"object"==typeof r&&r.isGetter){r.isGetter=!1;var o=r;return this.createGetter_(o,t.object_)}e[e.length-1].value=r}},i.prototype.stepNewExpression=i.prototype.stepCallExpression,i.prototype.stepObjectExpression=function(e,t,n){var a=t.n_||0,r=n.properties[a];if(t.object_){if("Identifier"===(s=r.key).type)var o=s.name;else{if("Literal"!==s.type)throw SyntaxError("Unknown object structure: "+s.type);o=s.value}t.properties_[o]||(t.properties_[o]={}),t.properties_[o][r.kind]=t.value,t.n_=++a,r=n.properties[a]}else t.object_=this.createObjectProto(this.OBJECT_PROTO),t.properties_=Object.create(null);if(r)return new i.State(r.value,t.scope);for(var s in t.properties_){var l=t.properties_[s];if("get"in l||"set"in l){var c={configurable:!0,enumerable:!0,get:l.get,set:l.set};this.setProperty(t.object_,s,null,c)}else this.setProperty(t.object_,s,l.init)}e.pop(),e[e.length-1].value=t.object_},i.prototype.stepProgram=function(e,t,n){var a=n.body.shift();if(a)return t.done=!1,new i.State(a,t.scope);t.done=!0},i.prototype.stepReturnStatement=function(e,t,n){if(n.argument&&!t.done_)return t.done_=!0,new i.State(n.argument,t.scope);this.unwind(i.Completion.RETURN,t.value,void 0)},i.prototype.stepSequenceExpression=function(e,t,n){var a=t.n_||0,r=n.expressions[a];if(r)return t.n_=a+1,new i.State(r,t.scope);e.pop(),e[e.length-1].value=t.value},i.prototype.stepSwitchStatement=function(e,t,n){if(!t.test_)return t.test_=1,new i.State(n.discriminant,t.scope);for(1===t.test_&&(t.test_=2,t.switchValue_=t.value,t.defaultCase_=-1);;){var a=t.index_||0,r=n.cases[a];if(t.matched_||!r||r.test)if(r||t.matched_||-1===t.defaultCase_){if(!r)return void e.pop();if(!t.matched_&&!t.tested_&&r.test)return t.tested_=!0,new i.State(r.test,t.scope);if(t.matched_||t.value===t.switchValue_){t.matched_=!0;var o=t.n_||0;if(r.consequent[o])return t.isSwitch=!0,t.n_=o+1,new i.State(r.consequent[o],t.scope)}t.tested_=!1,t.n_=0,t.index_=a+1}else t.matched_=!0,t.index_=t.defaultCase_;else t.defaultCase_=a,t.index_=a+1}},i.prototype.stepThisExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.getValueFromScope("this",n)},i.prototype.stepThrowStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new i.State(n.argument,t.scope);this.throwException(t.value)},i.prototype.stepTryStatement=function(e,t,n){if(!t.doneBlock_)return t.doneBlock_=!0,new i.State(n.block,t.scope);if(t.cv&&t.cv.type===i.Completion.THROW&&!t.doneHandler_&&n.handler){t.doneHandler_=!0;var a=new i.State(n.handler,t.scope);return a.throwValue=t.cv.value,t.cv=void 0,a}if(!t.doneFinalizer_&&n.finalizer)return t.doneFinalizer_=!0,new i.State(n.finalizer,t.scope);e.pop(),t.cv&&this.unwind(t.cv.type,t.cv.value,t.cv.label)},i.prototype.stepUnaryExpression=function(e,t,n){if(!t.done_){t.done_=!0;var a=new i.State(n.argument,t.scope);return a.components="delete"===n.operator,a}e.pop();var r=t.value;if("-"===n.operator)r=-r;else if("+"===n.operator)r=+r;else if("!"===n.operator)r=!r;else if("~"===n.operator)r=~r;else if("delete"===n.operator){var o=!0;if(Array.isArray(r)){var s=r[0];s===i.SCOPE_REFERENCE&&(s=t.scope);var l=String(r[1]);try{delete s.properties[l]}catch(e){t.scope.strict?this.throwException(this.TYPE_ERROR,"Cannot delete property '"+l+"' of '"+s+"'"):o=!1}}r=o}else if("typeof"===n.operator)r=r&&"Function"===r.class?"function":typeof r;else{if("void"!==n.operator)throw SyntaxError("Unknown unary operator: "+n.operator);r=void 0}e[e.length-1].value=r},i.prototype.stepUpdateExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var a=new i.State(n.argument,t.scope);return a.components=!0,a}if(t.leftSide_||(t.leftSide_=t.value),t.doneGetter_&&(t.leftValue_=t.value),!t.doneGetter_){var r=this.getValue(t.leftSide_,n);if(t.leftValue_=r,r&&"object"==typeof r&&r.isGetter){r.isGetter=!1,t.doneGetter_=!0;var o=r;return this.createGetter_(o,t.leftSide_)}}if(t.doneSetter_)return e.pop(),void(e[e.length-1].value=t.setterValue_);var s;r=Number(t.leftValue_);if("++"===n.operator)s=r+1;else{if("--"!==n.operator)throw SyntaxError("Unknown update expression: "+n.operator);s=r-1}var l=n.prefix?s:r,c=this.setValue(t.leftSide_,s);if(c)return t.doneSetter_=!0,t.setterValue_=l,this.createSetter_(c,t.leftSide_,s);e.pop(),e[e.length-1].value=l},i.prototype.stepVariableDeclaration=function(e,t,n){var a=n.declarations,r=t.n_||0,o=a[r];for(t.init_&&o&&(this.setValueToScope(o.id.name,t.value),t.init_=!1,o=a[++r]);o;){if(o.init)return t.n_=r,t.init_=!0,new i.State(o.init,t.scope);o=a[++r]}e.pop()},i.prototype.stepWithStatement=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new i.State(n.object,t.scope);if(!t.doneBody_){t.doneBody_=!0;var a=this.createSpecialScope(t.scope,t.value);return new i.State(n.body,a)}e.pop()},i.prototype.stepWhileStatement=i.prototype.stepDoWhileStatement,i.prototype.step=i.prototype.step,i.prototype.run=i.prototype.run,i.prototype.appendCode=i.prototype.appendCode,i.prototype.createObject=i.prototype.createObject,i.prototype.createObjectProto=i.prototype.createObjectProto,i.prototype.createAsyncFunction=i.prototype.createAsyncFunction,i.prototype.createNativeFunction=i.prototype.createNativeFunction,i.prototype.getProperty=i.prototype.getProperty,i.prototype.setProperty=i.prototype.setProperty,i.prototype.nativeToPseudo=i.prototype.nativeToPseudo,i.prototype.pseudoToNative=i.prototype.pseudoToNative,i.prototype.createPrimitive=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.is2DArray=function(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gangMemberUpgradesMetadata=[{cost:1e6,mults:{str:1.04,def:1.04},name:"Baseball Bat",upgType:"w"},{cost:12e6,mults:{str:1.08,def:1.08,dex:1.08},name:"Katana",upgType:"w"},{cost:25e6,mults:{str:1.1,def:1.1,dex:1.1,agi:1.1},name:"Glock 18C",upgType:"w"},{cost:5e7,mults:{str:1.12,def:1.1,agi:1.1},name:"P90C",upgType:"w"},{cost:6e7,mults:{str:1.2,def:1.15},name:"Steyr AUG",upgType:"w"},{cost:1e8,mults:{str:1.25,def:1.2},name:"AK-47",upgType:"w"},{cost:15e7,mults:{str:1.3,def:1.25},name:"M15A10 Assault Rifle",upgType:"w"},{cost:225e6,mults:{str:1.3,dex:1.25,agi:1.3},name:"AWM Sniper Rifle",upgType:"w"},{cost:2e6,mults:{def:1.04},name:"Bulletproof Vest",upgType:"a"},{cost:5e6,mults:{def:1.08},name:"Full Body Armor",upgType:"a"},{cost:25e6,mults:{def:1.15,agi:1.15},name:"Liquid Body Armor",upgType:"a"},{cost:4e7,mults:{def:1.2},name:"Graphene Plating Armor",upgType:"a"},{cost:3e6,mults:{agi:1.04,cha:1.04},name:"Ford Flex V20",upgType:"v"},{cost:9e6,mults:{agi:1.08,cha:1.08},name:"ATX1070 Superbike",upgType:"v"},{cost:18e6,mults:{agi:1.12,cha:1.12},name:"Mercedes-Benz S9001",upgType:"v"},{cost:3e7,mults:{agi:1.16,cha:1.16},name:"White Ferrari",upgType:"v"},{cost:5e6,mults:{hack:1.05},name:"NUKE Rootkit",upgType:"r"},{cost:25e6,mults:{hack:1.1},name:"Soulstealer Rootkit",upgType:"r"},{cost:75e6,mults:{hack:1.15},name:"Demon Rootkit",upgType:"r"},{cost:4e7,mults:{hack:1.12},name:"Hmap Node",upgType:"r"},{cost:75e6,mults:{hack:1.15},name:"Jack the Ripper",upgType:"r"},{cost:1e10,mults:{str:1.3,dex:1.3},name:"Bionic Arms",upgType:"g"},{cost:1e10,mults:{agi:1.6},name:"Bionic Legs",upgType:"g"},{cost:15e9,mults:{str:1.15,def:1.15,dex:1.15,agi:1.15},name:"Bionic Spine",upgType:"g"},{cost:2e10,mults:{str:1.4,def:1.4},name:"BrachiBlades",upgType:"g"},{cost:12e9,mults:{str:1.2,def:1.2},name:"Nanofiber Weave",upgType:"g"},{cost:25e9,mults:{str:1.5,agi:1.5},name:"Synthetic Heart",upgType:"g"},{cost:15e9,mults:{str:1.3,def:1.3},name:"Synfibril Muscle",upgType:"g"},{cost:5e9,mults:{hack:1.05},name:"BitWire",upgType:"g"},{cost:1e10,mults:{hack:1.15},name:"Neuralstimulator",upgType:"g"},{cost:75e8,mults:{hack:1.1},name:"DataJack",upgType:"g"},{cost:5e10,mults:{str:1.7,def:1.7},name:"Graphene Bone Lacings",upgType:"g"}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gangMemberTasksMetadata=[{desc:"This gang member is currently idle",isCombat:!0,isHacking:!0,name:"Unassigned",params:{hackWeight:100}},{desc:"Assign this gang member to create and distribute ransomware<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:1,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks<br><br>Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"DDoS Attacks",params:{baseRespect:4e-4,baseWanted:.2,hackWeight:100,difficulty:8}},{desc:"Assign this gang member to create and distribute malicious viruses<br><br>Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Plant Virus",params:{baseRespect:6e-4,baseWanted:.4,hackWeight:100,difficulty:12}},{desc:"Assign this gang member to commit financial fraud and digital counterfeiting<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:120,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism<br><br>Greatly increases respect - Greatly increases wanted level",isCombat:!1,isHacking:!0,name:"Cyberterrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:80,chaWeight:20,difficulty:36}},{desc:"Assign this gang member to be an ethical hacker for corporations<br><br>Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets<br><br>Earns money - Slightly increases respect - Very slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Mug People",params:{baseRespect:5e-5,baseWanted:5e-5,baseMoney:1.2,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs<br><br>Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory",isCombat:!0,isHacking:!1,name:"Deal Drugs",params:{baseRespect:6e-5,baseWanted:.002,baseMoney:5,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory<br><br>Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:2.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:15,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:38,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:58,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:24,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:120,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism<br><br>Greatly increases respect - Greatly increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Terrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:36,territory:{money:1,respect:2,wanted:2}}},{desc:"Assign this gang member to be a vigilante and protect the city from criminals<br><br>Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:5}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:8}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{desc:"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(53),i=n(11),r=n(0),o=n(22),s=n(12);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){!function(e){document.getElementById("faction-invitation-box-text").innerHTML=e}("You have received a faction invitation from "+e.name),e.alreadyInvited=!0,r.a.factionInvitations.push(e.name),s.routing.isOn(s.Page.Factions)&&i.Engine.loadFactionsContent(),Object(o.clearEventListeners)("faction-invitation-box-yes").addEventListener("click",function(){var t=r.a.factionInvitations.findIndex(t=>t===e.name);return-1===t?console.error("Could not find faction in Player.factionInvitations"):r.a.factionInvitations.splice(t,1),Object(a.c)(e),l(),s.routing.isOn(s.Page.Factions)&&i.Engine.loadFactionsContent(),!1}),Object(o.clearEventListeners)("faction-invitation-box-no").addEventListener("click",function(){return l(),!1}),document.getElementById("faction-invitation-box-container").style.display="flex"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(106),i=n(3),r=n(9),o=n(25);t.MaxSleevesFromCovenant=5,t.createPurchaseSleevesFromCovenantPopup=function(e){if(e.sleevesFromCovenant>=t.MaxSleevesFromCovenant)return;const n=1e13*(e.sleevesFromCovenant+1),s=o.yesNoBoxGetYesButton(),l=o.yesNoBoxGetNoButton();s.addEventListener("click",()=>{e.canAfford(n)?(e.loseMoney(n),e.sleevesFromCovenant+=1,e.sleeves.push(new a.Sleeve(e)),o.yesNoBoxClose()):r.dialogBoxCreate("You cannot afford to purchase a Duplicate Sleeve",!1)}),l.addEventListener("click",()=>{o.yesNoBoxClose()});const c="Would you like to purchase an additional Duplicate Sleeve from The Covenant for "+`${i.numeralWrapper.formatMoney(n)}?<br><br>`+"These Duplicate Sleeves are permanent. You can purchase a total of 5 Duplicate Sleeves from The Covenant";o.yesNoBoxCreate(c)}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(9),i=n(22),r=n(7),o=n(20),s=n(1),l=(n(69),n(14)),c=n(0),u="";function p(){document.getElementById("infiltration-box-container").style.display="none"}function m(e){var t=2*e.clearanceLevel/e.maxClearanceLevel;c.a.gainHackingExp(e.hackingExpGained*t),c.a.gainStrengthExp(e.strExpGained*t),c.a.gainDefenseExp(e.defExpGained*t),c.a.gainDexterityExp(e.dexExpGained*t),c.a.gainAgilityExp(e.agiExpGained*t),c.a.gainCharismaExp(e.chaExpGained*t),c.a.gainIntelligenceExp(e.intExpGained*t);const n=["You gained:",`${Object(r.formatNumber)(e.hackingExpGained*t,3)} hacking exp`,`${Object(r.formatNumber)(e.strExpGained*t,3)} str exp`,`${Object(r.formatNumber)(e.defExpGained*t,3)} def exp`,`${Object(r.formatNumber)(e.dexExpGained*t,3)} dex exp`,`${Object(r.formatNumber)(e.agiExpGained*t,3)} agi exp`,`${Object(r.formatNumber)(e.chaExpGained*t,3)} cha exp`].join("\n");for(var m=0,h=0;h<e.secretsStolen.length;++h)m+=e.secretsStolen[h];if(0!=m){var d=m*c.a.faction_rep_mult*s.CONSTANTS.InfiltrationRepValue*o.BitNodeMultipliers.InfiltrationRep,g=m*s.CONSTANTS.InfiltrationMoneyValue*o.BitNodeMultipliers.InfiltrationMoney;!function(e){document.getElementById("infiltration-box-text").innerHTML=e}("You can sell the classified documents and secrets you stole from "+e.companyName+" for <span class='money-gold'>$"+Object(r.formatNumber)(g,2)+"</span> on the black market or you can give it to a faction to gain <span class='light-yellow'>"+Object(r.formatNumber)(d,3)+" reputation</span> with that faction.");var _=document.getElementById("infiltration-faction-select");_.innerHTML="";for(let e=0;e<c.a.factions.length;++e)"Bladeburners"!==c.a.factions[e]&&(c.a.inGang()&&c.a.gang.facName===c.a.factions[e]||(_.innerHTML+="<option value='"+c.a.factions[e]+"'>"+c.a.factions[e]+"</option>"));if(""!==u)for(let e=0;e<_.options.length;++e)if(_.options[e].value===u){_.selectedIndex=e;break}var f=Object(i.clearEventListeners)("infiltration-box-sell");setTimeout(function(){f.addEventListener("click",function(t){return!!t.isTrusted&&(c.a.gainMoney(g),c.a.recordMoneySource(g,"infiltration"),Object(a.dialogBoxCreate)("You sold the classified information you stole from "+e.companyName+" for <span class='money-gold'>$"+Object(r.formatNumber)(g,2)+"</span> on the black market!<br><br>"+n),p(),!1)})},750);var y=Object(i.clearEventListeners)("infiltration-box-faction");setTimeout(function(){y.addEventListener("click",function(t){if(!t.isTrusted)return!1;var i=_.options[_.selectedIndex].value;u=i;var o=l.Factions[i];return null==o?(Object(a.dialogBoxCreate)("Error finding faction. This is a bug please report to developer"),!1):(o.playerReputation+=d,Object(a.dialogBoxCreate)("You gave the classified information you stole from "+e.companyName+" to "+i+" and gained <span class='light-yellow'>"+Object(r.formatNumber)(d,3)+" reputation</span> with the faction. <br><br>"+n),p(),!1)})},750),document.getElementById("infiltration-box-container").style.display="flex"}else Object(a.dialogBoxCreate)("You successfully escaped the facility but you did not steal anything of worth when infiltrating.<br><br>"+n)}},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var a=n(20),i=n(1),r=n(11),o=n(0),s=n(9),l=n(22),c=n(15),u=n(180),p=n(7);let m={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 h(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 d(e,t,n,a,i){var r=new h(e,t,n,a,i);document.getElementById("infiltration-status-text").innerHTML="",_(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 _(e){++e.clearanceLevel,b(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"),h=Object(l.clearEventListeners)("infiltration-sneak"),d=Object(l.clearEventListeners)("infiltration-pickdoor"),_=Object(l.clearEventListeners)("infiltration-bribe"),E=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",h.style.display="none",d.style.display="none",_.style.display="none",E.style.display="none";var C=null;switch(Object(c.getRandomInt)(0,5)){case 1:C=m.TechOnly,s.style.display="block",u.style.display="block",h.style.display="block",E.style.display="block";break;case 2:C=m.TechOrLockedDoor,s.style.display="block",u.style.display="block",h.style.display="block",d.style.display="block",E.style.display="block";break;case 3:C=m.Bots,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=k(e);if(n[0])return y("You <span class='success'>SUCCESSFULLY</span> killed the security bots! Unfortunately you alerted the rest of the facility's security. The facility's security level increased by "+Object(p.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));y("You <span class='failure'>FAILED</span> 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(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),v(e,C),b(e)}),r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return y("You <span class='success'>SUCCESSFULLY</span> assassinated the security bots without being detected!"),o.a.karma-=1,f(e),!1;y("You <span class='failure'>FAILED</span> 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(p.formatNumber)(100*n[1]-100,2).toString()+"%"),v(e,C),b(e)}),s.style.display="block",h.style.display="block",E.style.display="block";break;default:C=m.Guards,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=k(e);if(n[0])return y("You <span class='success'>SUCCESSFULLY</span> killed the security guard! Unfortunately you alerted the rest of the facility's security. The facility's security level has increased by "+Object(p.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));y("You <span class='failure'>FAILED</span> 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(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),v(e,C),b(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 y("You <span class='success'>SUCCESSFULLY</span> assassinated the security guard without being detected!"),o.a.karma-=3,++o.a.numPeopleKilled,f(e),!1;y("You <span class='failure'>FAILED</span> 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(p.formatNumber)(100*n[1]-100,2).toString()+"%"),v(e,C),b(e)}),h.style.display="block",_.style.display="block",E.style.display="block"}n.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=T(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 y("You <span class='success'>SUCCESSFULLY</span> knocked out the security guard! Unfortunately you made a lot of noise and alerted other security."),y("The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));return y("You <span class='failure'>FAILED</span> 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(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),v(e,C),b(e),!1}),a.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=O(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 y("You <span class='success'>SUCCESSFULLY</span> 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 y("You <span class='failure'>FAILED</span> 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(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),v(e,C),b(e),!1}),s.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=A(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]?(y("You <span class='success'>SUCCESSFULLY</span> hacked and disabled the security system!"),y("The facility's security level increased by "+(100*n[1]-100).toString()+"%"),f(e),!1):(y("You <span class='failure'>FAILED</span> to hack the security system. The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),v(e,C),b(e),!1)}),u.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=P(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]?(y("You <span class='success'>SUCCESSFULLY</span> and violently destroy the security system!"),y("The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(y("You <span class='failure'>FAILED</span> to destroy the security system. The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),v(e,C),b(e),!1)}),h.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=w(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]?(y("You <span class='success'>SUCCESSFULLY</span> sneak past the security undetected!"),f(e),!1):(y("You <span class='failure'>FAILED</span> and were detected while trying to sneak past security! The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),v(e,C),b(e),!1)}),d.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=x(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]?(y("You <span class='success'>SUCCESSFULLY</span> pick the locked door!"),y("The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(y("You <span class='failure'>FAILED</span> to pick the locked door. The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),v(e,C),b(e),!1)}),_.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=i.CONSTANTS.InfiltrationBribeBaseAmount*e.clearanceLevel;if(o.a.money.lt(n))return y("You do not have enough money to bribe the guard. You need $"+n),!1;var a=function(e){var t=R(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]?(y("You <span class='success'>SUCCESSFULLY</span> bribed a guard to let you through to the next clearance level for $"+n),o.a.loseMoney(n),f(e),!1):(y("You <span class='failure'>FAILED</span> to bribe a guard! The guard is alerting other security guards about your presence! The facility's security level increased by "+Object(p.formatNumber)(100*a[1]-100,2).toString()+"%"),v(e,C),b(e),!1)}),E.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=N(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]?(y("You <span class='success'>SUCCESSFULLY</span> escape from the facility with the stolen classified documents and company secrets!"),g(e,!0),!1):(y("You <span class='failure'>FAILED</span> to escape from the facility. You took 1 damage. The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(1)&&g(e,!1),v(e,C),b(e),!1)}),v(e,C),y(""),y("You are now on clearance level "+e.clearanceLevel+".<br>"+C)}function f(e){if(e.clearanceLevel%5==0){var t=e.baseValue*e.clearanceLevel/2,n=t*o.a.faction_rep_mult*i.CONSTANTS.InfiltrationRepValue*a.BitNodeMultipliers.InfiltrationRep,r=t*i.CONSTANTS.InfiltrationMoneyValue*a.BitNodeMultipliers.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 (<span class='money-gold'>$"+Object(p.formatNumber)(r,2)+"</span>), or they could be given to factions for reputation (<span class='light-yellow'>"+Object(p.formatNumber)(n,3)+" rep</span>)")}e.securityLevel*=1+e.difficulty/100,y("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):_(e)}function y(e){var t=document.getElementById("infiltration-status-text");t.innerHTML+=e+"<br>",t.parentElement.scrollTop=t.scrollHeight}function b(e){for(var t=0,n=0,r=0;r<e.secretsStolen.length;++r)t+=e.secretsStolen[r]*o.a.faction_rep_mult*i.CONSTANTS.InfiltrationRepValue*a.BitNodeMultipliers.InfiltrationRep,n+=e.secretsStolen[r]*i.CONSTANTS.InfiltrationMoneyValue*a.BitNodeMultipliers.InfiltrationMoney;var s=2*e.clearanceLevel/e.maxClearanceLevel;document.getElementById("infiltration-level-text").innerHTML="Facility name: "+e.companyName+"<br>Clearance Level: "+e.clearanceLevel+"<br>Security Level: "+Object(p.formatNumber)(e.securityLevel,3)+"<br><br>Total value of stolen secrets<br>Reputation: <span class='light-yellow'>"+Object(p.formatNumber)(t,3)+"</span><br>Money: <span class='money-gold'>$"+Object(p.formatNumber)(n,2)+"</span><br><br>Hack exp gained: "+Object(p.formatNumber)(e.hackingExpGained*s,3)+"<br>Str exp gained: "+Object(p.formatNumber)(e.strExpGained*s,3)+"<br>Def exp gained: "+Object(p.formatNumber)(e.defExpGained*s,3)+"<br>Dex exp gained: "+Object(p.formatNumber)(e.dexExpGained*s,3)+"<br>Agi exp gained: "+Object(p.formatNumber)(e.agiExpGained*s,3)+"<br>Cha exp gained: "+Object(p.formatNumber)(e.chaExpGained*s,3)}function v(e,t){var n=C(e),a=T(e),i=O(e),r=M(e),o=P(e),s=A(e),l=w(e),c=x(e),u=R(e),h=N(e);switch(document.getElementById("infiltration-escape").innerHTML="Escape<span class='tooltiptext'>Attempt to escape the facility with the classified secrets and documents you have stolen. You have a "+Object(p.formatNumber)(100*h,2)+"% chance of success. If you fail, the security level will increase by 5%.</span>",t){case m.TechOrLockedDoor:document.getElementById("infiltration-pickdoor").innerHTML="Lockpick<span class='tooltiptext'>Attempt to pick the locked door. You have a "+Object(p.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%.</span>";case m.TechOnly:document.getElementById("infiltration-hacksecurity").innerHTML="Hack<span class='tooltiptext'>Attempt to hack and disable the security system. You have a "+Object(p.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%.</span>",document.getElementById("infiltration-destroysecurity").innerHTML="Destroy security<span class='tooltiptext'>Attempt to violently destroy the security system. You have a "+Object(p.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%. </span>",document.getElementById("infiltration-sneak").innerHTML="Sneak<span class='tooltiptext'>Attempt to sneak past the security system. You have a "+Object(p.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. </span>";break;case m.Bots:document.getElementById("infiltration-kill").innerHTML="Destroy bots<span class='tooltiptext'>Attempt to destroy the security bots through combat. You have a "+Object(p.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%. </span>",document.getElementById("infiltration-assassinate").innerHTML="Assassinate bots<span class='tooltiptext'>Attempt to stealthily destroy the security bots through assassination. You have a "+Object(p.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 10%. </span>",document.getElementById("infiltration-hacksecurity").innerHTML="Hack bots<span class='tooltiptext'>Attempt to disable the security bots by hacking them. You have a "+Object(p.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%. </span>",document.getElementById("infiltration-sneak").innerHTML="Sneak<span class='tooltiptext'>Attempt to sneak past the security bots. You have a "+Object(p.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. </span>";break;case m.Guards:default:document.getElementById("infiltration-kill").innerHTML="Kill<span class='tooltiptext'>Attempt to kill the security guard. You have a "+Object(p.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%. </span>",document.getElementById("infiltration-knockout").innerHTML="Knockout<span class='tooltiptext'>Attempt to knockout the security guard. You have a "+Object(p.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%. </span>",document.getElementById("infiltration-stealthknockout").innerHTML="Stealth Knockout<span class='tooltiptext'>Attempt to stealthily knockout the security guard. You have a "+Object(p.formatNumber)(100*i,2)+"% chance of success. If you fail, the security level will increase by 10%. </span>",document.getElementById("infiltration-assassinate").innerHTML="Assassinate<span class='tooltiptext'>Attempt to assassinate the security guard. You have a "+Object(p.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 5%. </span>",document.getElementById("infiltration-sneak").innerHTML="Sneak<span class='tooltiptext'>Attempt to sneak past the security guard. You have a "+Object(p.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. </span>",document.getElementById("infiltration-bribe").innerHTML="Bribe<span class='tooltiptext'>Attempt to bribe the security guard. You have a "+Object(p.formatNumber)(100*u,2)+"% chance of success. If you fail, the security level will increase by 15%. </span>"}}h.prototype.gainHackingExp=function(e){isNaN(e)||(this.hackingExpGained+=e)},h.prototype.gainStrengthExp=function(e){isNaN(e)||(this.strExpGained+=e)},h.prototype.gainDefenseExp=function(e){isNaN(e)||(this.defExpGained+=e)},h.prototype.gainDexterityExp=function(e){isNaN(e)||(this.dexExpGained+=e)},h.prototype.gainAgilityExp=function(e){isNaN(e)||(this.agiExpGained+=e)},h.prototype.gainCharismaExp=function(e){isNaN(e)||(this.chaExpGained+=e)},h.prototype.gainIntelligenceExp=function(e){isNaN(e)||(this.intExpGained+=e)};let E=i.CONSTANTS.IntelligenceInfiltrationWeight;function k(e){var t=C(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 C(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.45*t))}function T(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.7*t))}function O(e){var t=e.securityLevel;return Math.min(.95,(.55*o.a.strength+2*o.a.dexterity+2*o.a.agility+E*o.a.intelligence)/(3*t))}function S(e){var t=M(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 M(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+.5*o.a.agility+E*o.a.intelligence)/(2*t))}function P(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(2*t))}function A(e){var t=e.securityLevel;return Math.min(.95,(o.a.hacking_skill+E*o.a.intelligence)/t)}function w(e){var t=e.securityLevel;return Math.min(.95,(o.a.agility+.5*o.a.dexterity+E*o.a.intelligence)/(2*t))}function x(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+E*o.a.intelligence)/t)}function R(e){var t=e.securityLevel;return Math.min(.95,o.a.charisma/t)}function N(e){var t=e.securityLevel;return Math.min(.95,(2*o.a.agility+o.a.dexterity+E*o.a.intelligence)/t)}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(2),i=n.n(a),r=n(60),o=n(3),s=n(9);class l extends r.a{render(){const e=this.props.upgradeData,t=`${e[2]} - ${o.numeralWrapper.formatMoney(e[1])}`,n=e[3];return i.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:()=>{const t=this.corp();t.funds.lt(e[1])?Object(s.dialogBoxCreate)("Insufficient funds"):(t.unlock(e),t.rerender())}},t,i.a.createElement("span",{className:"tooltiptext"},n))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(2),i=n.n(a),r=n(60),o=n(3),s=n(9);class l extends r.a{render(){const e=this.props.upgradeData,t=this.props.upgradeLevel,n=e[1],a=e[2],r=n*Math.pow(a,t),l=`${e[4]} - ${o.numeralWrapper.formatMoney(r)}`,c=e[5];return i.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:()=>{const t=this.corp();t.funds.lt(r)?Object(s.dialogBoxCreate)("Insufficient funds"):(t.upgrade(e),t.rerender())}},l,i.a.createElement("span",{className:"tooltiptext"},c))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var a=n(2),i=n.n(a),r=n(60),o=n(183),s=n(182),l=n(28),c=n(138),u=n(137),p=n(1),m=n(3);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}class d extends r.a{createButton(e){let t=e.class?e.class:"std-button";const n=e.display?e.display:"block",a=null!=e.tooltip;return a&&(t+=" tooltip"),i.a.createElement("a",{className:t,onClick:e.onClick,style:{display:{displayStyle:n}}},e.text,a&&i.a.createElement("span",{className:"tooltiptext"},e.tooltip))}getOverviewText(){var e=this.corp().revenue.minus(this.corp().expenses).toNumber(),t=e>=0?m.numeralWrapper.formatMoney(e):"-"+m.numeralWrapper.format(-1*e,"$0.000a");let n="";if(this.corp().dividendPercentage>0&&e>0){const t=this.corp().dividendPercentage/100*e,a=e-t,i=t/this.corp().totalShares,r=this.corp().numShares*i;n=`Retained Profits (after dividends): ${m.numeralWrapper.format(a,"$0.000a")} / s<br><br>`+`Dividend Percentage: ${m.numeralWrapper.format(this.corp().dividendPercentage/100,"0%")}<br>`+`Dividends per share: ${m.numeralWrapper.format(i,"$0.000a")} / s<br>`+`Your earnings as a shareholder (Pre-Tax): ${m.numeralWrapper.format(r,"$0.000a")} / s<br>`+`Dividend Tax Rate: ${this.corp().dividendTaxPercentage}%<br>`+`Your earnings as a shareholder (Post-Tax): ${m.numeralWrapper.format(r*(1-this.corp().dividendTaxPercentage/100),"$0.000a")} / s<br>`}let a="Total Funds: "+m.numeralWrapper.format(this.corp().funds.toNumber(),"$0.000a")+"<br>Total Revenue: "+m.numeralWrapper.format(this.corp().revenue.toNumber(),"$0.000a")+" / s<br>Total Expenses: "+m.numeralWrapper.format(this.corp().expenses.toNumber(),"$0.000a")+"/ s<br>Total Profits: "+t+" / s<br>"+n+"Publicly Traded: "+(this.corp().public?"Yes":"No")+"<br>Owned Stock Shares: "+m.numeralWrapper.format(this.corp().numShares,"0.000a")+"<br>Stock Price: "+(this.corp().public?m.numeralWrapper.formatMoney(this.corp().sharePrice):"N/A")+"<br><p class='tooltip'>Total Stock Shares: "+m.numeralWrapper.format(this.corp().totalShares,"0.000a")+"<span class='tooltiptext'>"+`Outstanding Shares: ${m.numeralWrapper.format(this.corp().issuedShares,"0.000a")}<br>`+`Private Shares: ${m.numeralWrapper.format(this.corp().totalShares-this.corp().issuedShares-this.corp().numShares,"0.000a")}`+"</span></p><br><br>";const i=this.corp().storedCycles*p.CONSTANTS.MilliPerCycle/1e3;i>15&&(a+=`Bonus Time: ${i} seconds<br><br>`);let r=this.corp().getProductionMultiplier(),o=this.corp().getStorageMultiplier(),s=this.corp().getAdvertisingMultiplier(),l=this.corp().getEmployeeCreMultiplier(),c=this.corp().getEmployeeChaMultiplier(),u=this.corp().getEmployeeIntMultiplier(),h=this.corp().getEmployeeEffMultiplier(),d=this.corp().getSalesMultiplier(),g=this.corp().getScientificResearchMultiplier();return r>1&&(a+="Production Multiplier: "+m.numeralWrapper.format(r,"0.000")+"<br>"),o>1&&(a+="Storage Multiplier: "+m.numeralWrapper.format(o,"0.000")+"<br>"),s>1&&(a+="Advertising Multiplier: "+m.numeralWrapper.format(s,"0.000")+"<br>"),l>1&&(a+="Empl. Creativity Multiplier: "+m.numeralWrapper.format(l,"0.000")+"<br>"),c>1&&(a+="Empl. Charisma Multiplier: "+m.numeralWrapper.format(c,"0.000")+"<br>"),u>1&&(a+="Empl. Intelligence Multiplier: "+m.numeralWrapper.format(u,"0.000")+"<br>"),h>1&&(a+="Empl. Efficiency Multiplier: "+m.numeralWrapper.format(h,"0.000")+"<br>"),d>1&&(a+="Sales Multiplier: "+m.numeralWrapper.format(d,"0.000")+"<br>"),g>1&&(a+="Scientific Research Multiplier: "+m.numeralWrapper.format(g,"0.000")+"<br>"),a}renderButtons(){const e=this.corp().getStarterGuide.bind(this.corp()),t=this.createButton({class:"a-link-button",display:"inline-block",onClick:e,text:"Getting Started Guide",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it."}),n=this.corp().determineValuation()>=l.a,a=this.eventHandler().createBribeFactionsPopup.bind(this.eventHandler()),i=n?"a-link-button":"a-link-button-inactive",r={bribeFactions:this.createButton({class:i,display:"inline-block",onClick:a,text:"Bribe Factions",tooltip:n?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"}),getStarterGuide:t};return this.corp().public?this.renderPublicButtons(r):this.renderPrivateButtons(r)}renderPrivateButtons(e){const t=this.corp().fundingRound<4,n=t?"std-button":"a-link-button-inactive",a=t?"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company":null,r=this.corp().getInvestment.bind(this.corp()),o=this.corp().goPublic.bind(this.corp()),s=this.createButton({class:n,onClick:r,style:"inline-block",text:"Find Investors",tooltip:a}),l=this.createButton({class:"std-button",onClick:o,style:"inline-block",text:"Go Public",tooltip:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."});return i.a.createElement("div",null,e.getStarterGuide,s,l,i.a.createElement("br",null),e.bribeFactions)}renderPublicButtons(e){const t=this.corp(),n=this.eventHandler().createSellSharesPopup.bind(this.eventHandler()),a=t.shareSaleCooldown>0,r=a?"a-link-button-inactive":"std-button",o=a?"Cannot sell shares for "+t.convertCooldownToString(t.shareSaleCooldown):"Sell your shares in the company. The money earned from selling your shares goes into your personal account, not the Corporation's. This is one of the only ways to profit from your business venture.",s=this.createButton({class:r,display:"inline-block",onClick:n,text:"Sell Shares",tooltip:o}),l=this.eventHandler().createBuybackSharesPopup.bind(this.eventHandler()),c=this.createButton({class:"std-button",display:"inline-block",onClick:l,text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),u=this.eventHandler().createIssueNewSharesPopup.bind(this.eventHandler()),p=t.issueNewSharesCooldown>0,m=p?"a-link-button-inactive":"std-button",h=p?"Cannot issue new shares for "+t.convertCooldownToString(t.issueNewSharesCooldown):"Issue new equity shares to raise capital.",d=this.createButton({class:m,display:"inline-block",onClick:u,text:"Issue New Shares",tooltip:h}),g=this.eventHandler().createIssueDividendsPopup.bind(this.eventHandler()),_=this.createButton({class:"std-button",display:"inline-block",onClick:g,text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"});return i.a.createElement("div",null,e.getStarterGuide,s,c,i.a.createElement("br",null),d,_,i.a.createElement("br",null),e.bribeFactions)}renderUpgrades(){if(this.corp().divisions.length<=0)return;const e=[];Object.values(c.CorporationUnlockUpgrades).forEach(t=>{0===this.corp().unlockUpgrades[t[0]]&&e.push(this.renderUnlockUpgrade(t))});const t=[];for(let e=0;e<this.corp().upgrades.length;++e){const n=u.CorporationUpgrades[e],a=this.corp().upgrades[e];t.push({upgradeData:n,upgradeLevel:a})}return i.a.createElement("div",{className:"cmpy-mgmt-upgrade-container"},i.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Unlocks "),e,i.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Upgrades "),t.map(e=>this.renderLevelableUpgrade(e)))}renderUnlockUpgrade(e){return i.a.createElement(s.a,h({},this.props,{upgradeData:e,key:e[0]}))}renderLevelableUpgrade(e){return i.a.createElement(o.a,h({},this.props,{upgradeData:e.upgradeData,upgradeLevel:e.upgradeLevel,key:e.upgradeData[0]}))}render(){return i.a.createElement("div",null,i.a.createElement("p",{dangerouslySetInnerHTML:{__html:this.getOverviewText()}}),this.renderButtons(),i.a.createElement("br",null),this.renderUpgrades())}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return IndustryWarehouse});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(2),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_BaseReactComponent__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(60),_Corporation__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(28),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(124),_Material__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_3__),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(109),_Product__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_4__),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(82),_Warehouse__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_5__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(44),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__);function ProductComponent(e){const t=e.corp,n=e.division,a=(e.warehouse,e.city),i=e.product,r=e.eventHandler,o="0.000",s="0.000a",l=n.hasResearch("uPgrade: Dashboard"),c=i.data[a][1]-i.data[a][2];let u;if(u=i.sllman[a][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(i.sllman[a][1])?`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.data[a][2],s)}/${i.sllman[a][1]})`:`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.data[a][2],s)}/${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.sllman[a][1],s)})`:"Sell (0.000/0.000)",i.marketTa2)u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(i.marketTa2Price[a]);else if(i.marketTa1){const e=i.rat/i.mku;u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(i.pCost+e)}else i.sCost&&(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(i.sCost)?u+=" @ "+i.sCost:u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.sCost,"$0.000a"));const p=r.createSellProductPopup.bind(r,i,a);let m="Limit Production";i.prdman[a][0]&&(m+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.prdman[a][1],o)+")");const h=r.createLimitProductProdutionPopup.bind(r,i,a),d=r.createDiscontinueProductPopup.bind(r,i,n),g=r.createProductMarketTaPopup.bind(r,i,n);return i.fin?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},i.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.data[a][0],s)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(c,s),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.data[a][1],s),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.data[a][2],s)," /s")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.rat,o),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.qlt,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.per,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.dur,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.rel,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.aes,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.fea,o),1===t.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===t.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.dmd,o),1===t.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===t.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.cmp,o))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Production Cost: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(i.pCost/_Corporation__WEBPACK_IMPORTED_MODULE_2__.j),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of the material cost it takes to create this Product.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(i.pCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:p},u),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:h},m),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:d},"Discontinue"),n.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:g},"Market-TA"))):l?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",i.name,"..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.prog,"0.00"),"% complete"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:p},u),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:h},m),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:d},"Discontinue"),n.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:g},"Market-TA"))):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",i.name,"..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(i.prog,"0.00"),"% complete"))}function MaterialComponent(props){const corp=props.corp,division=props.division,warehouse=props.warehouse,city=props.city,mat=props.mat,eventHandler=props.eventHandler,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _Corporation__WEBPACK_IMPORTED_MODULE_2__.i))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp;let cmpAndDmdText="";1===corp.unlockUpgrades[2]&&(cmpAndDmdText+="<br>Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.dmd,nf)),1===corp.unlockUpgrades[3]&&(cmpAndDmdText+="<br>Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.cmp,nf));const tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.buy,nf)})`,purchaseButtonClass=tutorial?"std-button flashing-button tooltip":"std-button",purchaseButtonOnClick=eventHandler.createPurchaseMaterialPopup.bind(eventHandler,mat,division,warehouse),exportButtonOnClick=eventHandler.createExportMaterialPopup.bind(eventHandler,mat);let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(mat.sllman[1])?`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nf)}/${mat.sllman[1]})`:`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nf)}/${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sllman[1],nf)})`,mat.marketTa2)sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.marketTa2Price);else if(mat.marketTa1)sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.bCost+markupLimit);else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(mat.sCost)){var sCost=mat.sCost.replace(/MP/g,mat.bCost);sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(eval(sCost))}else sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.sCost)}else sellButtonText="Sell (0.000/0.000)";const sellButtonOnClick=eventHandler.createSellMaterialPopup.bind(eventHandler,mat),marketTaButtonOnClick=eventHandler.createMaterialMarketTaPopup.bind(eventHandler,mat,division);return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-material-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.bCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Market Price: The price you would pay if you were to buy this material on the market"))," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.qlt,"0.00a"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"The quality of your material. Higher quality will lead to more sales"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:purchaseButtonClass,onClick:purchaseButtonOnClick},purchaseButtonText,tutorial&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Purchase your required materials to get production started!")),1===corp.unlockUpgrades[0]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:exportButtonOnClick},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:sellButtonOnClick},sellButtonText),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:marketTaButtonOnClick},"Market-TA")))}class IndustryWarehouse extends _BaseReactComponent__WEBPACK_IMPORTED_MODULE_1__.a{isRelevantMaterial(e,t){return!!Object.keys(t.reqMats).includes(e)||(!!t.prodMats.includes(e)||!!["Hardware","Robots","AICores","RealEstate"].includes(e))}renderWarehouseUI(){const e=this.corp(),t=this.routing().currentDivision,n=t.warehouses[this.props.currentCity],a={color:n.sizeUsed>=n.size?"red":"white",margin:"5px"},i=_Corporation__WEBPACK_IMPORTED_MODULE_2__.o*Math.pow(1.07,n.level+1),r=e.funds.gt(i)?"std-button":"a-link-button-inactive";let o="This Industry uses ["+Object.keys(t.reqMats).join(", ")+"] in order to ";t.prodMats.length>0?(o+="produce ["+t.prodMats.join(", ")+"] ",t.makesProducts&&(o+=" and "+t.getProductDescriptionText())):t.makesProducts&&(o+=t.getProductDescriptionText()+".");const s=[];for(const e in t.reqMats)if(t.reqMats.hasOwnProperty(e)){const n=[" *",t.reqMats[e],e].join(" ");s.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:e},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,n)))}let l,c="in order to create ";switch(t.prodMats.length>0?(c+="one of each produced Material ("+t.prodMats.join(", ")+") ",t.makesProducts&&(c+="or to create one of its Products")):t.makesProducts&&(c+="one of its Products"),t.state){case"START":l="Current state: Preparing...";break;case"PURCHASE":l="Current state: Purchasing materials...";break;case"PRODUCTION":l="Current state: Producing materials and/or products...";break;case"SALE":l="Current state: Selling materials and/or products...";break;case"EXPORT":l="Current state: Exporting materials and/or products...";break;default:console.error(`Invalid state: ${t.state}`)}const u=[];for(const a in n.materials)n.materials[a]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.Material&&this.isRelevantMaterial(a,t)&&u.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{city:this.props.currentCity,corp:e,division:t,eventHandler:this.eventHandler(),key:a,mat:n.materials[a],warehouse:n}));const p=[];if(t.makesProducts&&Object.keys(t.products).length>0)for(const a in t.products)t.products[a]instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.Product&&p.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{city:this.props.currentCity,corp:e,division:t,eventHandler:this.eventHandler(),key:a,product:t.products[a],warehouse:n}));return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip",style:a},"Storage: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(n.sizeUsed,"0.000")," / ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(n.size,"0.000"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:n.breakdown}})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:r,onClick:()=>{++n.level,n.updateSize(e,t),e.funds=e.funds.minus(i),e.rerender()}},"Upgrade Warehouse Size - ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(i)),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,o,". The exact requirements for production are:"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),s,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,c),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,l),e.unlockUpgrades[1]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label",{style:{color:"white"},htmlFor:"cmpy-mgmt-smart-supply-checkbox"},"Enable Smart Supply"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",onChange:t=>{n.smartSupplyEnabled=t.target.checked,e.rerender()},style:{margin:"3px"},checked:n.smartSupplyEnabled})),u,p)}render(){this.corp();const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=e.warehouses[this.props.currentCity],n=this.eventHandler().purchaseWarehouse.bind(this.eventHandler(),e,this.props.currentCity);return t instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__.Warehouse?this.renderWarehouseUI():react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:n},"Purchase Warehouse (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(_Corporation__WEBPACK_IMPORTED_MODULE_2__.m),")"))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(2),i=n.n(a),r=n(60),o=n(28),s=n(27),l=n(127),c=n(3),u=n(9),p=n(96);class m extends r.a{renderMakeProductButton(){this.corp();const e=this.routing().currentDivision;var t,n;switch(e.type){case s.Industries.Food:t="Build Restaurant",n="Build and manage a new restaurant!";break;case s.Industries.Tobacco:t="Create Product",n="Create a new tobacco product!";break;case s.Industries.Pharmaceutical:t="Create Drug",n="Design and develop a new pharmaceutical drug!";break;case s.Industries.Computer:case"Computer":t="Create Product",n="Design and manufacture a new computer hardware product!";break;case s.Industries.Robotics:t="Design Robot",n="Design and create a new robot or robotic system!";break;case s.Industries.Software:t="Develop Software",n="Develop a new piece of software!";break;case s.Industries.Healthcare:t="Build Hospital",n="Build and manage a new hospital!";break;case s.Industries.RealEstate:t="Develop Property",n="Develop a new piece of real estate property!";break;default:return t="Create Product",n="Create a new product!",""}n+="<br><br>To begin developing a product, first choose the city in which it will be designed. The stats of your employees in the selected city affect the properties of the finished product, such as its quality, performance, and durability.<br><br>You can also choose to invest money in the design and marketing of the product. Investing money in its design will result in a superior product. Investing money in marketing the product will help the product's sales.";const a=e.hasMaximumNumberProducts(),r=a?"a-link-button-inactive tooltip":"std-button",o=this.eventHandler().createMakeProductPopup.bind(this.eventHandler(),n,e);return i.a.createElement("button",{className:r,onClick:o,style:{margin:"6px",display:"inline-block"}},t,a&&i.a.createElement("span",{className:"tooltiptext"},"You have reached the maximum number of products: ",e.getMaximumNumberProducts()))}renderText(){const e=this.corp(),t=this.routing().currentDivision,n=1===e.unlockUpgrades[4],a=t.lastCycleRevenue.minus(t.lastCycleExpenses).toNumber(),r=`Industry: ${t.type} (Corp Funds: ${c.numeralWrapper.formatMoney(e.funds.toNumber())})`,o=`Awareness: ${c.numeralWrapper.format(t.awareness,"0.000")}`,s=`Popularity: ${c.numeralWrapper.format(t.popularity,"0.000")}`;let l=!1;const m=t.getAdvertisingFactors(),h=m[1],d=m[2],g=m[3],_=m[0];n&&(l=!0);const f=`Revenue: ${c.numeralWrapper.formatMoney(t.lastCycleRevenue.toNumber())} / s`,y=`Expenses: ${c.numeralWrapper.formatMoney(t.lastCycleExpenses.toNumber())} /s`,b=`Profit: ${c.numeralWrapper.formatMoney(a)} / s`;return i.a.createElement("div",null,r,i.a.createElement("br",null)," ",i.a.createElement("br",null),o," ",i.a.createElement("br",null),s," ",i.a.createElement("br",null),!1!==l&&i.a.createElement("p",{className:"tooltip"},"Advertising Multiplier: x",c.numeralWrapper.format(_,"0.000"),i.a.createElement("span",{className:"tooltiptext cmpy-mgmt-advertising-info"},"Total multiplier for this industrys sales due to its awareness and popularity",i.a.createElement("br",null),"Awareness Bonus: x",c.numeralWrapper.format(Math.pow(h,.85),"0.000"),i.a.createElement("br",null),"Popularity Bonus: x",c.numeralWrapper.format(Math.pow(d,.85),"0.000"),i.a.createElement("br",null),"Ratio Multiplier: x",c.numeralWrapper.format(Math.pow(g,.85),"0.000"))),l,i.a.createElement("br",null),i.a.createElement("br",null),f," ",i.a.createElement("br",null),y," ",i.a.createElement("br",null),b,i.a.createElement("br",null)," ",i.a.createElement("br",null),i.a.createElement("p",{className:"tooltip"},"Production Multiplier: ",c.numeralWrapper.format(t.prodMult,"0.00"),i.a.createElement("span",{className:"tooltiptext"},"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate")),i.a.createElement("div",{className:"help-tip",onClick:()=>{function e(e){return Object(p.createProgressBarText)({progress:e,totalTicks:20})}Object(u.dialogBoxCreate)("Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these materials have on your production varies between Industries. For example, Real Estate may be very effective for some Industries, but ineffective for others.<br><br>This division's production multiplier is calculated by summing the individual production multiplier of each of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial to expand into new cities as this can greatly increase the production multiplier of your entire Division.<br><br>Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):<br><br>"+`Hardware: ${e(t.hwFac)}<br>`+`Robots: ${e(t.robFac)}<br>`+`AI Cores: ${e(t.aiFac)}<br>`+`Real Estate: ${e(t.reFac)}`)}},"?"),i.a.createElement("br",null)," ",i.a.createElement("br",null),i.a.createElement("p",{className:"tooltip"},"Scientific Research: ",c.numeralWrapper.format(t.sciResearch.qty,"0.000a"),i.a.createElement("span",{className:"tooltiptext"},"Scientific Research increases the quality of the materials and products that you produce.")),i.a.createElement("button",{className:"help-tip",onClick:t.createResearchBox.bind(t)},"Research"))}renderUpgrades(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity];if(!(n instanceof o.i))throw new Error(`Current City (${this.props.currentCity}) for UI does not have an OfficeSpace object`);const a=[];for(const i in l.IndustryUpgrades){const r=l.IndustryUpgrades[i];if(t.hasResearch("AutoBrew")&&"Coffee"===r[4])continue;const o=r[0],s=r[1],p=r[2];let m=0;switch(o){case 0:m=n.employees.length*s;break;default:m=s*Math.pow(p,t.upgrades[o])}const h=()=>{e.funds.lt(m)?Object(u.dialogBoxCreate)("Insufficient funds"):(e.funds=e.funds.minus(m),t.upgrade(r,{corporation:e,office:n}),e.rerender())};a.push(this.renderUpgrade({onClick:h,text:`${r[4]} - ${c.numeralWrapper.formatMoney(m)}`,tooltip:r[5]}))}return a}renderUpgrade(e){return i.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",onClick:e.onClick,key:e.text},e.text,null!=e.tooltip&&i.a.createElement("span",{className:"tooltiptext"},e.tooltip))}render(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=this.renderMakeProductButton();return i.a.createElement("div",{className:"cmpy-mgmt-industry-overview-panel"},this.renderText(),i.a.createElement("br",null),i.a.createElement("u",{className:"industry-purchases-and-upgrades-header"},"Purchases & Upgrades"),i.a.createElement("br",null),this.renderUpgrades()," ",i.a.createElement("br",null),e.makesProducts&&t)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var a=n(2),i=n.n(a),r=n(60),o=n(28),s=n(24),l=n(3),c=n(88);class u extends r.a{constructor(e){super(e),this.state={city:"",division:"",employeeManualAssignMode:!1,employee:null,numEmployees:0,numOperations:0,numEngineers:0,numBusiness:0,numManagement:0,numResearch:0,numUnassigned:0,numTraining:0},this.updateEmployeeCount()}resetEmployeeCount(){this.state.numEmployees=0,this.state.numOperations=0,this.state.numEngineers=0,this.state.numBusiness=0,this.state.numManagement=0,this.state.numResearch=0,this.state.numUnassigned=0,this.state.numTraining=0}updateEmployeeCount(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=e.offices[this.props.currentCity];if(!(t instanceof o.i))throw new Error(`Current City (${this.props.currentCity}) for UI does not have an OfficeSpace object`);e.name===this.state.division&&this.props.currentCity===this.state.city||(this.resetEmployeeCount(),this.state.division=e.name,this.state.city=this.props.currentCity);const n=t.employees.length;this.state.numEmployees;for(let e=this.state.numEmployees;e<t.employees.length;++e)switch(t.employees[e].pos){case s.EmployeePositions.Operations:++this.state.numOperations;break;case s.EmployeePositions.Engineer:++this.state.numEngineers;break;case s.EmployeePositions.Business:++this.state.numBusiness;break;case s.EmployeePositions.Management:++this.state.numManagement;break;case s.EmployeePositions.RandD:++this.state.numResearch;break;case s.EmployeePositions.Unassigned:++this.state.numUnassigned;break;case s.EmployeePositions.Training:++this.state.numTraining;break;default:console.error("Unrecognized employee position: "+t.employees[e].pos)}this.state.numEmployees=n}renderEmployeeManagement(){return this.updateEmployeeCount(),this.state.employeeManualAssignMode?this.renderManualEmployeeManagement():this.renderAutomaticEmployeeManagement()}renderAutomaticEmployeeManagement(){const e=this.routing().currentDivision,t=e.offices[this.props.currentCity],n=1===this.corp().unlockUpgrades[4];let a=0,r=0,o=0,c=0;for(let e=0;e<t.employees.length;++e)a+=t.employees[e].mor,r+=t.employees[e].hap,o+=t.employees[e].ene,c+=t.employees[e].sal;let u=0,p=0,m=0;t.employees.length>0&&(u=a/t.employees.length,p=r/t.employees.length,m=o/t.employees.length);const h=n=>{if(this.state.numUnassigned<=0)console.warn("Cannot assign employee. No unassigned employees available");else{switch(n){case s.EmployeePositions.Operations:++this.state.numOperations;break;case s.EmployeePositions.Engineer:++this.state.numEngineers;break;case s.EmployeePositions.Business:++this.state.numBusiness;break;case s.EmployeePositions.Management:++this.state.numManagement;break;case s.EmployeePositions.RandD:++this.state.numResearch;break;case s.EmployeePositions.Unassigned:++this.state.numUnassigned;break;case s.EmployeePositions.Training:++this.state.numTraining;break;default:console.error("Unrecognized employee position: "+n)}--this.state.numUnassigned,t.assignEmployeeToJob(n),t.calculateEmployeeProductivity({corporation:this.corp(),industry:e}),this.corp().rerender()}},d=n=>{function a(e){console.warn(`Cannot unassign from ${e} because there is nobody assigned to that position`)}switch(n){case s.EmployeePositions.Operations:if(this.state.numOperations<=0)return a(s.EmployeePositions.Operations);--this.state.numOperations;break;case s.EmployeePositions.Engineer:if(this.state.numEngineers<=0)return a(s.EmployeePositions.Operations);--this.state.numEngineers;break;case s.EmployeePositions.Business:if(this.state.numBusiness<=0)return a(s.EmployeePositions.Operations);--this.state.numBusiness;break;case s.EmployeePositions.Management:if(this.state.numManagement<=0)return a(s.EmployeePositions.Operations);--this.state.numManagement;break;case s.EmployeePositions.RandD:if(this.state.numResearch<=0)return a(s.EmployeePositions.Operations);--this.state.numResearch;break;case s.EmployeePositions.Unassigned:console.warn("Tried to unassign from the Unassigned position");break;case s.EmployeePositions.Training:if(this.state.numTraining<=0)return a(s.EmployeePositions.Operations);--this.state.numTraining;break;default:console.error("Unrecognized employee position: "+n)}++this.state.numUnassigned,t.unassignEmployeeFromJob(n),t.calculateEmployeeProductivity({corporation:this.corp(),industry:e}),this.corp().rerender()},g={fontSize:"15px",margin:"5px 0px 5px 0px",width:"50%"},_=this.state.numUnassigned>0?"std-button":"a-link-button-inactive",f=this.state.numOperations>0?"std-button":"a-link-button-inactive",y=this.state.numEngineers>0?"std-button":"a-link-button-inactive",b=this.state.numBusiness>0?"std-button":"a-link-button-inactive",v=this.state.numManagement>0?"std-button":"a-link-button-inactive",E=this.state.numResearch>0?"std-button":"a-link-button-inactive",k=this.state.numTraining>0?"std-button":"a-link-button-inactive";return i.a.createElement("div",null,i.a.createElement("button",{className:"std-button tooltip",onClick:()=>{this.state.employeeManualAssignMode=!0,this.corp().rerender()}},"Switch to Manual Mode",i.a.createElement("span",{className:"tooltiptext"},"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")),i.a.createElement("p",null,i.a.createElement("strong",null,"Unassigned Employees: ",this.state.numUnassigned)),i.a.createElement("br",null),i.a.createElement("p",null,"Avg Employee Morale: ",l.numeralWrapper.format(u,"0.000")),i.a.createElement("p",null,"Avg Happiness Morale: ",l.numeralWrapper.format(p,"0.000")),i.a.createElement("p",null,"Avg Energy Morale: ",l.numeralWrapper.format(m,"0.000")),i.a.createElement("p",null,"Total Employee Salary: ",l.numeralWrapper.formatMoney(c)),n&&i.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Material Production: ",l.numeralWrapper.format(e.getOfficeProductivity(t),"0.000"),i.a.createElement("span",{className:"tooltiptext"},"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),n&&i.a.createElement("br",null),n&&i.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Product Production: ",l.numeralWrapper.format(e.getOfficeProductivity(t,{forProduct:!0}),"0.000"),i.a.createElement("span",{className:"tooltiptext"},"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),n&&i.a.createElement("br",null),n&&i.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Business Multiplier: x",l.numeralWrapper.format(e.getBusinessFactor(t),"0.000"),i.a.createElement("span",{className:"tooltiptext"},"The effect this office's 'Business' employees has on boosting sales")),n&&i.a.createElement("br",null),i.a.createElement("h2",{className:"tooltip",style:g},s.EmployeePositions.Operations," (",this.state.numOperations,")",i.a.createElement("span",{className:"tooltiptext"},"Manages supply chain operations. Improves the amount of Materials and Products you produce.")),i.a.createElement("button",{className:_,onClick:()=>{h(s.EmployeePositions.Operations),this.corp().rerender()}},"+"),i.a.createElement("button",{className:f,onClick:()=>{d(s.EmployeePositions.Operations),this.corp().rerender()}},"-"),i.a.createElement("br",null),i.a.createElement("h2",{className:"tooltip",style:g},s.EmployeePositions.Engineer," (",this.state.numEngineers,")",i.a.createElement("span",{className:"tooltiptext"},"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)")),i.a.createElement("button",{className:_,onClick:()=>{h(s.EmployeePositions.Engineer),this.corp().rerender()}},"+"),i.a.createElement("button",{className:y,onClick:()=>{d(s.EmployeePositions.Engineer),this.corp().rerender()}},"-"),i.a.createElement("br",null),i.a.createElement("h2",{className:"tooltip",style:g},s.EmployeePositions.Business," (",this.state.numBusiness,")",i.a.createElement("span",{className:"tooltiptext"},"Handles sales and finances. Improves the amount of Materials and Products you can sell.")),i.a.createElement("button",{className:_,onClick:()=>{h(s.EmployeePositions.Business),this.corp().rerender()}},"+"),i.a.createElement("button",{className:b,onClick:()=>{d(s.EmployeePositions.Business),this.corp().rerender()}},"-"),i.a.createElement("br",null),i.a.createElement("h2",{className:"tooltip",style:g},s.EmployeePositions.Management," (",this.state.numManagement,")",i.a.createElement("span",{className:"tooltiptext"},"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees")),i.a.createElement("button",{className:_,onClick:()=>{h(s.EmployeePositions.Management),this.corp().rerender()}},"+"),i.a.createElement("button",{className:v,onClick:()=>{d(s.EmployeePositions.Management),this.corp().rerender()}},"-"),i.a.createElement("br",null),i.a.createElement("h2",{className:"tooltip",style:g},s.EmployeePositions.RandD," (",this.state.numResearch,")",i.a.createElement("span",{className:"tooltiptext"},"Research new innovative ways to improve the company. Generates Scientific Research")),i.a.createElement("button",{className:_,onClick:()=>{h(s.EmployeePositions.RandD),this.corp().rerender()}},"+"),i.a.createElement("button",{className:E,onClick:()=>{d(s.EmployeePositions.RandD),this.corp().rerender()}},"-"),i.a.createElement("br",null),i.a.createElement("h2",{className:"tooltip",style:g},s.EmployeePositions.Training," (",this.state.numTraining,")",i.a.createElement("span",{className:"tooltiptext"},"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations.")),i.a.createElement("button",{className:_,onClick:()=>{h(s.EmployeePositions.Training),this.corp().rerender()}},"+"),i.a.createElement("button",{className:k,onClick:()=>{d(s.EmployeePositions.Training),this.corp().rerender()}},"-"))}renderManualEmployeeManagement(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity],a=[];for(let e=0;e<n.employees.length;++e)a.push(i.a.createElement("option",{key:n.employees[e].name},n.employees[e].name));const r=this.state.employee;let o=null;const u=[],p=Object.values(s.EmployeePositions);for(let e=0;e<p.length;++e)u.push(i.a.createElement("option",{key:p[e],value:p[e]},p[e])),null!=r&&r.pos===p[e]&&(o=p[e]);const m="0.000",h=r?r.cre*e.getEmployeeCreMultiplier()*t.getEmployeeCreMultiplier():0,d=r?r.cha*e.getEmployeeChaMultiplier()*t.getEmployeeChaMultiplier():0,g=r?r.int*e.getEmployeeIntMultiplier()*t.getEmployeeIntMultiplier():0,_=r?r.eff*e.getEmployeeEffMultiplier()*t.getEmployeeEffMultiplier():0;return i.a.createElement("div",null,i.a.createElement("button",{className:"std-button tooltip",onClick:()=>{this.state.employeeManualAssignMode=!1,this.corp().rerender()}},"Switch to Auto Mode",i.a.createElement("span",{className:"tooltiptext"},"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job")),i.a.createElement("div",{style:{color:"white",margin:"4px",padding:"4px"}},i.a.createElement("select",{onChange:t=>{const a=Object(c.getSelectText)(t.target);for(let e=0;e<n.employees.length;++e)if(a===n.employees[e].name){this.state.employee=n.employees[e];break}e.rerender()}},a),null!=this.state.employee&&i.a.createElement("p",null,"Morale: ",l.numeralWrapper.format(this.state.employee.mor,m),i.a.createElement("br",null),"Happiness: ",l.numeralWrapper.format(this.state.employee.hap,m),i.a.createElement("br",null),"Energy: ",l.numeralWrapper.format(this.state.employee.ene,m),i.a.createElement("br",null),"Age: ",l.numeralWrapper.format(this.state.employee.age,m),i.a.createElement("br",null),"Intelligence: ",l.numeralWrapper.format(g,m),i.a.createElement("br",null),"Charisma: ",l.numeralWrapper.format(d,m),i.a.createElement("br",null),"Experience: ",l.numeralWrapper.format(this.state.employee.exp,m),i.a.createElement("br",null),"Creativity: ",l.numeralWrapper.format(h,m),i.a.createElement("br",null),"Efficiency: ",l.numeralWrapper.format(_,m),i.a.createElement("br",null),"Salary: ",l.numeralWrapper.formatMoney(this.state.employee.sal)),null!=this.state.employee&&i.a.createElement("select",{onChange:t=>{const n=Object(c.getSelectText)(t.target);this.state.employee.pos=n,this.resetEmployeeCount(),e.rerender()},value:o},u)))}render(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity],a={fontSize:"13px"};let r="tooltip";n.atCapacity()?r+=" a-link-button-inactive":(r+=" std-button",0===n.employees.length&&(r+=" flashing-button"));let o="tooltip";n.atCapacity()?o+=" a-link-button-inactive":o+=" std-button";const s=this.eventHandler().createUpgradeOfficeSizePopup.bind(this.eventHandler(),n),l=this.eventHandler().createThrowOfficePartyPopup.bind(this.eventHandler(),n);return i.a.createElement("div",{className:"cmpy-mgmt-employee-panel"},i.a.createElement("h1",{style:{margin:"4px 0px 5px 0px"}},"Office Space"),i.a.createElement("p",null,"Size: ",n.employees.length," / ",n.size," employees"),i.a.createElement("button",{className:r,onClick:()=>{n.findEmployees({corporation:e,industry:t})},style:a},"Hire Employee",0===n.employees.length&&i.a.createElement("span",{className:"tooltiptext"},"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position")),i.a.createElement("button",{className:o,onClick:()=>{n.atCapacity()||(n.hireRandomEmployee(),this.corp().rerender())},style:a},"Autohire Employee",i.a.createElement("span",{className:"tooltiptext"},"Automatically hires an employee and gives him/her a random name")),i.a.createElement("br",null),i.a.createElement("button",{className:"std-button tooltip",onClick:s,style:a},"Upgrade size",i.a.createElement("span",{className:"tooltiptext"},"Upgrade the office's size so that it can hold more employees!")),!t.hasResearch("AutoPartyManager")&&i.a.createElement("button",{className:"std-button tooltip",onClick:l,style:a},"Throw Party",i.a.createElement("span",{className:"tooltiptext"},'"Throw an office party to increase your employee\'s morale and happiness"')),i.a.createElement("br",null),this.renderEmployeeManagement())}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(2),i=n.n(a),r=n(60),o=n(187),s=n(186),l=n(185);class c extends r.a{constructor(e){if(null==e.currentCity)throw new Error("Industry component constructed without 'city' prop");super(e)}render(){return i.a.createElement("div",null,i.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},i.a.createElement(s.a,this.props),i.a.createElement(o.a,this.props)),i.a.createElement("div",{className:"cmpy-mgmt-industry-right-panel"},i.a.createElement(l.a,this.props)))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(2),i=n.n(a),r=n(60);class o extends r.a{constructor(e){if(null==e.onClicks)throw new Error("CityTabs component constructed without onClick handlers");if(null==e.city)throw new Error("CityTabs component constructed without 'city' property");if(null==e.cityStateSetter)throw new Error("CityTabs component constructed without 'cityStateSetter' property");super(e)}renderTab(e){let t="cmpy-mgmt-city-tab";return e.current&&(t+=" current"),i.a.createElement("button",{className:t,onClick:e.onClick,key:e.key},e.key)}render(){const e=this.routing().currentDivision,t=[];for(const e in this.props.onClicks)t.push(this.renderTab({current:this.props.city===e,key:e,onClick:this.props.onClicks[e]}));const n=this.eventHandler().createNewCityPopup.bind(this.eventHandler(),e,this.props.cityStateSetter);return t.push(this.renderTab({current:!1,key:"Expand into new City",onClick:n})),t}}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(2),i=n.n(a),r=n(60),o=n(189),s=n(188),l=n(184),c=(n(114),n(28)),u=n(89);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}class m extends r.a{constructor(e){super(e),this.state={division:"",city:u.Cities.Sector12}}changeCityState(e){Object.values(u.Cities).includes(e)?this.state.city=e:console.error(`Tried to change MainPanel's city state to an invalid city: ${e}`)}renderContent(){if(this.routing().isOnOverviewPage())return this.renderOverviewPage();{const e=this.routing().current();return e!==this.state.division&&(this.state.division=e,this.state.city=u.Cities.Sector12),this.renderDivisionPage()}}renderOverviewPage(){return i.a.createElement("div",{id:"cmpy-mgmt-panel"},i.a.createElement(l.a,this.props))}renderDivisionPage(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t={};for(const n in e.offices)e.offices[n]instanceof c.i&&(t[n]=(()=>{this.state.city=n,this.corp().rerender()}));const n=i.a.createElement(o.a,p({},this.props,{city:this.state.city,onClicks:t,cityStateSetter:this.changeCityState.bind(this)})),a=i.a.createElement(s.a,p({},this.props,{currentCity:this.state.city}));return i.a.createElement("div",{id:"cmpy-mgmt-panel"},n,a)}render(){return this.renderContent()}}},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var a=n(2),i=n.n(a),r=n(60);n(114);function o(e){let t="cmpy-mgmt-header-tab";return e.current&&(t+=" current"),i.a.createElement("button",{className:t,onClick:e.onClick},e.text)}class s extends r.a{renderTab(e){return i.a.createElement(o,{current:e.current,key:e.key,onClick:e.onClick,text:e.text})}render(){const e={};for(const t of this.corp().divisions){const n=t.name,a=()=>{this.routing().routeTo(n),this.corp().rerender()};e[n]=a}return i.a.createElement("div",null,this.renderTab({current:this.routing().isOnOverviewPage(),key:"overview",onClick:()=>{this.routing().routeToOverviewPage(),this.corp().rerender()},text:this.corp().name}),this.corp().divisions.map(t=>this.renderTab({current:this.routing().isOn(t.name),key:t.name,onClick:e[t.name],text:t.name})),this.renderTab({onClick:this.eventHandler().createNewIndustryPopup.bind(this.eventHandler()),text:"Expand into new Industry"}))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(2),i=n.n(a),r=n(60),o=n(191),s=n(190);class l extends r.a{render(){return i.a.createElement("div",null,i.a.createElement(o.a,this.props),i.a.createElement(s.a,this.props))}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return CorporationEventHandler});var _Routing__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(114),_Routing__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Routing__WEBPACK_IMPORTED_MODULE_0__),_Corporation__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(28),_IndustryData__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(27),_IndustryData__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_2__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(91),_MaterialSizes__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(109),_Product__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_4__),_Player__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(0),_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(14),_Faction_Factions__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(89),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(9),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(31),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(154),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_11__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(4),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__),_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(58),_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_13__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(37),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(55),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__),_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(88),_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_16__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(26),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__);class CorporationEventHandler{constructor(e,t){if(!(e instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.c))throw new Error("CorporationEventHandler constructed without proper Corporation instance");if(!(t instanceof _Routing__WEBPACK_IMPORTED_MODULE_0__.CorporationRouting))throw new Error("CorporationEventHandler constructed without proper CorporationRouting instance");this.corp=e,this.routing=t}createBribeFactionsPopup(){const e="cmpy-mgmt-bribe-factions-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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_12__.createElement)("select",{margin:"3px"});for(let e=0;e<_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions.length;++e){const t=_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions[e];n.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("option",{text:t,value:t}))}var a,i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p"),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{type:"number",placeholder:"Corporation funds",margin:"5px",inputListener:()=>{var e=null==r.value||""==r.value?0:parseFloat(r.value),t=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(parseFloat(a.value));if(isNaN(e)||isNaN(o)||e<0||o<0)i.innerText="ERROR: Invalid value(s) entered";else if(this.corp.funds.lt(e))i.innerText="ERROR: You do not have this much money to bribe with";else if(this.corp.stockShares>this.corp.numShares)i.innerText="ERROR: You do not have this many shares to bribe with";else{var s=(Number(e)+o*t)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;i.innerText="You will gain "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(s,"0,0")+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{type:"number",placeholder:"Stock Shares",margin:"5px",inputListener:()=>{var e=null==r.value||""==r.value?0:parseFloat(r.value),t=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(a.value);if(isNaN(e)||isNaN(o)||e<0||o<0)i.innerText="ERROR: Invalid value(s) entered";else if(this.corp.funds.lt(e))i.innerText="ERROR: You do not have this much money to bribe with";else if(this.corp.stockShares>this.corp.numShares)i.innerText="ERROR: You do not have this many shares to bribe with";else{var s=(e+o*t)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;console.log("repGain: "+s),i.innerText="You will gain "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(s,"0,0")+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"a-link-button",innerText:"Bribe",display:"inline-block",clickListener:()=>{var t=null==r.value||""==r.value?0:parseFloat(r.value),i=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(parseFloat(a.value)),s=_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__.Factions[n.options[n.selectedIndex].value];if(null==s)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You must select a faction to bribe"),!1;if(isNaN(t)||isNaN(o)||t<0||o<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value(s) entered");else if(this.corp.funds.lt(t))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have this much money to bribe with");else{if(!(o>this.corp.numShares)){var l=(t+o*i)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You gained "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(l,"0,0")+" reputation with "+s.name+" by bribing them."),s.playerReputation+=l,this.corp.funds=this.corp.funds.minus(t),this.corp.numShares-=o,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have this many shares to bribe with")}}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(e,[t,n,i,r,a,o,s])}createBuybackSharesPopup(){const e="cmpy-mgmt-buyback-shares-popup",t=1.1*this.corp.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.<br><bR>To purchase these shares, you must use your own money (NOT your Corporation's funds).<br><br>The current buyback price of your company's stock is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")+". Your company currently has "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatBigNumber(this.corp.issuedShares)+" outstanding stock shares"});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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.corp.issuedShares?a.innerText="There are not this many shares available to buy back. There are only "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatBigNumber(this.corp.issuedShares)+" outstanding shares.":a.innerText="Purchase "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(e*t,"$0.000a")}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"a-link-button",innerText:"Buy shares",display:"inline-block",clickListener:()=>{var t=Math.round(i.value);const n=1.1*this.corp.sharePrice;if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else if(t>this.corp.issuedShares)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.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_9__.dialogBoxCreate)("ERROR: You do not have enough money to purchase this many shares (you need "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t*n,"$0.000a")+")");else{if(this.corp.numShares+=t,isNaN(this.corp.issuedShares)){console.warn("Corporation issuedShares is NaN: "+this.corp.issuedShares),console.warn("Converting to number now");const e=parseInt(this.corp.issuedShares);isNaN(e)?this.corp.issuedShares=0:this.corp.issuedShares=e}this.corp.issuedShares-=t,_Player__WEBPACK_IMPORTED_MODULE_5__.a.loseMoney(t*n),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),this.rerender()}return!1}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(e,[n,a,i,r,o]),i.focus()}createDiscontinueProductPopup(e,t){const n="cmpy-mgmt-discontinue-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"popup-box-button",innerText:"Discontinue",clickListener:()=>(t.discontinueProduct(e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n),this.rerender(),!1)}),r=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(n,{innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[a,r,i])}createExportMaterialPopup(mat){const corp=this.corp,popupId="cmpy-mgmt-export-popup",exportTxt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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_12__.createElement)("select",{class:"dropdown"}),industrySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("select",{class:"dropdown",changeListener:()=>{const e=Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_16__.getSelectValue)(industrySelector);for(let t=0;t<corp.divisions.length;++t)if(corp.divisions[t].name==e){Object(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_11__.clearSelector)(citySelector);for(const e in corp.divisions[t].warehouses)corp.divisions[t].warehouses[e]instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.l&&citySelector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("option",{value:e,text:e}));return}}});for(let e=0;e<corp.divisions.length;++e)industrySelector.add(Object(_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_13__.createOptionElement)(corp.divisions[e].name));industrySelector.dispatchEvent(new Event("change"));const exportAmount=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{class:"text-input",placeholder:"Export amount / s"}),exportBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Export",clickListener:()=>{const industryName=Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_16__.getSelectText)(industrySelector),cityName=citySelector.options[citySelector.selectedIndex].text,amt=exportAmount.value;let sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");let temp=sanitizedAmt.replace(/MAX/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.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_9__.dialogBoxCreate)("Invalid amount entered for export")}}),cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(popupId,{innerText:"Cancel"}),currExportsText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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=[];for(var i=0;i<mat.exp.length;++i)!function(e,t,n){n.push(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("div",{class:"cmpy-mgmt-existing-export",innerHTML:"Industry: "+t.exp[e].ind+"<br>City: "+t.exp[e].city+"<br>Amount/s: "+t.exp[e].amt,clickListener:()=>{t.exp.splice(e,1),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),createExportMaterialPopup(t)}}))}(i,mat,currExports);Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(popupId,[exportTxt,industrySelector,citySelector,exportAmount,exportBtn,cancelBtn,currExportsText].concat(currExports))}createIssueDividendsPopup(){const e="cmpy-mgmt-issue-dividends-popup",t="Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.<br><br>In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an "+`integer between 0 and ${_Corporation__WEBPACK_IMPORTED_MODULE_1__.d}. (A percentage of 0 means no dividends will be `+"issued<br><br>Two important things to note:<br> * Issuing dividends will negatively affect your corporation's stock price<br> * Dividends are taxed. Taxes start at 50%, but can be decreased<br><br>Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes.",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:t});let a;const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:"Dividend %",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&a.click()}});a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Allocate Dividend Percentage",clickListener:()=>{const t=Math.round(parseInt(i.value));return isNaN(t)||t<0||t>_Corporation__WEBPACK_IMPORTED_MODULE_1__.d?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Invalid value. Must be an integer between 0 and ${_Corporation__WEBPACK_IMPORTED_MODULE_1__.d}`):(this.corp.dividendPercentage=t,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),this.rerender(),!1)}});const r=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(e,[n,i,a,r]),i.focus()}createIssueNewSharesPopup(){const e="cmpy-mgmt-issue-new-shares-popup",t=Math.round(.2*this.corp.totalShares),n=t-t%1e6,a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.<br><br>"+` * You can issue at most ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"0.000a")} new shares<br>`+" * New shares are sold at a 10% discount<br> * You can only issue new shares once every 12 hours<br> * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share<br> * Number of new shares issued must be a multiple of 10 million<br><br>When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back."});let i,r;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{display:"block"});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:"# New Shares",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER?i.click():function(e){const t=Math.round(.9*e.sharePrice);let a=parseInt(r.value);isNaN(a)?o.innerText="Invalid input":(a/=1e7,a=1e7*Math.round(a),o.innerText=a<1e7?"Must issue at least 10 million new shares":a>n?"You cannot issue that many shares":`Issue ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0.000a")} new shares `+`for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(a*t)}?`)}(this.corp)}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Issue New Shares",clickListener:()=>{const t=Math.round(.9*this.corp.sharePrice);let a=parseInt(r.value);if(isNaN(a))return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input for number of new shares");if((a=1e7*Math.round(a/1e7))<1e7||a>n)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input for number of new shares");const i=a*t;this.corp.issueNewSharesCooldown=_Corporation__WEBPACK_IMPORTED_MODULE_1__.f,this.corp.totalShares+=a;let o=getRandomInt(0,Math.round(a/2));return o=1e6*Math.round(o/1e6),this.corp.issuedShares+=a-o,this.corp.funds=this.corp.funds.plus(i),this.corp.immediatelyUpdateSharePrice(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Issued ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0.000a")} and raised `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(i)}. ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(o,"0.000a")} `+"of these shares were bought by private investors.<br><br>"+`Stock price decreased to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(this.corp.sharePrice)}`),this.rerender(),!1}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(e,[a,o,r,i,s]),r.focus()}createLimitProductProdutionPopup(e,t){const n="cmpy-mgmt-limit-product-production-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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."});let i;const r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:"Limit",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&i.click()}});i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Limit production",margin:"5px",clickListener:()=>{if(""===r.value)return e.prdman[t][0]=!1,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n),!1;var a=parseFloat(r.value);return isNaN(a)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value entered"),!1):(a<0?e.prdman[t][0]=!1:(e.prdman[t][0]=!0,e.prdman[t][1]=a),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n),this.rerender(),!1)}});const o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(n,{innerText:"Cancel"});o.style.margin="6px",Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[a,r,i,o]),r.focus()}createMakeProductPopup(e,t){if(t.hasMaximumNumberProducts())return;const n="cmpy-mgmt-create-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:e}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("select",{margin:"5px"});for(const e in t.offices)t.offices[e]instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.i&&i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("option",{value:e,text:e}));let r="Product Name";t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.Food?r="Restaurant Name":t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.Healthcare?r="Hospital Name":t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.RealEstate&&(r="Property Name");var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:r}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("br"),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:"Design investment",type:"number"});let c;var u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:"Marketing investment",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&c.click()}});c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",innerText:"Develop Product",clickListener:()=>{null==l.value&&(l.value=0),null==u.value&&(u.value=0);var e=parseFloat(l.value),a=parseFloat(u.value);if(null==o.value||""===o.value)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You must specify a name for your product!");else if(isNaN(e))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for design investment");else if(isNaN(a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for marketing investment");else if(this.corp.funds.lt(e+a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to make this large of an investment");else{const r=new _Product__WEBPACK_IMPORTED_MODULE_4__.Product({name:o.value.replace(/[<>]/g,""),createCity:i.options[i.selectedIndex].value,designCost:e,advCost:a});if(t.products[r.name]instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.Product)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You already have a product with this name!");this.corp.funds=this.corp.funds.minus(e+a),t.products[r.name]=r,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n)}return this.rerender(),!1}});const p=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(n,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[a,i,o,s,l,u,c,p]),o.focus()}createMaterialMarketTaPopup(e,t){this.corp;const n="cmpy-mgmt-marketta-popup",a=e.getMarkupLimit(),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:"<u><strong>Market-TA.I</strong></u><br>The maximum sale price you can mark this up to is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(e.bCost+a)+". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("div",{display:"block"}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("label",{color:"white",for:"cmpy-mgmt-marketa1-checkbox",innerText:"Use Market-TA.I for Auto-Sale Price",tooltip:"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)"}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{checked:e.marketTa1,id:"cmpy-mgmt-marketa1-checkbox",margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa1=t.target.checked}});r.appendChild(o),r.appendChild(s);const l=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(n,{class:"std-button",display:"block",innerText:"Close"});if(t.hasResearch("Market-TA.II")){let t;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{marginTop:"4px",onkeyup:e=>{e.preventDefault(),t()},type:"number",value:e.bCost});(t=function(){const t=parseFloat(s.value);let n=1;t>e.bCost?t-e.bCost>a&&(n=Math.pow(a/(t-e.bCost),2)):t<e.bCost&&(n=t<=0?1e12:e.bCost/t),o.innerHTML="<br><u><strong>Market-TA.II</strong></u><br>"+`If you sell at ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(t)}, `+`then you will sell ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"0.00000")}x as much compared `+"to if you sold at market price."})();const c="cmpy-mgmt-marketa2-checkbox",u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("div",{display:"block"}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("label",{color:"white",for:c,innerText:"Use Market-TA.II for Auto-Sale Price",tooltip:"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)"}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{checked:e.marketTa2,id:c,margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa2=t.target.checked}});u.appendChild(p),u.appendChild(m),Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[i,r,o,s,u,l])}else Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[i,r,l])}createNewCityPopup(e,t){const n="cmpy-mgmt-expand-city-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerText:"Would you like to expand into a new city by opening an office? This would cost "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g,"$0.000a")}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("select",{class:"dropdown",margin:"5px"});for(const t in e.offices)e.offices[t]instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.i||i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("option",{text:t,value:t}));const r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Confirm",clickListener:()=>{if(i.length<=0)return!1;let a=i.options[i.selectedIndex].value;return this.corp.funds.lt(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to open a new office!"):(this.corp.funds=this.corp.funds.minus(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Opened a new office in "+a+"!"),e.offices[a]=new _Corporation__WEBPACK_IMPORTED_MODULE_1__.i({loc:a,size:_Corporation__WEBPACK_IMPORTED_MODULE_1__.h})),t(a),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n),this.rerender(),!1}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(n,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[a,i,r,o])}createNewIndustryPopup(){const e="cmpy-mgmt-expand-industry-popup";if(null!=document.getElementById(e))return;var t,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:"Create a new division to expand into a new industry:"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("select",{class:"dropdown"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{type:"text",id:"cmpy-mgmt-expand-industry-name-input",class:"text-input",display:"block",maxLength:30,pattern:"[a-zA-Z0-9-_]",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&t.click()}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("label",{for:"cmpy-mgmt-expand-industry-name-input",innerText:"Division name: "});t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("span",{class:"popup-box-button",innerText:"Create Division",clickListener:()=>{const e=a.options[a.selectedIndex].value,t=r.value;for(let e=0;e<this.corp.divisions.length;++e)if(this.corp.divisions[e].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("This name is already in use!"),!1;if(this.corp.funds.lt(_IndustryData__WEBPACK_IMPORTED_MODULE_2__.IndustryStartingCosts[e]))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Not enough money to create a new division in this industry");else if(""===t)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("New division must have a name!");else{this.corp.funds=this.corp.funds.minus(_IndustryData__WEBPACK_IMPORTED_MODULE_2__.IndustryStartingCosts[e]);var n=new _Corporation__WEBPACK_IMPORTED_MODULE_1__.e({corp:this.corp,name:t,type:e});this.corp.divisions.push(n),this.routing.routeTo(t),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-expand-industry-popup"),this.rerender()}return!1}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(e,{display:"inline-block",innerText:"Cancel"}),l={};for(let e=0;e<this.corp.divisions.length;++e)l[this.corp.divisions[e].type]=!0;for(var c in l.Agriculture||a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("option",{text:_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.Agriculture,value:"Agriculture"})),_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries)if("Agriculture"!==c&&_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.hasOwnProperty(c)&&!l[c]){var u=_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries[c];a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("option",{text:u,value:c}))}u=a.options[a.selectedIndex].value;i.innerHTML=_IndustryData__WEBPACK_IMPORTED_MODULE_2__.IndustryDescriptions[u]+"<br><br>",a.addEventListener("change",function(){var e=a.options[a.selectedIndex].value;i.innerHTML=_IndustryData__WEBPACK_IMPORTED_MODULE_2__.IndustryDescriptions[e]+"<br><br>"});const p=[];return p.push(n),p.push(a),p.push(i),p.push(o),p.push(r),p.push(s),p.push(t),Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(e,p),r.focus(),!1}createProductMarketTaPopup(e,t){this.corp;const n="cmpy-mgmt-marketta-popup",a=e.rat/e.mku,i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:"<u><strong>Market-TA.I</strong></u><br>The maximum sale price you can mark this up to is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(e.pCost+a)+". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("div",{display:"block"}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("label",{color:"white",for:"cmpy-mgmt-marketa1-checkbox",innerText:"Use Market-TA.I for Auto-Sale Price",tooltip:"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)"}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{checked:e.marketTa1,id:"cmpy-mgmt-marketa1-checkbox",margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa1=t.target.checked}});r.appendChild(o),r.appendChild(s);const l=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(n,{class:"std-button",display:"block",innerText:"Close"});if(t.hasResearch("Market-TA.II")){let t;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{marginTop:"4px",onkeyup:e=>{e.preventDefault(),t()},type:"number",value:e.pCost});(t=function(){const t=parseFloat(s.value);let n=1;t>e.pCost&&t-e.pCost>a&&(n=a/(t-e.pCost)),o.innerHTML="<br><u><strong>Market-TA.II</strong></u><br>"+`If you sell at ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(t)}, `+`then you will sell ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"0.00000")}x as much compared `+"to if you sold at market price."})();const c="cmpy-mgmt-marketa2-checkbox",u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("div",{display:"block"}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("label",{color:"white",for:c,innerText:"Use Market-TA.II for Auto-Sale Price",tooltip:"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)"}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{checked:e.marketTa2,id:c,margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa2=t.target.checked}});u.appendChild(p),u.appendChild(m),Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[i,r,o,s,u,l])}else Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(n,[i,r,l])}createPurchaseMaterialPopup(e,t,n){const a=this.corp,i="cmpy-mgmt-material-purchase-popup",r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerHTML:"Enter the amount of "+e.name+" you would like to purchase per second. This material's cost changes constantly"});let o,s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:"Purchase amount",type:"number",value:e.buy?e.buy:null,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&o.click()}});o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{innerText:"Confirm",class:"std-button",clickListener:()=>{if(!isNaN(s.value))return e.buy=parseFloat(s.value),isNaN(e.buy)&&(e.buy=0),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(i),this.rerender(),!1;Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid amount")}});const l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{innerText:"Clear Purchase",class:"std-button",clickListener:()=>(e.buy=0,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(i),this.rerender(),!1)}),c=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(i,{class:"std-button",innerText:"Cancel"}),u=[r,s,o,l,c];if(t.hasResearch("Bulk Purchasing")){const t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerText:"Enter the amount of "+e.name+" you would like to bulk purchase. This purchases the specified amount instantly (all at once)."});let r,o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p");const s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px",placeholder:"Bulk Purchase amount",type:"number",onkeyup:t=>{t.preventDefault(),function(t){const a=parseFloat(t),i=a*e.bCost,r=_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__.MaterialSizes[e.name];a*r>(n.size-n.sizeUsed)/r?o.innerText="Not enough warehouse space to purchase this amount":isNaN(i)?o.innerText="Invalid put for Bulk Purchase amount":o.innerText=`Purchasing ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0,0.00")} of `+`${e.name} will cost ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(i)}`}(t.target.value),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&r.click()}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",innerText:"Confirm Bulk Purchase",clickListener:()=>{const t=parseFloat(s.value),r=_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__.MaterialSizes[e.name];if(t*r>(n.size-n.sizeUsed)/r)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You do not have enough warehouse size to fit this purchase"),!1;if(!isNaN(t)){const n=t*e.bCost;return a.funds.gt(n)?(a.funds=a.funds.minus(n),e.qty+=t,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(i),!1):(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You cannot afford this purchase."),!1)}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input amount")}}),u.push(t),u.push(o),u.push(s),u.push(r)}Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(i,u),s.focus()}createSellMaterialPopup(mat){const sellPopupId="cmpy-mgmt-material-sell-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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.<br><br>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<br><br>Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.<br><br>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.<br><br>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_12__.createElement)("br");let confirmBtn;const inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sllman[1]?mat.sllman[1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&confirmBtn.click()}});let inputButtonInitValue=mat.sCost?mat.sCost:null;mat.marketTa2?inputButtonInitValue+=" (Market-TA.II)":mat.marketTa1&&(inputButtonInitValue+=" (Market-TA.I)");const inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{type:"text",marginTop:"4px",value:inputButtonInitValue,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",innerText:"Confirm",clickListener:()=>{let cost=inputPx.value.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");let temp=cost.replace(/MP/g,mat.bCost);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.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")){let qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");let tempQty=qty.replace(/MAX/g,1);tempQty=tempQty.replace(/PROD/g,1);try{tempQty=eval(tempQty)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==tempQty||isNaN(tempQty))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.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_9__.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 Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(sellPopupId),this.rerender(),!1}});const cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(sellPopupId,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(sellPopupId,[txt,br,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}createSellProductPopup(product,city){const popupId="cmpy-mgmt-sell-product-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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.<br><br>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.<br><br>Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.<br><br>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.<br><br>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."});let confirmBtn;const inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px 0px 5px 0px",placeholder:"Sell amount",type:"text",value:product.sllman[city][1]?product.sllman[city][1]:null,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&confirmBtn.click()}});let inputButtonInitValue=product.sCost?product.sCost:null;product.marketTa2?inputButtonInitValue+=" (Market-TA.II)":product.marketTa1&&(inputButtonInitValue+=" (Market-TA.I)");const inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{margin:"5px 0px 5px 0px",placeholder:"Sell price",type:"text",value:inputButtonInitValue,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&confirmBtn.click()}}),checkboxDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("div",{border:"1px solid white",display:"inline-block"}),checkboxLabel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("label",{for:popupId+"-checkbox",innerText:"Use same 'Sell Amount' for all cities"}),checkbox=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{checked:!0,id:popupId+"-checkbox",margin:"2px",type:"checkbox"});checkboxDiv.appendChild(checkboxLabel),checkboxDiv.appendChild(checkbox),confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-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_9__.dialogBoxCreate)("Invalid value or expression for sell quantity field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.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_9__.dialogBoxCreate)("Invalid value for sell price field"),!1;product.sCost=cost}const cities=Object.values(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__.Cities);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_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(checkbox.checked)for(let e=0;e<cities.length;++e){const t=cities[e];product.sllman[t][0]=!0,product.sllman[t][1]=qty}else product.sllman[city][0]=!0,product.sllman[city][1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric"),!1;var qty=parseFloat(inputQty.value);if(isNaN(qty)&&(qty=0),0===qty)if(checkbox.checked)for(let e=0;e<cities.length;++e){const t=cities[e];product.sllman[t][0]=!1}else product.sllman[city][0]=!1;else if(checkbox.checked)for(let e=0;e<cities.length;++e){const t=cities[e];product.sllman[t][0]=!0,product.sllman[t][1]=qty}else product.sllman[city][0]=!0,product.sllman[city][1]=qty}return Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),this.rerender(),!1}});const cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(popupId,{class:"std-button"}),linebreak1=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("br");Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(popupId,[txt,inputQty,inputPx,confirmBtn,cancelBtn,linebreak1,checkboxDiv]),inputQty.focus()}createSellSharesPopup(){const e="cmpy-mgmt-sell-shares-popup",t=this.corp.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.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).<br><br>Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.<br><br>The current price of your company's stock is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p"),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{type:"number",placeholder:"Shares to sell",margin:"5px",inputListener:()=>{var e=Math.round(i.value);if(isNaN(e)||e<=0)a.innerText="ERROR: Invalid value entered for number of shares to sell";else if(e>this.corp.numShares)a.innerText="You don't have this many shares to sell!";else{const t=this.corp.calculateShareSale(e),n=t[0];t[1],t[2];a.innerText="Sell "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"$0.000a")}}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{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_9__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else{if(!(t>this.corp.numShares)){const a=this.corp.calculateShareSale(t),i=a[0],r=a[1],o=a[2];if(this.corp.numShares-=t,isNaN(this.corp.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.corp.issuedShares),console.log("Converting to number now");var n=parseInt(this.corp.issuedShares);isNaN(n)?this.corp.issuedShares=0:this.corp.issuedShares=n}return this.corp.issuedShares+=t,this.corp.sharePrice=r,this.corp.shareSalesUntilPriceUpdate=o,this.corp.shareSaleCooldown=_Corporation__WEBPACK_IMPORTED_MODULE_1__.k,_Player__WEBPACK_IMPORTED_MODULE_5__.a.gainMoney(i),_Player__WEBPACK_IMPORTED_MODULE_5__.a.recordMoneySource(i,"corporation"),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(t,"0.000a")} shares for `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(i,"$0.000a")}. `+`The corporation's stock price fell to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(this.corp.sharePrice)} `+"as a result of dilution."),this.rerender(),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You don't have this many shares to sell")}}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(e,[n,a,i,r,o]),i.focus()}createThrowOfficePartyPopup(e){const t="cmpy-mgmt-throw-office-party-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerText:"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerText:"Throwing this party will cost a total of $0"});let i;const r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("input",{type:"number",margin:"5px",placeholder:"$ / employee",inputListener:()=>{if(isNaN(r.value)||r.value<0)a.innerText="Invalid value entered!";else{const t=r.value*e.employees.length;a.innerText="Throwing this party will cost a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}},onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_10__.KEY.ENTER&&i.click()}});i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:"std-button",innerText:"Throw Party",clickListener:()=>{if(isNaN(r.value)||r.value<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value entered");else{var n=r.value*e.employees.length;if(this.corp.funds.lt(n))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to throw this.corp party!");else{var a;this.corp.funds=this.corp.funds.minus(n);for(let t=0;t<e.employees.length;++t)a=e.employees[t].throwParty(r.value);Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You threw a party for the office! The morale and happiness of each employee increased by "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatPercentage(a-1)),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t)}}return!1}});const o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(t,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(t,[n,a,r,i,o]),r.focus()}createUpgradeOfficeSizePopup(e){const t="cmpy-mgmt-upgrade-office-size-popup",n=Math.round(e.size/_Corporation__WEBPACK_IMPORTED_MODULE_1__.h),a=_Corporation__WEBPACK_IMPORTED_MODULE_1__.g*Math.pow(1.09,n);let i=0;for(let e=0;e<5;++e)i+=Math.pow(1.09,n+e);const r=_Corporation__WEBPACK_IMPORTED_MODULE_1__.g*i;let o=this.corp.funds.dividedBy(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g).toNumber(),s=1;for(i=Math.pow(1.09,n);s<50&&!(i>=o);){let e=Math.pow(1.09,n+s);if(i+e>o)break;i+=e,++s}const l=_Corporation__WEBPACK_IMPORTED_MODULE_1__.g*i,c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerText:"Increase the size of your office space to fit additional employees!"}),u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("p",{innerText:"Upgrade size: "}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:this.corp.funds.lt(a)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 3",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"$0.000a"),clickListener:()=>(this.corp.funds.lt(a)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=_Corporation__WEBPACK_IMPORTED_MODULE_1__.h,this.corp.funds=this.corp.funds.minus(a),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:this.corp.funds.lt(r)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 15",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(r,"$0.000a"),clickListener:()=>(this.corp.funds.lt(r)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=5*_Corporation__WEBPACK_IMPORTED_MODULE_1__.h,this.corp.funds=this.corp.funds.minus(r),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_12__.createElement)("button",{class:this.corp.funds.lt(l)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by MAX ("+s*_Corporation__WEBPACK_IMPORTED_MODULE_1__.h+")",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(l,"$0.000a"),clickListener:()=>(this.corp.funds.lt(l)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=_Corporation__WEBPACK_IMPORTED_MODULE_1__.h*s,this.corp.funds=this.corp.funds.minus(l),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)}),d=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_15__.createPopupCloseButton)(t,{innerText:"Cancel"});d.style.margin="4px",Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_14__.createPopup)(t,[c,u,p,m,h,d])}purchaseWarehouse(e,t){const n=this.corp;n.funds.lt(_Corporation__WEBPACK_IMPORTED_MODULE_1__.m)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You do not have enough funds to do this!"):(e.warehouses[t]=new _Corporation__WEBPACK_IMPORTED_MODULE_1__.l({corp:n,industry:e,loc:t,size:_Corporation__WEBPACK_IMPORTED_MODULE_1__.n}),n.funds=n.funds.minus(_Corporation__WEBPACK_IMPORTED_MODULE_1__.m),this.rerender())}rerender(){this.corp.rerender()}}},function(e,t,n){"use strict";function a(e,t,n){return(t<=0||t>=1)&&console.warn(`Exponential factor is ${t}. This is not an intended value for it`),n<1&&console.warn(`Linear factor is ${n}. This is not an intended value for it`),Math.pow(e,t)+e/n}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateEffectWithFactors=a;t.EffectWithFactors=class{constructor(e,t){this.expFac=e,this.linearFac=t}calculate(e){return a(e,this.expFac,this.linearFac)}}},,,,,,,,,,,,,,,,,,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){},,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){},,function(e,t,n){},,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(167),i=n(13),r=n(17);class o extends a.Person{static fromJSON(e){return r.Generic_fromJSON(o,e.data)}constructor(){super()}getCost(){let e=this.hacking_exp+this.strength_exp+this.defense_exp+this.dexterity_exp+this.agility_exp+this.charisma_exp,t=0;for(let e=0;e<this.augmentations.length;++e){const n=i.Augmentations[this.augmentations[e].name];null!=n?t+=n.startingCost:console.error(`Could not find Augmentation ${this.augmentations[e].name}`)}return 25e3*e+t*Math.pow(1.2,this.augmentations.length)}toJSON(){return r.Generic_toJSON("Resleeve",this)}}t.Resleeve=o,r.Reviver.constructors.Resleeve=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(259),i=n(13),r=n(101),o=n(5),s=n(15);t.purchaseResleeve=function(e,t){const n=e.getCost();if(!t.canAfford(n))return!1;t.loseMoney(n),t.hacking_exp=e.hacking_exp,t.strength_exp=e.strength_exp,t.defense_exp=e.defense_exp,t.dexterity_exp=e.dexterity_exp,t.agility_exp=e.agility_exp,t.charisma_exp=e.charisma_exp;for(const e in i.Augmentations)i.Augmentations[e].owned=!1;for(let e=t.augmentations.length-1;e>=0;--e)t.augmentations[e].name!==o.AugmentationNames.NeuroFluxGovernor?t.augmentations.splice(e,1):i.Augmentations[o.AugmentationNames.NeuroFluxGovernor].owned=!0;for(let n=0;n<e.augmentations.length;++n)t.augmentations.push(new r.PlayerOwnedAugmentation(e.augmentations[n].name)),i.Augmentations[e.augmentations[n].name].owned=!0;for(let e=t.queuedAugmentations.length-1;e>=0;--e){const n=t.queuedAugmentations[e].name;t.augmentations.filter(e=>e.name!==o.AugmentationNames.NeuroFluxGovernor&&e.name===n).length>=1&&t.queuedAugmentations.splice(e,1)}return t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles(),!0},t.generateResleeves=function(){let e=[];for(let t=0;t<40;++t){let n=new a.Resleeve;const r=5*t+1;n.hacking_exp=r*s.getRandomInt(1e3,5e3),n.strength_exp=r*s.getRandomInt(1e3,5e3),n.defense_exp=r*s.getRandomInt(1e3,5e3),n.dexterity_exp=r*s.getRandomInt(1e3,5e3),n.agility_exp=r*s.getRandomInt(1e3,5e3),n.charisma_exp=r*s.getRandomInt(1e3,5e3);const l=Math.max(2,Math.ceil((t+3)/2)),c=s.getRandomInt(l,l+2),u=Object.keys(i.Augmentations);for(let e=0;e<c;++e){const e=s.getRandomInt(0,u.length-1),t=u[e];if(t===o.AugmentationNames.TheRedPill)continue;const a=i.Augmentations[t];n.augmentations.push({name:a.name,level:1}),n.applyAugmentation(i.Augmentations[t]),n.updateStatLevels(),u.splice(e,1)}e.push(n)}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SleeveFaq=["<strong><u>How do Duplicate Sleeves work?</strong></u><br>","Duplicate Sleeves are essentially clones. You can use them to perform any work type","action, such as working for a company/faction or committing a crime.","Having sleeves perform these tasks earns you money, experience, and reputation.<br><br>","Sleeves are their own individuals, which means they each have their own","experience and stats.<br><br>","When a sleeve earns experience, it earns experience for itself, the player's","original 'consciousness', as well as all of the player's other sleeves.<br><br>","<strong><u>What is Synchronization (Sync)?</strong></u><br>","Synchronization is a measure of how aligned your consciousness is with","that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and","it affects how much experience is earned when the sleeve is performing a task.<br><br>","Let N be the sleeve's synchronization. When the sleeve earns experience by performing a","task, both the sleeve and the player's original host consciousness earn N%","of the amount of experience normally earned by the task. All of the player's","other sleeves earn ((N/100)^2 * 100)% of the experience.<br><br>","Synchronization can be increased by assigning sleeves to the 'Synchronize' task.<br><br>","<strong><u>What is Shock?</u></strong><br>","Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new","body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates","no shock. Shock affects the amount of experience earned by the sleeve.<br><br>","Sleeve shock slowly decreases over time. You can further increase the rate at which","it decreases by assigning sleeves to the 'Shock Recovery' task.<br><br>","<strong><u>Why can't I work for this company or faction?</u></strong><br>","Only one of your sleeves can work for a given company/faction a time.","To clarify further, if you have two sleeves they can work for two different","companies, but they cannot both work for the same company.<br><br>","<strong><u>Why did my Sleeve stop working?</u></strong><br>","Sleeves are subject to the same time restrictions as you. This means that","they automatically stop working at a company after 8 hours, and stop working","for a faction after 20 hours.<br><br>","<strong><u>How do I buy Augmentations for my Sleeves?</u></strong><br>","Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations","for it.<br><br>","<strong><u>Why can't I buy the X Augmentation for my sleeve?</u></strong><br>","Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor,","are not available for sleeves.<br><br>","<strong><u>Do sleeves get reset when installing Augmentations or switching BitNodes?</u></strong><br>","Sleeves are reset when switching BitNodes, but not when installing Augmentations."].join(" ")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(13),i=n(5),r=n(14),o=n(3),s=n(9),l=n(4),c=n(37),u=n(55),p=n(26);t.createSleevePurchaseAugsPopup=function e(t,n){const m=t.augmentations.map(e=>e.name),h=[];for(const e of n.factions){if("Bladeburners"===e)continue;const t=r.Factions[e];if(null!=t)for(const e of t.augmentations){if(e===i.AugmentationNames.NeuroFluxGovernor)continue;if(m.includes(e))continue;const n=a.Augmentations[e];t.playerReputation>n.baseRepRequirement&&!h.includes(n)&&h.push(n)}}const d="purchase-sleeve-augs-popup",g=[u.createPopupCloseButton(d,{innerText:"Cancel"}),l.createElement("p",{display:"block",innerHTML:"Owned Augmentations:"})],_=l.createElement("div",{width:"70%"});for(const e of m){const t=a.Augmentations[e];null!=t?_.appendChild(l.createElement("div",{class:"gang-owned-upgrade",innerText:e,tooltip:t.info})):console.warn(`Invalid Augmentation: ${e}`)}g.push(_);const f=l.createElement("p",{innerHTML:["You can purchase Augmentations for your Duplicate Sleeves. These Augmentations","have the same effect as they would for you. You can only purchase Augmentations","that you have unlocked through Factions.<br><br>","When purchasing an Augmentation for a Duplicate Sleeve, they are immediately","installed. This means that the Duplicate Sleeve will immediately lose all of","its stat experience."].join(" ")});g.push(f);for(const a of h){const i=l.createElement("div",{class:"cmpy-mgmt-upgrade-div"});i.appendChild(l.createElement("p",{fontSize:"12px",innerHTML:[`<h2>${a.name}</h2><br>`,`Cost: ${o.numeralWrapper.formatMoney(a.startingCost)}<br><br>`,`${a.info}`].join(" "),padding:"2px",clickListener:()=>{n.canAfford(a.startingCost)?(n.loseMoney(a.startingCost),t.installAugmentation(a),s.dialogBoxCreate(`Installed ${a.name} on Duplicate Sleeve!`,!1),p.removeElementById(d),e(t,n)):s.dialogBoxCreate(`You cannot afford ${a.name}`,!1)}})),g.push(i)}c.createPopup(d,g)}},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(7);t.DarkWebItem=class{constructor(e,t,n){this.program=e,this.price=t,this.description=n}toString(){return[this.program,"$"+a.formatNumber(this.price,0),this.description].join(" - ")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serverMetadata=[{hackDifficulty:99,hostname:"ecorp",moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:"ECorp",requiredHackingSkill:{max:1400,min:1050},serverGrowth:99},{hackDifficulty:99,hostname:"megacorp",moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:"MegaCorp",requiredHackingSkill:{max:1350,min:1100},serverGrowth:99},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:"Bachman & Associates",requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:["beyond-man.lit"],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:"Blade Industries",requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55}},{hackDifficulty:99,hostname:"nwo",literature:["the-hidden-world.lit"],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:"New World Order",requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65}},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:["beyond-man.lit","cost-of-immortality.lit"],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:"Clarke Incorporated",requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45}},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:["coded-intelligence.lit","history-of-synthoids.lit"],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:"OmniTek Incorporated",requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95}},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:"FourSigma",requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75}},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:"KuaiGong International",requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90}},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:["simulated-reality.lit"],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:"Fulcrum Technologies",requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80}},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:"Fulcrum Technologies Assets",requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:"Fulcrum Secret Technologies Server"},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:"Storm Technologies",requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68}},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"DefComm",requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47}},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:["beyond-man.lit"],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:"Helios Labs",requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:90,min:80},hostname:"vitalife",literature:["A-Green-Tomorrow.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:"VitaLife",requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Icarus Microsystems",requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85}},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:"Universal Energy",requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80}},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:["coded-intelligence.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:["synthetic-muscles.lit"],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:["A-Green-Tomorrow.lit","brighter-than-the-sun.lit"],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:"Galactic Cybersystems",requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:90,min:80},hostname:"aerocorp",literature:["man-and-machine.lit"],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:"AeroCorp",requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55}},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:["history-of-synthoids.lit"],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:"Omnia Cybersystems",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60}},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:["synthetic-muscles.lit"],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:["A-Green-Tomorrow.lit","the-failed-frontier.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Solaris Space Systems",requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:85,min:75},hostname:"deltaone",moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:"Delta One",requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50}},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:["A-Green-Tomorrow.lit"],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:"Global Pharmaceuticals",requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80}},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"Nova Medical",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65}},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:"Lexo Corporation",requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55}},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:"Rho Construction",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40}},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:["sector-12-crime.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:"Alpha Enterprises",requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50}},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:"Aevum Police Network",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30}},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:["secret-societies.lit","the-failed-frontier.lit","tensions-in-tech-race.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:"Rothman University Network",requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35}},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:"ZB Institute of Technology Network",requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75}},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:["secret-societies.lit","the-failed-frontier.lit","synthetic-muscles.lit"],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Summit University Network",requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40}},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:"SysCore Securities",requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60}},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:["tensions-in-tech-race.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:"comptek",literature:["man-and-machine.lit"],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:"CompuTek",requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45}},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:["simulated-reality.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:"Netlink Technologies",requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45}},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:10,hostname:"foodnstuff",literature:["sector-12-crime.lit"],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"Food N Stuff Supermarket",requiredHackingSkill:1,serverGrowth:5},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Joe's Guns",requiredHackingSkill:10,serverGrowth:20},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:["the-hidden-world.lit"],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:["new-triads.lit"],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:["brighter-than-the-sun.lit"],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:["the-new-god.lit"],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:"Omega Software",requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30}},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27}},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:"Iron Gym Network",requiredHackingSkill:100,serverGrowth:20},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25}},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50}},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40}},{hackDifficulty:0,hostname:"run4theh111z",literature:["simulated-reality.lit","the-new-god.lit"],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"BitRunners Server"},{hackDifficulty:0,hostname:"I.I.I.I",literature:["democracy-is-dead.lit"],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:"The Black Hand Server"},{hackDifficulty:0,hostname:"avmnite-02h",literature:["democracy-is-dead.lit"],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:"NiteSec",requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:"NiteSec Server"},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"The Dark Army Server"},{hackDifficulty:0,hostname:"CSEC",literature:["democracy-is-dead.lit"],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:"CyberSec",requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:"CyberSec Server"},{hackDifficulty:0,hostname:"The-Cave",literature:["alpha-omega.lit"],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:"Daedalus Server"},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:"w0r1d_d43m0n"}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(15);t.getRandomByte=function(e){const t=Math.max(Math.min(e,255),0);return a.getRandomInt(0,t)}},function(e,t,n){!function(e){"use strict";e.registerHelper("lint","netscript",function(t,n){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),[];const a=t.split("\n");for(let e=0;e<a.length;++e)a[e].match(/.*async function.+{/g)?a[e]+=" // jshint ignore:line":a[e].match(/.*await.+;/g)&&(a[e]+=" // jshint ignore:line");const i=a.join("\n");n.indent||(n.indent=1),n.esversion=6,JSHINT(i,n,n.globals);var r=JSHINT.data().errors,o=[];return r&&function(t,n){for(var a=0;a<t.length;a++){var i=t[a];if(i){if(0==i.line)continue;if(i.line<0){window.console&&window.console.warn("Cannot display JSHint error (invalid line "+i.line+")",i);continue}var r=i.character-1,o=r+1;if(i.evidence){var s=i.evidence.substring(r).search(/.\b/);s>-1&&(o+=s)}var l={message:i.reason,severity:i.code&&i.code.startsWith("W")?"warning":"error",from:e.Pos(i.line-1,r),to:e.Pos(i.line-1,o)};n.push(l)}}}(r,o),o})}(n(52))},,,,function(e,t,n){!function(e){"use strict";e.defineMode("netscript",function(t,n){var a,i,r=t.indentUnit,o=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,p=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),a=e("keyword c"),i=e("keyword d"),r=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:a,void:a,throw:a,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:a,export:e("export"),import:e("import"),extends:a,await:a,hack:o,hackAnalyzeThreads:o,hackAnalyzePercent:o,hackChance:o,sleep:o,grow:o,weaken:o,growthAnalyze:o,print:o,tprint:o,scan:o,nuke:o,brutessh:o,ftpcrack:o,clearLog:o,disableLog:o,enableLog:o,isLogEnabled:o,getScriptLogs:o,relaysmtp:o,httpworm:o,sqlinject:o,run:o,exec:o,spawn:o,kill:o,killall:o,exit:o,scp:o,ls:o,ps:o,hasRootAccess:o,getIp:o,getHackingMultipliers:o,getBitNodeMultipliers:o,getStats:o,isBusy:o,getHacknetMultipliers:o,getHostname:o,getHackingLevel:o,getServerMoneyAvailable:o,getServerMaxMoney:o,getServerGrowth:o,getServerSecurityLevel:o,getServerBaseSecurityLevel:o,getServerMinSecurityLevel:o,getServerRequiredHackingLevel:o,getServerNumPortsRequired:o,getServerRam:o,serverExists:o,fileExists:o,isRunning:o,deleteServer:o,getPurchasedServers:o,getPurchasedServerLimit:o,getPurchasedServerMaxRam:o,getPurchasedServerCost:o,purchaseServer:o,round:o,write:o,tryWrite:o,read:o,peek:o,clear:o,rm:o,getPortHandle:o,scriptRunning:o,scriptKill:o,getScriptName:o,getScriptRam:o,getHackTime:o,getGrowTime:o,getWeakenTime:o,getScriptIncome:o,getScriptExpGain:o,getTimeSinceLastAug:o,prompt:o,universityCourse:o,getCharacterInformation:o,gymWorkout:o,travelToCity:o,purchaseTor:o,purchaseProgram:o,upgradeHomeRam:o,getUpgradeHomeRamCost:o,workForCompany:o,applyToCompany:o,getCompanyRep:o,getCompanyFavor:o,stopAction:o,getFactionFavor:o,getFavorToDonate:o,getFactionFavorGain:o,getCompanyFavorGain:o,checkFactionInvitations:o,joinFaction:o,workForFaction:o,getFactionRep:o,donateToFaction:o,createProgram:o,commitCrime:o,getCrimeChance:o,getOwnedAugmentations:o,getOwnedSourceFiles:o,getAugmentationsFromFaction:o,getAugmentationPrereq:o,getAugmentationCost:o,purchaseAugmentation:o,installAugmentations:o,getStockPrice:o,getStockPosition:o,getStockSymbols:o,getStockMaxShares:o,buyStock:o,sellStock:o,shortStock:o,sellShort:o,placeOrder:o,cancelOrder:o,getOrders:o,getStockVolatility:o,getStockForecast:o,purchase4SMarketData:o,purchase4SMarketDataTixApi:o,hacknet:o,numNodes:o,purchaseNode:o,getPurchaseNodeCost:o,getNodeStats:o,upgradeLevel:o,upgradeRam:o,upgradeCore:o,getLevelUpgradeCost:o,getRamUpgradeCost:o,getCoreUpgradeCost:o,gang:o,getMemberNames:o,getGangInformation:o,getMemberInformation:o,canRecruitMember:o,recruitMember:o,getTaskNames:o,setMemberTask:o,getEquipmentNames:o,getEquipmentCost:o,getEquipmentType:o,purchaseEquipment:o,ascendMember:o,setTerritoryWarfare:o,getChanceToWinClash:o,getBonusTime:o,bladeburner:o,getContractNames:o,getOperationNames:o,getBlackOpNames:o,getGeneralActionNames:o,getSkillNames:o,startAction:o,stopBladeburnerAction:o,getCurrentAction:o,getActionTime:o,getActionEstimatedSuccessChance:o,getActionCountRemaining:o,getActionMaxLevel:o,getActionCurrentLevel:o,getActionAutolevel:o,getActionRepGain:o,setActionAutolevel:o,setActionLevel:o,getRank:o,getBlackOpRank:o,getSkillPoints:o,getSkillLevel:o,getSkillUpgradeCost:o,upgradeSkill:o,getTeamSize:o,getCity:o,setTeamSize:o,getCityEstimatedPopulation:o,getCityEstimatedCommunities:o,getCityChaos:o,switchCity:o,getStamina:o,joinBladeburnerFaction:o,codingcontract:o,attempt:o,getContractType:o,getData:o,getDescription:o,getNumTriesRemaining:o,sleeve:o,getNumSleeves:o,setToShockRecovery:o,setToSynchronize:o,setToCommitCrime:o,setToUniversityCourse:o,travel:o,setToCompanyWork:o,setToFactionWork:o,setToGymWorkout:o,getSleeveStats:o,getTask:o,getInformation:o}}(),m=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function d(e,t,n){return a=e,i=n,t}function g(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=function(e){return function(t,n){var a,i=!1;if(s&&"@"==t.peek()&&t.match(h))return n.tokenize=g,d("jsonld-keyword","meta");for(;null!=(a=t.next())&&(a!=e||i);)i=!i&&"\\"==a;return i||(n.tokenize=g),d("string","string")}}(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return d("number","number");if("."==n&&e.match(".."))return d("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return d(n);if("="==n&&e.eat(">"))return d("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return d("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),d("number","number");if("/"==n)return e.eat("*")?(t.tokenize=_,_(e,t)):e.eat("/")?(e.skipToEnd(),d("comment","comment")):Ve(e,t,1)?(function(e){for(var t,n=!1,a=!1;null!=(t=e.next());){if(!n){if("/"==t&&!a)return;"["==t?a=!0:a&&"]"==t&&(a=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),d("regexp","string-2")):(e.eat("="),d("operator","operator",e.current()));if("`"==n)return t.tokenize=f,f(e,t);if("#"==n)return e.skipToEnd(),d("error","error");if(m.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),d("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var a=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(a)){var i=p[a];return d(i.type,i.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return d("async","keyword",a)}return d("variable","variable",a)}}function _(e,t){for(var n,a=!1;n=e.next();){if("/"==n&&a){t.tokenize=g;break}a="*"==n}return d("comment","comment")}function f(e,t){for(var n,a=!1;null!=(n=e.next());){if(!a&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}a=!a&&"\\"==n}return d("quasi","string-2",e.current())}var y="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var a=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));a&&(n=a.index)}for(var i=0,r=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),l=y.indexOf(s);if(l>=0&&l<3){if(!i){++o;break}if(0==--i){"("==s&&(r=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))r=!0;else{if(/["'\/]/.test(s))return;if(r&&!i){++o;break}}}r&&!i&&(t.fatArrowAt=o)}}var v={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function E(e,t,n,a,i,r){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=r,null!=a&&(this.align=a)}function k(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var a=e.context;a;a=a.prev)for(var n=a.vars;n;n=n.next)if(n.name==t)return!0}var C={state:null,column:null,marked:null,cc:null};function T(){for(var e=arguments.length-1;e>=0;e--)C.cc.push(arguments[e])}function O(){return T.apply(null,arguments),!0}function S(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function M(e){var t=C.state;if(C.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var a=function e(t,n){if(n){if(n.block){var a=e(t,n.prev);return a?a==n.prev?n:new A(a,n.vars,!0):null}return S(t,n.vars)?n:new A(n.prev,new w(t,n.vars),!1)}return null}(e,t.context);if(null!=a)return void(t.context=a)}else if(!S(e,t.localVars))return void(t.localVars=new w(e,t.localVars));n.globalVars&&!S(e,t.globalVars)&&(t.globalVars=new w(e,t.globalVars))}function P(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,n){this.prev=e,this.vars=t,this.block=n}function w(e,t){this.name=e,this.next=t}var x=new w("this",new w("arguments",null));function R(){C.state.context=new A(C.state.context,C.state.localVars,!1),C.state.localVars=x}function N(){C.state.context=new A(C.state.context,C.state.localVars,!0),C.state.localVars=null}function I(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function L(e,t){var n=function(){var n=C.state,a=n.indented;if("stat"==n.lexical.type)a=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)a=i.indented;n.lexical=new E(a,C.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function D(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function B(e){return function t(n){return n==e?O():";"==e||"}"==n||")"==n||"]"==n?T():O(t)}}function W(e,t){return"var"==e?O(L("vardef",t),ye,B(";"),D):"keyword a"==e?O(L("form"),H,W,D):"keyword b"==e?O(L("form"),W,D):"keyword d"==e?C.stream.match(/^\s*$/,!1)?O():O(L("stat"),K,B(";"),D):"debugger"==e?O(B(";")):"{"==e?O(L("}"),N,oe,D,I):";"==e?O():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==D&&C.state.cc.pop()(),O(L("form"),H,W,D,Te)):"function"==e?O(we):"for"==e?O(L("form"),Oe,W,D):"class"==e||c&&"interface"==t?(C.marked="keyword",O(L("form","class"==e?e:t),Le,D)):"variable"==e?c&&"declare"==t?(C.marked="keyword",O(W)):c&&("module"==t||"enum"==t||"type"==t)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==t?O(Ye):"type"==t?O(Re,B("operator"),ue,B(";")):O(L("form"),be,B("{"),L("}"),oe,D,D)):c&&"namespace"==t?(C.marked="keyword",O(L("form"),F,W,D)):c&&"abstract"==t?(C.marked="keyword",O(W)):O(L("stat"),Z):"switch"==e?O(L("form"),H,B("{"),L("}","switch"),N,oe,D,D,I):"case"==e?O(F,B(":")):"default"==e?O(B(":")):"catch"==e?O(L("form"),R,j,W,D,I):"export"==e?O(L("stat"),je,D):"import"==e?O(L("stat"),Ue,D):"async"==e?O(W):"@"==t?O(F,W):T(L("stat"),F,B(";"),D)}function j(e){if("("==e)return O(Ne,B(")"))}function F(e,t){return G(e,t,!1)}function U(e,t){return G(e,t,!0)}function H(e){return"("!=e?T():O(L(")"),F,B(")"),D)}function G(e,t,n){if(C.state.fatArrowAt==C.stream.start){var a=n?J:V;if("("==e)return O(R,L(")"),ie(Ne,")"),D,B("=>"),a,I);if("variable"==e)return T(R,be,B("=>"),a,I)}var i=n?$:q;return v.hasOwnProperty(e)?O(i):"function"==e?O(we,i):"class"==e||c&&"interface"==t?(C.marked="keyword",O(L("form"),Ie,D)):"keyword c"==e||"async"==e?O(n?U:F):"("==e?O(L(")"),K,B(")"),D,i):"operator"==e||"spread"==e?O(n?U:F):"["==e?O(L("]"),$e,D,i):"{"==e?re(te,"}",null,i):"quasi"==e?T(Y,i):"new"==e?O(function(e){return function(t){return"."==t?O(e?Q:X):"variable"==t&&c?O(ge,e?$:q):T(e?U:F)}}(n)):"import"==e?O(F):O()}function K(e){return e.match(/[;\}\)\],]/)?T():T(F)}function q(e,t){return","==e?O(F):$(e,t,!1)}function $(e,t,n){var a=0==n?q:$,i=0==n?F:U;return"=>"==e?O(R,n?J:V,I):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?O(a):c&&"<"==t&&C.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?O(L(">"),ie(ue,">"),D,a):"?"==t?O(F,B(":"),i):O(i):"quasi"==e?T(Y,a):";"!=e?"("==e?re(U,")","call",a):"."==e?O(ee,a):"["==e?O(L("]"),K,B("]"),D,a):c&&"as"==t?(C.marked="keyword",O(ue,a)):"regexp"==e?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),O(i)):void 0:void 0}function Y(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?O(Y):O(F,z)}function z(e){if("}"==e)return C.marked="string-2",C.state.tokenize=f,O(Y)}function V(e){return b(C.stream,C.state),T("{"==e?W:F)}function J(e){return b(C.stream,C.state),T("{"==e?W:U)}function X(e,t){if("target"==t)return C.marked="keyword",O(q)}function Q(e,t){if("target"==t)return C.marked="keyword",O($)}function Z(e){return":"==e?O(D,W):T(q,B(";"),D)}function ee(e){if("variable"==e)return C.marked="property",O()}function te(e,t){if("async"==e)return C.marked="property",O(te);if("variable"==e||"keyword"==C.style){return C.marked="property","get"==t||"set"==t?O(ne):(c&&C.state.fatArrowAt==C.stream.start&&(n=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+n[0].length),O(ae));var n}else{if("number"==e||"string"==e)return C.marked=s?"property":C.style+" property",O(ae);if("jsonld-keyword"==e)return O(ae);if(c&&P(t))return C.marked="keyword",O(te);if("["==e)return O(F,se,B("]"),ae);if("spread"==e)return O(U,ae);if("*"==t)return C.marked="keyword",O(te);if(":"==e)return T(ae)}}function ne(e){return"variable"!=e?T(ae):(C.marked="property",O(we))}function ae(e){return":"==e?O(U):"("==e?T(we):void 0}function ie(e,t,n){function a(i,r){if(n?n.indexOf(i)>-1:","==i){var o=C.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),O(function(n,a){return n==t||a==t?T():T(e)},a)}return i==t||r==t?O():n&&n.indexOf(";")>-1?T(e):O(B(t))}return function(n,i){return n==t||i==t?O():T(e,a)}}function re(e,t,n){for(var a=3;a<arguments.length;a++)C.cc.push(arguments[a]);return O(L(t,n),ie(e,t),D)}function oe(e){return"}"==e?O():T(W,oe)}function se(e,t){if(c){if(":"==e||"in"==t)return O(ue);if("?"==t)return O(se)}}function le(e){if(c&&":"==e)return C.stream.match(/^\s*\w+\s+is\b/,!1)?O(F,ce,ue):O(ue)}function ce(e,t){if("is"==t)return C.marked="keyword",O()}function ue(e,t){return"keyof"==t||"typeof"==t||"infer"==t?(C.marked="keyword",O("typeof"==t?U:ue)):"variable"==e||"void"==t?(C.marked="type",O(de)):"string"==e||"number"==e||"atom"==e?O(de):"["==e?O(L("]"),ie(ue,"]",","),D,de):"{"==e?O(L("}"),ie(me,"}",",;"),D,de):"("==e?O(ie(he,")"),pe,de):"<"==e?O(ie(ue,">"),ue):void 0}function pe(e){if("=>"==e)return O(ue)}function me(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",O(me)):"?"==t||"number"==e||"string"==e?O(me):":"==e?O(ue):"["==e?O(B("variable"),se,B("]"),me):"("==e?T(xe,me):void 0}function he(e,t){return"variable"==e&&C.stream.match(/^\s*[?:]/,!1)||"?"==t?O(he):":"==e?O(ue):"spread"==e?O(he):T(ue)}function de(e,t){return"<"==t?O(L(">"),ie(ue,">"),D,de):"|"==t||"."==e||"&"==t?O(ue):"["==e?O(ue,B("]"),de):"extends"==t||"implements"==t?(C.marked="keyword",O(ue)):"?"==t?O(ue,B(":"),ue):void 0}function ge(e,t){if("<"==t)return O(L(">"),ie(ue,">"),D,de)}function _e(){return T(ue,fe)}function fe(e,t){if("="==t)return O(ue)}function ye(e,t){return"enum"==t?(C.marked="keyword",O(Ye)):T(be,se,ke,Ce)}function be(e,t){return c&&P(t)?(C.marked="keyword",O(be)):"variable"==e?(M(t),O()):"spread"==e?O(be):"["==e?re(Ee,"]"):"{"==e?re(ve,"}"):void 0}function ve(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),"spread"==e?O(be):"}"==e?T():"["==e?O(F,B("]"),B(":"),ve):O(B(":"),be,ke)):(M(t),O(ke))}function Ee(){return T(be,ke)}function ke(e,t){if("="==t)return O(U)}function Ce(e){if(","==e)return O(ye)}function Te(e,t){if("keyword b"==e&&"else"==t)return O(L("form","else"),W,D)}function Oe(e,t){return"await"==t?O(Oe):"("==e?O(L(")"),Se,B(")"),D):void 0}function Se(e){return"var"==e?O(ye,B(";"),Pe):";"==e?O(Pe):"variable"==e?O(Me):T(F,B(";"),Pe)}function Me(e,t){return"in"==t||"of"==t?(C.marked="keyword",O(F)):O(q,Pe)}function Pe(e,t){return";"==e?O(Ae):"in"==t||"of"==t?(C.marked="keyword",O(F)):T(F,B(";"),Ae)}function Ae(e){")"!=e&&O(F)}function we(e,t){return"*"==t?(C.marked="keyword",O(we)):"variable"==e?(M(t),O(we)):"("==e?O(R,L(")"),ie(Ne,")"),D,le,W,I):c&&"<"==t?O(L(">"),ie(_e,">"),D,we):void 0}function xe(e,t){return"*"==t?(C.marked="keyword",O(xe)):"variable"==e?(M(t),O(xe)):"("==e?O(R,L(")"),ie(Ne,")"),D,le,I):c&&"<"==t?O(L(">"),ie(_e,">"),D,xe):void 0}function Re(e,t){return"keyword"==e||"variable"==e?(C.marked="type",O(Re)):"<"==t?O(L(">"),ie(_e,">"),D):void 0}function Ne(e,t){return"@"==t&&O(F,Ne),"spread"==e?O(Ne):c&&P(t)?(C.marked="keyword",O(Ne)):T(be,se,ke)}function Ie(e,t){return"variable"==e?Le(e,t):De(e,t)}function Le(e,t){if("variable"==e)return M(t),O(De)}function De(e,t){return"<"==t?O(L(">"),ie(_e,">"),D,De):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(C.marked="keyword"),O(c?ue:F,De)):"{"==e?O(L("}"),Be,D):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&P(t))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",O(Be)):"variable"==e||"keyword"==C.style?(C.marked="property",O(c?We:we,Be)):"number"==e||"string"==e?O(c?We:we,Be):"["==e?O(F,se,B("]"),c?We:we,Be):"*"==t?(C.marked="keyword",O(Be)):c&&"("==e?T(xe,Be):";"==e||","==e?O(Be):"}"==e?O():"@"==t?O(F,Be):void 0}function We(e,t){if("?"==t)return O(We);if(":"==e)return O(ue,ke);if("="==t)return O(U);var n=C.state.lexical.prev,a=n&&"interface"==n.info;return T(a?xe:we)}function je(e,t){return"*"==t?(C.marked="keyword",O(qe,B(";"))):"default"==t?(C.marked="keyword",O(F,B(";"))):"{"==e?O(ie(Fe,"}"),qe,B(";")):T(W)}function Fe(e,t){return"as"==t?(C.marked="keyword",O(B("variable"))):"variable"==e?T(U,Fe):void 0}function Ue(e){return"string"==e?O():"("==e?T(F):T(He,Ge,qe)}function He(e,t){return"{"==e?re(He,"}"):("variable"==e&&M(t),"*"==t&&(C.marked="keyword"),O(Ke))}function Ge(e){if(","==e)return O(He,Ge)}function Ke(e,t){if("as"==t)return C.marked="keyword",O(He)}function qe(e,t){if("from"==t)return C.marked="keyword",O(F)}function $e(e){return"]"==e?O():T(ie(U,"]"))}function Ye(){return T(L("form"),be,B("{"),L("}"),ie(ze,"}"),D,D)}function ze(){return T(be,ke)}function Ve(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=!0,D.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new E((e||0)-r,0,"block",!1),localVars:n.localVars,context:n.localVars&&new A(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=_&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==a?n:(t.lastType="operator"!=a||"++"!=i&&"--"!=i?a:"incdec",function(e,t,n,a,i){var r=e.cc;for(C.state=e,C.stream=i,C.marked=null,C.cc=r,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var o=r.length?r.pop():l?F:W;if(o(n,a)){for(;r.length&&r[r.length-1].lex;)r.pop()();return C.marked?C.marked:"variable"==n&&k(e,a)?"variable-2":t}}}(t,n,a,i,e))},indent:function(t,a){if(t.tokenize==_)return e.Pass;if(t.tokenize!=g)return 0;var i,s=a&&a.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(a))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==D)l=l.prev;else if(u!=Te)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==q||i==$)&&!/^[,\.=+\-*:?[\(]/.test(a));)l=l.prev;o&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var p=l.type,h=s==p;return"vardef"==p?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==p&&"{"==s?l.indented:"form"==p?l.indented+r:"stat"==p?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||m.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,a)?o||r:0):"switch"!=l.info||h||0==n.doubleIndentSwitch?l.align?l.column+(h?0:1):l.indented+(h?0:r):l.indented+(/^(?:case|default)\b/.test(a)?r:2*r)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"netscript",jsonldMode:s,jsonMode:l,expressionAllowed:Ve,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=F&&t!=U||e.cc.pop()}}}),e.registerHelper("wordChars","netscript",/[\w$]/),e.defineMIME("text/netscript","netscript"),e.defineMIME("text/ecmascript","netscript"),e.defineMIME("application/netscript","netscript"),e.defineMIME("application/x-netscript","netscript"),e.defineMIME("application/ecmascript","netscript"),e.defineMIME("application/json",{name:"netscript",json:!0}),e.defineMIME("application/x-json",{name:"netscript",json:!0}),e.defineMIME("application/ld+json",{name:"netscript",jsonld:!0}),e.defineMIME("text/typescript",{name:"netscript",typescript:!0}),e.defineMIME("application/typescript",{name:"netscript",typescript:!0})}(n(52))},,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|hackAnalyzeThreads|hackAnalyzePercent|hackChance|sleep|grow|weaken|growthAnalyze|print|tprint|scan|nuke|brutessh|ftpcrack|clearLog|disableLog|enableLog|isLogEnabled|getScriptLogs|relaysmtp|httpworm|sqlinject|run|exec|spawn|kill|killall|exit|scp|ls|ps|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|tryWrite|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|donateToFaction|createProgram|commitCrime|getCrimeChance|getOwnedAugmentations|getOwnedSourceFiles|getAugmentationsFromFaction|getAugmentationPrereq|getAugmentationCost|purchaseAugmentation|installAugmentations|getStockPrice|getStockPosition|getStockSymbols|getStockMaxShares|buyStock|sellStock|shortStock|sellShort|placeOrder|cancelOrder|getOrders|getStockVolatility|getStockForecast|purchase4SMarketData|purchase4SMarketDataTixApi|hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|upgradeLevel|upgradeRam|upgradeCore|getLevelUpgradeCost|getRamUpgradeCost|getCoreUpgradeCost|gang|getMemberNames|getGangInformation|getMemberInformation|canRecruitMember|recruitMember|getTaskNames|setMemberTask|getEquipmentNames|getEquipmentCost|getEquipmentType|purchaseEquipment|ascendMember|setTerritoryWarfare|getChanceToWinClash|getBonusTime|bladeburner|getContractNames|getOperationNames|getBlackOpNames|getGeneralActionNames|getSkillNames|startAction|stopBladeburnerAction|getActionTime|getActionEstimatedSuccessChance|getActionCountRemaining|getActionMaxLevel|getActionCurrentLevel|getActionAutolevel|getActionRepGain|setActionAutolevel|setActionLevel|getBlackOpRank|getRank|getSkillPoints|getSkillLevel|getSkillUpgradeCost|upgradeSkill|getTeamSize|getCity|getCurrentAction|setTeamSize|getCityEstimatedPopulation|getCityEstimatedCommunities|getCityChaos|switchCity|getStamina|joinBladeburnerFaction|getBonusTime|codingcontract|attempt|getContractType|getData|getDescription|getNumTriesRemaining|sleeve|getNumSleeves|setToShockRecovery|setToSynchronize|setToCommitCrime|setToUniversityCourse|travel|setToCompanyWork|setToFactionWork|setToGymWorkout|getSleeveStats|getTask|getInformation";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:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",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();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(a>c)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;++n<r;){t=e.getLine(n);var c=s.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>o)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,p=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new c,this.foldingRules=new u};i.inherits(p,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(281),"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(p.prototype),t.Mode=p})},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(15);function i(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function r(e){let t=e;return(t.startsWith('"')||t.startsWith("'"))&&(t=t.slice(1)),(t.endsWith('"')||t.endsWith("'"))&&(t=t.slice(0,-1)),t}function o(e){const t=[];return e.forEach(e=>{let n=e.toString();n=["[",n,"]"].join(""),t.push(n)}),t.join(",").replace(/\s/g,"")}t.codingContractTypesMetadata=[{desc:e=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${e}?`].join(" "),difficulty:1,gen:()=>a.getRandomInt(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let n=2,a=e;for(;a>n;)a%n==0?(a=Math.round(a/n),n=2):++n;return n===parseInt(t,10)}},{desc:e=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",`${e.toString()}`].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(5,40),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(-10,10);return t},name:"Subarray with Maximum Sum",numTries:10,solver:(e,t)=>{const n=e.slice();for(let e=1;e<n.length;e++)n[e]=Math.max(n[e],n[e]+n[e-1]);return parseInt(t,10)===Math.max(...n)}},{desc:e=>["It is possible write four as a sum in exactly four different ways:\n\n"," 3 + 1\n"," 2 + 2\n"," 2 + 1 + 1\n"," 1 + 1 + 1 + 1\n\n",`How many different ways can the number ${e} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>a.getRandomInt(8,100),name:"Total Ways to Sum",numTries:10,solver:(e,t)=>{const n=[1];n.length=e+1,n.fill(0,1);for(let t=1;t<e;++t)for(let a=t;a<=e;++a)n[a]+=n[a-t];return n[e]===parseInt(t,10)}},{desc:e=>{let t=["Given the following array of array of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");for(const n of e)t+=`${n.toString()},\n`;return t+=["\nHere is an example of what spiral order should be:","\nExample:"," [\n"," [1, 2, 3],\n"," [4, 5, 6],\n"," [7, 8, 9]\n"," ] should result in [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n"," [\n"," [1, 2, 3, 4]\n"," [5, 6, 7, 8]\n"," [9, 10, 11, 12]\n"," ] should result in [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7"].join(" ")},difficulty:2,gen:()=>{const e=a.getRandomInt(1,15),t=a.getRandomInt(1,15),n=[];n.length=e;for(let a=0;a<e;++a)n[a]=[],n[a].length=t;for(let i=0;i<e;++i)for(let e=0;e<t;++e)n[i][e]=a.getRandomInt(1,50);return n},name:"Spiralize Matrix",numTries:10,solver:(e,t)=>{const n=[];let a=0,r=e.length-1,o=0,s=e[0].length-1,l=0;for(;;){for(let t=o;t<=s;t++)n[l]=e[a][t],++l;if(++a>r)break;for(let t=a;t<=r;t++)n[l]=e[t][s],++l;if(--s<o)break;for(let t=s;t>=o;t--)n[l]=e[r][t],++l;if(--r<a)break;for(let t=r;t>=a;t--)n[l]=e[t][o],++l;if(++o>s)break}const c=i(t).replace(/\s/g,"").split(",");for(let e=0;e<c.length;++e)c[e]=parseInt(c[e],10);if(n.length!==c.length)return!1;for(let e=0;e<n.length;++e)if(n[e]!==c[e])return!1;return!0}},{desc:e=>["You are given the following array of integers:\n\n",`${e}\n\n`,"Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index exactly.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const e=a.getRandomInt(1,25),t=[];t.length=e;for(let e=0;e<t.length;++e)Math.random()<.2?t[e]=0:t[e]=a.getRandomInt(0,10);return t},name:"Array Jumping Game",numTries:1,solver:(e,t)=>{const n=e.length;let a=0;for(let t=0;a<n&&a<=t;++a)t=Math.max(a+e[a],t);const i=a===n;return!("1"!==t||!i)||"0"===t&&!i}},{desc:e=>["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(e)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const e=[],t=a.getRandomInt(1,20);for(let n=0;n<t;++n){const t=a.getRandomInt(1,25),n=t+a.getRandomInt(1,10);e.push([t,n])}return e},name:"Merge Overlapping Intervals",numTries:15,solver:(e,t)=>{const n=e.slice();n.sort((e,t)=>e[0]-t[0]);const a=[];let r=n[0][0],s=n[0][1];for(const e of n)e[0]<=s?s=Math.max(s,e[1]):(a.push([r,s]),r=e[0],s=e[1]);a.push([r,s]);const l=o(a),c=t.replace(/\s/g,"");return l===c||l===i(c)}},{desc:e=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",`${e}\n\n`,"Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let e="";for(let t=0;t<4;++t){e+=a.getRandomInt(0,255).toString()}return e},name:"Generate IP Addresses",numTries:10,solver:(e,t)=>{const n=[];for(let t=1;t<=3;++t)for(let a=1;a<=3;++a)for(let i=1;i<=3;++i)for(let r=1;r<=3;++r)if(t+a+i+r===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+a),10),l=parseInt(e.substring(t+a,t+a+i),10),c=parseInt(e.substring(t+a+i,t+a+i+r),10);if(o<=255&&s<=255&&l<=255&&c<=255){const t=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");t.length===e.length+3&&n.push(t)}}const a=i(t).replace(/\s/g,"").split(",");if(a.length!==n.length)return!1;for(const e of a)if(!n.includes(e))return!1;return!0}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(1,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader I",numTries:5,solver:(e,t)=>{let n=0,a=0;for(let t=1;t<e.length;++t)n=Math.max(0,n+=e[t]-e[t-1]),a=Math.max(n,a);return a.toString()===t}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const e=a.getRandomInt(1,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader II",numTries:10,solver:(e,t)=>{let n=0;for(let t=1;t<e.length;++t)n+=Math.max(e[t]-e[t-1],0);return n.toString()===t}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const e=a.getRandomInt(1,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=a.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader III",numTries:10,solver:(e,t)=>{let n=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,i=0,r=0;for(const t of e)r=Math.max(r,a+t),a=Math.max(a,i-t),i=Math.max(i,n+t),n=Math.max(n,-1*t);return r.toString()===t}},{desc:e=>{return["You are given the following array with two elements:\n\n",`[${e[0]}, [${e[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" ")},difficulty:8,gen:()=>{const e=a.getRandomInt(2,10),t=a.getRandomInt(1,50),n=[];n.length=t;for(let e=0;e<t;++e)n[e]=a.getRandomInt(1,200);return[e,n]},name:"Algorithmic Stock Trader IV",numTries:10,solver:(e,t)=>{const n=e[0],a=e[1],i=a.length;if(i<2)return 0===parseInt(t);if(n>i/2){let e=0;for(let t=1;t<i;++t)e+=Math.max(a[t]-a[t-1],0);return parseInt(t)===e}const r=[],o=[];r.length=n+1,o.length=n+1;for(let e=0;e<=n;++e)r[e]=Number.MIN_SAFE_INTEGER,o[e]=0;let s;for(let e=0;e<i;++e){s=a[e];for(let e=n;e>0;--e)o[e]=Math.max(o[e],r[e]+s),r[e]=Math.max(r[e],o[e-1]-s)}return parseInt(t)===o[n]}},{desc:e=>{return["Given a triangle, find the minimum path sum from top to bottom. In each step","of the path, you may only move to adjacent numbers in the row below.","The triangle is represented as a 2D array of numbers:\n\n",`${function(e){return["[\n",function e(t,n=0){const a=t.length;if(n>=a)return"";let i=[" ".repeat(a-n+1),"[",t[n].toString(),"]"].join("");return n<a-1&&(i+=","),i+"\n"+e(t,n+1)}(e),"]"].join("")}(e)}\n\n`,"Example: If you are given the following triangle:\n\n[\n"," [2],\n"," [3,4],\n"," [6,5,7],\n"," [4,1,8,3]\n","]\n\n","The minimum path sum is 11 (2 -> 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=a.getRandomInt(1,12);e.length=t;for(let n=0;n<t;++n){e[n]=[],e[n].length=n+1;for(let t=0;t<e[n].length;++t)e[n][t]=a.getRandomInt(1,9)}return e},name:"Minimum Path Sum in a Triangle",numTries:10,solver:(e,t)=>{let n=e.length,a=e[n-1];for(let t=n-2;t>-1;--t)for(let n=0;n<e[t].length;++n)a[n]=Math.min(a[n],a[n+1])+e[t][n];return a[0]===parseInt(t)}},{desc:e=>{const t=e[0],n=e[1];return["You are in a grid with",`${t} rows and ${n} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number or rows and columns:\n\n",`[${t}, ${n}]`].join(" ")},difficulty:3,gen:()=>{return[a.getRandomInt(1,14),a.getRandomInt(1,14)]},name:"Unique Paths in a Grid I",numTries:10,solver:(e,t)=>{let n=e[0],a=e[1],i=[];i.length=n;for(let e=0;e<n;e++)i[e]=1;for(let e=1;e<a;e++)for(let e=1;e<n;e++)i[e]+=i[e-1];return parseInt(t)===i[n-1]}},{desc:e=>{let t="";for(const n of e)t+=`${n.toString()},\n`;return["You are located in the top-left corner of the following grid:\n\n",`${t}\n`,"You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const e=a.getRandomInt(1,12),t=a.getRandomInt(1,12),n=[];n.length=e;for(let a=0;a<e;++a)n[a]=[],n[a].length=t,n[a].fill(0);for(let a=0;a<e;++a)for(let i=0;i<t;++i)0===a&&0===i||a===e-1&&i===t-1||Math.random()<.15&&(n[a][i]=1);return n},name:"Unique Paths in a Grid II",numTries:10,solver:(e,t)=>{let n=[];n.length=e.length;for(let t=0;t<n.length;++t)n[t]=e[t].slice();for(let e=0;e<n.length;e++)for(let t=0;t<n[0].length;t++)1==n[e][t]?n[e][t]=0:0==e&&0==t?n[0][0]=1:n[e][t]=(e>0?n[e-1][t]:0)+(t>0?n[e][t-1]:0);return n[n.length-1][n[0].length-1]===parseInt(t)}},{desc:e=>["Given the following string:\n\n",`${e}\n\n`,"remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> ["()()()", "(())()"]\n','"(a)())()" -> ["(a)()()", "(a())()"]\n','")( -> [""]'].join(" "),difficulty:10,gen:()=>{const e=a.getRandomInt(2,20);let t=[];t.length=e,Math.random()<.8?t[0]="(":t[0]=")";for(let n=1;n<e;++n){const e=Math.random();t[n]=e<.4?"(":e<.8?")":"a"}return t.join("")},name:"Sanitize Parentheses in Expression",numTries:10,solver:(e,t)=>{let n=0,a=0,r=[];for(let t=0;t<e.length;++t)"("===e[t]?++n:")"===e[t]&&(n>0?--n:++a);!function e(t,n,a,i,r,o,s){if(r.length!==n)"("===r[n]?(a>0&&e(t,n+1,a-1,i,r,o,s),e(t+1,n+1,a,i,r,o+r[n],s)):")"===r[n]?(i>0&&e(t,n+1,a,i-1,r,o,s),t>0&&e(t-1,n+1,a,i,r,o+r[n],s)):e(t,n+1,a,i,r,o+r[n],s);else if(0===a&&0===i&&0===t){for(var l=0;l<s.length;l++)if(s[l]===o)return;s.push(o)}}(0,0,n,a,e,"",r);const o=i(t).replace(/\s/g,"").split(",");if(o.length!==r.length)return!1;for(const e of r)if(!o.includes(e))return!1;return!0}},{desc:e=>{const t=e[0],n=e[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",`${t}\n\n`,`You are also given a target number of ${n}. Return all possible ways`,"you can add the +, -, and * operators to the string such that it evaluates","to the target number.\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${t}", ${n}]\n\n`,"Examples:\n\n",'Input: digits = "123", target = 6\n','Output: ["1+2+3", "1*2*3"]\n\n','Input: digits = "105", target = 5\n','Output: ["1*0+5", "10-5"]'].join(" ")},difficulty:10,gen:()=>{const e=a.getRandomInt(4,12),t=[];t.length=e;for(let e=0;e<t.length;++e)t[e]=0===e?String(a.getRandomInt(1,9)):String(a.getRandomInt(0,9));const n=a.getRandomInt(-100,100);return[t.join(""),n]},name:"Find All Valid Math Expressions",numTries:10,solver:(e,t)=>{const n=e[0],a=e[1];const o=i(t).split(",");for(let e=0;e<o.length;++e)o[e]=r(o[e]).replace(/\s/g,"");if(null==n||0===n.length)return 0===o.length||1===o.length&&""===o[0];let s=[];!function e(t,n,a,i,r,o,s){if(r!==a.length)for(let l=r;l<a.length&&(l==r||"0"!=a[r]);++l){let c=parseInt(a.substring(r,l+1));0===r?e(t,n+c,a,i,l+1,c,c):(e(t,n+"+"+c,a,i,l+1,o+c,c),e(t,n+"-"+c,a,i,l+1,o-c,-c),e(t,n+"*"+c,a,i,l+1,o-s+s*c,s*c))}else i===o&&t.push(n)}(s,"",n,a,0,0,0);for(const e of s)if(!o.includes(e))return!1;return!0}}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1);function i(e){return function(t){return t.hacking_skill>=e}}t.programsMetadata=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:i(1),time:a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:i(50),time:2*a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:i(100),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:i(250),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:i(500),time:a.CONSTANTS.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:i(750),time:a.CONSTANTS.MillisecondsPer8Hours}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:i(75),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:i(400),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:i(75),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:i(25),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:a.CONSTANTS.MillisecondsPerFiveMinutes/20}},{key:"Flight",name:"fl1ght.exe",create:null}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Program=class{constructor(e,t){this.name="",this.name=e,this.create=t}htmlID(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(89);t.createCityMap=function(e){const t={},n=Object.values(a.Cities);for(let a=0;a<n.length;++a)t[n[a]]=e;return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(27);t.ProductRatingWeights={[a.Industries.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[a.Industries.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[a.Industries.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[a.Industries.Computer]:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},Computer:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},[a.Industries.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[a.Industries.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[a.Industries.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[a.Industries.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(133),i=n(3);t.Node=class{constructor(e={cost:0,text:""}){if(this.children=[],this.cost=0,this.researched=!1,this.parent=null,this.text="",null==a.ResearchMap[e.text])throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${e.text}`);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t<this.children.length;++t)e.push(this.children[t].createTreantMarkup());let t="";t=this.researched?"researched":this.parent&&!1===this.parent.researched?"locked":"unlocked";const n=a.ResearchMap[this.text];return{children:e,HTMLclass:t,innerHTML:`<div id="${this.text.replace(/\s/g,"")}-corp-research-click-listener" class="tooltip">`+`${this.text}<br>${i.numeralWrapper.format(this.cost,"0,0")} Scientific Research`+'<span class="tooltiptext">'+`${n.desc}`+"</span></div>",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let n=0;n<this.children.length;++n)if(null!=(t=this.children[n].findNode(e)))return t;return null}setParent(e){this.parent=e}};t.ResearchTree=class{constructor(){this.researched={},this.root=null}createTreantMarkup(){return null==this.root?{}:{chart:{container:""},nodeStructure:this.root.createTreantMarkup()}}getAllNodes(){const e=[],t=[];if(null==this.root)return e;for(t.push(this.root);0!==t.length;){const n=t.shift();if(null!=n){e.push(n.text);for(let e=0;e<n.children.length;++e)t.push(n.children[e])}}return e}getAdvertisingMultiplier(){return this.getMultiplierHelper("advertisingMult")}getEmployeeChaMultiplier(){return this.getMultiplierHelper("employeeChaMult")}getEmployeeCreMultiplier(){return this.getMultiplierHelper("employeeCreMult")}getEmployeeEffMultiplier(){return this.getMultiplierHelper("employeeEffMult")}getEmployeeIntMultiplier(){return this.getMultiplierHelper("employeeIntMult")}getProductionMultiplier(){return this.getMultiplierHelper("productionMult")}getProductProductionMultiplier(){return this.getMultiplierHelper("productProductionMult")}getSalesMultiplier(){return this.getMultiplierHelper("salesMult")}getScientificResearchMultiplier(){return this.getMultiplierHelper("sciResearchMult")}getStorageMultiplier(){return this.getMultiplierHelper("storageMult")}getMultiplierHelper(e){let t=1;if(null==this.root)return t;const n=[];for(n.push(this.root);0!==n.length;){const i=n.shift();if(null==i||!i.researched)continue;const r=a.ResearchMap[i.text];if(null==r){console.warn(`Invalid Research name in node: ${i.text}`);continue}const o=r[e];if(null!=o){t*=o;for(let e=0;e<i.children.length;++e)n.push(i.children[e])}else console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${e}`)}return t}findNode(e){return null==this.root?null:this.root.findNode(e)}research(e){if(null==this.root)return;const t=[];for(t.push(this.root);0!==t.length;){const n=t.shift();if(null!=n){if(n.text===e)return n.researched=!0,void(this.researched[e]=!0);for(let e=0;e<n.children.length;++e)t.push(n.children[e])}}console.warn(`ResearchTree.research() did not find the specified Research node for: ${e}`)}setRoot(e){this.root=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.researchMetadata=[{name:"AutoBrew",cost:12e3,desc:"Automatically keep your employees fully caffeinated with coffee injections. This research will keep the energy of all employees at its maximum possible value, for no cost. This will also disable the Coffee upgrade."},{name:"AutoPartyManager",cost:15e3,desc:"Automatically analyzes your employees' happiness and morale and boosts them whenever it detects a decrease. This research will keep the morale and happiness of all employees at their maximum possible values, for no cost. This will also disable the 'Throw Party' feature."},{name:"Automatic Drug Administration",cost:1e4,desc:"Research how to automatically administer performance-enhacing drugs to all of your employees. This unlocks Drug-related Research."},{name:"Bulk Purchasing",cost:5e3,desc:"Research the art of buying materials in bulk. This allows you to purchase any amount of a material instantly."},{name:"CPH4 Injections",cost:25e3,desc:"Develop an advanced and harmless synthetic drug that is administered to employees to increase all of their stats, except experience, by 10%.",employeeCreMult:1.1,employeeChaMult:1.1,employeeEffMult:1.1,employeeIntMult:1.1},{name:"Drones",cost:5e3,desc:"Acquire the knowledge needed to create advanced drones. This research does nothing by itself, but unlocks other Drone-related research."},{name:"Drones - Assembly",cost:25e3,desc:"Manufacture and use Assembly Drones to improve the efficiency of your production lines. This increases all production by 20%.",productionMult:1.2},{name:"Drones - Transport",cost:3e4,desc:"Manufacture and use intelligent Transport Drones to optimize your warehouses. This increases the storage space of all warehouses by 50%.",storageMult:1.5},{name:"Go-Juice",cost:25e3,desc:"Provide employees with Go-Juice, a coffee-derivative that further enhances the brain's dopamine production. This increases the maximum energy of all employees by 10."},{name:"Hi-Tech R&D Laboratory",cost:5e3,desc:"Construct a cutting edge facility dedicated to advanced research and and development. This allows you to spend Scientific Research on powerful upgrades. It also globally increases Scientific Research production by 10%.",sciResearchMult:1.1},{name:"HRBuddy-Recruitment",cost:15e3,desc:"Use automated software to handle the hiring of employees. With this research, each office will automatically hire one employee per market cycle if there is available space."},{name:"HRBuddy-Training",cost:2e4,desc:"Use automated software to handle the training of employees. With this research, each employee hired with HRBuddy-Recruitment will automatically be assigned to 'Training', rather than being unassigned."},{name:"JoyWire",cost:2e4,desc:"A brain implant which is installed in employees, increasing their maximum happiness by 10."},{name:"Market-TA.I",cost:2e4,desc:"Develop advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know what price to sell your Materials/Products at in order to avoid losing sales due to having too high of a mark-up. It also lets you automatically use that sale price."},{name:"Market-TA.II",cost:5e4,desc:"Develop double-advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know how many sales of a Material/Product you lose or gain from having too high or too low or a sale price. It also lets you automatically set the sale price of your Materials/Products at the optimal price such that the amount sold matches the amount produced."},{name:"Overclock",cost:15e3,desc:"Equip employees with a headset that uses transcranial direct current stimulation (tDCS) to increase the speed of their neurotransmitters. This research increases the intelligence and efficiency of all employees by 25%.",employeeEffMult:1.25,employeeIntMult:1.25},{name:"Self-Correcting Assemblers",cost:25e3,desc:"Create assemblers that can be used for universal production. These assemblers use deep learning to improve their efficiency at their tasks. This research increases all production by 10%",productionMult:1.1},{name:"Sti.mu",cost:3e4,desc:"Upgrade the tDCS headset to stimulate regions of the brain that control confidence and enthusiasm. This research increases the max morale of all employees by 10."},{name:"sudo.Assist",cost:15e3,desc:"Develop a virtual assistant AI to handle and manage administrative issues for your corporation."},{name:"uPgrade: Capacity.I",cost:2e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 3 to 4)."},{name:"uPgrade: Capacity.II",cost:3e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 4 to 5)."},{name:"uPgrade: Dashboard",cost:5e3,desc:"Improve the software used to manage the industry's production line for its various products. This allows you to manage the production and sale of a product before it's finished being designed."},{name:"uPgrade: Fulcrum",cost:1e4,desc:"Streamline the manufacturing of this industry's various products. This research increases the production of your products by 5%",productProductionMult:1.05}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Research=class{constructor(e={name:"",cost:0,desc:""}){this.name="",this.cost=0,this.desc="",this.advertisingMult=1,this.employeeChaMult=1,this.employeeCreMult=1,this.employeeEffMult=1,this.employeeIntMult=1,this.productionMult=1,this.productProductionMult=1,this.salesMult=1,this.sciResearchMult=1,this.storageMult=1,this.name=e.name,this.cost=e.cost,this.desc=e.desc,e.advertisingMult&&(this.advertisingMult=e.advertisingMult),e.employeeChaMult&&(this.employeeChaMult=e.employeeChaMult),e.employeeCreMult&&(this.employeeCreMult=e.employeeCreMult),e.employeeEffMult&&(this.employeeEffMult=e.employeeEffMult),e.employeeIntMult&&(this.employeeIntMult=e.employeeIntMult),e.productionMult&&(this.productionMult=e.productionMult),e.productProductionMult&&(this.productProductionMult=e.productProductionMult),e.salesMult&&(this.salesMult=e.salesMult),e.sciResearchMult&&(this.sciResearchMult=e.sciResearchMult),e.storageMult&&(this.storageMult=e.storageMult)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(133),i=n(290);function r(e){const t=a.ResearchMap[e];if(null==t)throw new Error(`Invalid research name: ${e}`);return new i.Node({text:t.name,cost:t.cost})}function o(){const e=r("Hi-Tech R&D Laboratory"),t=r("AutoBrew"),n=r("AutoPartyManager"),a=r("Automatic Drug Administration"),i=r("Bulk Purchasing"),o=r("CPH4 Injections"),s=r("Drones"),l=r("Drones - Assembly"),c=r("Drones - Transport"),u=r("Go-Juice"),p=r("HRBuddy-Recruitment"),m=r("HRBuddy-Training"),h=r("JoyWire"),d=r("Market-TA.I"),g=r("Market-TA.II"),_=r("Overclock"),f=r("Self-Correcting Assemblers"),y=r("Sti.mu");return a.addChild(u),a.addChild(o),s.addChild(l),s.addChild(c),p.addChild(m),d.addChild(g),_.addChild(y),e.addChild(t),e.addChild(n),e.addChild(a),e.addChild(i),e.addChild(s),e.addChild(p),e.addChild(h),e.addChild(d),e.addChild(_),e.addChild(f),e}t.getBaseResearchTreeCopy=function(){const e=new i.ResearchTree;return e.setRoot(o()),e},t.getProductIndustryResearchTreeCopy=function(){const e=new i.ResearchTree,t=o(),n=r("uPgrade: Fulcrum"),a=r("uPgrade: Capacity.I"),s=r("uPgrade: Capacity.II"),l=r("uPgrade: Dashboard");return a.addChild(s),n.addChild(a),n.addChild(l),t.addChild(n),e.setRoot(t),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(6),i=n(42),r={},o={},s={},l={},c={},u={},p={},m={},h={},d={},g={},_={},f={},y={},b={},v={},E={},k={},C={};i.SoftwareCompanyPositions.forEach(e=>{r[e]=!0,c[e]=!0}),i.ITCompanyPositions.forEach(e=>{o[e]=!0,c[e]=!0}),i.NetworkEngineerCompanyPositions.forEach(e=>{s[e]=!0,c[e]=!0}),c[i.SecurityEngineerCompanyPositions[0]]=!0,l[i.SecurityEngineerCompanyPositions[0]]=!0,i.BusinessCompanyPositions.forEach(e=>{u[e]=!0}),i.SecurityCompanyPositions.forEach(e=>{m[e]=!0}),i.AgentCompanyPositions.forEach(e=>{p[e]=!0}),i.SoftwareConsultantCompanyPositions.forEach(e=>{h[e]=!0}),i.BusinessConsultantCompanyPositions.forEach(e=>{d[e]=!0});for(let e=0;e<i.SoftwareCompanyPositions.length;++e){const t=i.SoftwareCompanyPositions[e];e<=5&&(g[t]=!0),e<=3&&(_[t]=!0)}for(let e=0;e<i.BusinessCompanyPositions.length;++e){const t=i.BusinessCompanyPositions[e];e<=3&&(f[t]=!0)}y[i.MiscCompanyPositions[0]]=!0,b[i.MiscCompanyPositions[1]]=!0,v[i.PartTimeCompanyPositions[0]]=!0,E[i.PartTimeCompanyPositions[1]]=!0,k[i.BusinessCompanyPositions[3]]=!0,C[i.BusinessCompanyPositions[5]]=!0,t.companiesMetadata=[{name:a.Locations.AevumECorp,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:a.Locations.Sector12MegaCorp,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:a.Locations.AevumBachmanAndAssociates,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:2.6,salaryMultiplier:2.6,jobStatReqOffset:224},{name:a.Locations.Sector12BladeIndustries,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:224},{name:a.Locations.VolhavenNWO,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:249},{name:a.Locations.AevumClarkeIncorporated,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:a.Locations.VolhavenOmniTekIncorporated,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:a.Locations.Sector12FourSigma,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:2.5,salaryMultiplier:2.5,jobStatReqOffset:224},{name:a.Locations.ChongqingKuaiGongInternational,info:"",companyPositions:Object.assign({},c,u,m),expMultiplier:2.2,salaryMultiplier:2.2,jobStatReqOffset:224},{name:a.Locations.AevumFulcrumTechnologies,info:"",companyPositions:Object.assign({},c,u),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:224},{name:a.Locations.IshimaStormTechnologies,info:"",companyPositions:Object.assign({},c,h,u),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:a.Locations.NewTokyoDefComm,info:"",companyPositions:Object.assign({},C,c,h),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:a.Locations.VolhavenHeliosLabs,info:"",companyPositions:Object.assign({},C,c,h),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:a.Locations.NewTokyoVitaLife,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:a.Locations.Sector12IcarusMicrosystems,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:a.Locations.Sector12UniversalEnergy,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:199},{name:a.Locations.AevumGalacticCybersystems,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:a.Locations.AevumAeroCorp,info:"",companyPositions:Object.assign({},C,k,c,m),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:a.Locations.VolhavenOmniaCybersystems,info:"",companyPositions:Object.assign({},C,k,c,m),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:a.Locations.ChongqingSolarisSpaceSystems,info:"",companyPositions:Object.assign({},C,k,c,m),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:a.Locations.Sector12DeltaOne,info:"",companyPositions:Object.assign({},C,k,c,m),expMultiplier:1.6,salaryMultiplier:1.6,jobStatReqOffset:199},{name:a.Locations.NewTokyoGlobalPharmaceuticals,info:"",companyPositions:Object.assign({},c,u,h,m),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:224},{name:a.Locations.IshimaNovaMedical,info:"",companyPositions:Object.assign({},c,u,h,m),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:a.Locations.Sector12CIA,info:"",companyPositions:Object.assign({},g,s,l,o,m,p),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:a.Locations.Sector12NSA,info:"",companyPositions:Object.assign({},g,s,l,o,m,p),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:a.Locations.AevumWatchdogSecurity,info:"",companyPositions:Object.assign({},g,s,o,m,p,h),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:124},{name:a.Locations.VolhavenLexoCorp,info:"",companyPositions:Object.assign({},c,h,u,m),expMultiplier:1.4,salaryMultiplier:1.4,jobStatReqOffset:99},{name:a.Locations.AevumRhoConstruction,info:"",companyPositions:Object.assign({},_,f),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:49},{name:a.Locations.Sector12AlphaEnterprises,info:"",companyPositions:Object.assign({},_,f,h),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:99},{name:a.Locations.AevumPolice,info:"",companyPositions:Object.assign({},m,_),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:99},{name:a.Locations.VolhavenSysCoreSecurities,info:"",companyPositions:Object.assign({},c),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:124},{name:a.Locations.VolhavenCompuTek,info:"",companyPositions:Object.assign({},c),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:a.Locations.AevumNetLinkTechnologies,info:"",companyPositions:Object.assign({},c),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:99},{name:a.Locations.Sector12CarmichaelSecurity,info:"",companyPositions:Object.assign({},c,h,p,m),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:a.Locations.Sector12FoodNStuff,info:"",companyPositions:Object.assign({},b,E),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:a.Locations.Sector12JoesGuns,info:"",companyPositions:Object.assign({},b,E),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:a.Locations.IshimaOmegaSoftware,info:"",companyPositions:Object.assign({},r,h,o),expMultiplier:1.1,salaryMultiplier:1.1,jobStatReqOffset:49},{name:a.Locations.NewTokyoNoodleBar,info:"",companyPositions:Object.assign({},y,v),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(42);t.companyPositionMetadata=[{name:a.SoftwareCompanyPositions[0],nextPosition:a.SoftwareCompanyPositions[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:a.SoftwareCompanyPositions[1],nextPosition:a.SoftwareCompanyPositions[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:a.SoftwareCompanyPositions[2],nextPosition:a.SoftwareCompanyPositions[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:a.SoftwareCompanyPositions[3],nextPosition:a.SoftwareCompanyPositions[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:a.SoftwareCompanyPositions[4],nextPosition:a.SoftwareCompanyPositions[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:a.SoftwareCompanyPositions[5],nextPosition:a.SoftwareCompanyPositions[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:a.SoftwareCompanyPositions[6],nextPosition:a.SoftwareCompanyPositions[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:a.SoftwareCompanyPositions[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:a.ITCompanyPositions[0],nextPosition:a.ITCompanyPositions[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:a.ITCompanyPositions[1],nextPosition:a.ITCompanyPositions[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:a.ITCompanyPositions[2],nextPosition:a.ITCompanyPositions[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:a.ITCompanyPositions[3],nextPosition:a.SoftwareCompanyPositions[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:a.SecurityEngineerCompanyPositions[0],nextPosition:a.SoftwareCompanyPositions[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:a.NetworkEngineerCompanyPositions[0],nextPosition:a.NetworkEngineerCompanyPositions[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:a.NetworkEngineerCompanyPositions[1],nextPosition:a.SoftwareCompanyPositions[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:a.BusinessCompanyPositions[0],nextPosition:a.BusinessCompanyPositions[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:a.BusinessCompanyPositions[1],nextPosition:a.BusinessCompanyPositions[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:a.BusinessCompanyPositions[2],nextPosition:a.BusinessCompanyPositions[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:a.BusinessCompanyPositions[3],nextPosition:a.BusinessCompanyPositions[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:a.BusinessCompanyPositions[4],nextPosition:a.BusinessCompanyPositions[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:a.BusinessCompanyPositions[5],nextPosition:null,baseSalary:3900,charismaEffectiveness:90,charismaExpGain:1.5,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:751,reqdHacking:101,reqdReputation:32e5,repMultiplier:1.75},{name:a.SecurityCompanyPositions[0],nextPosition:a.SecurityCompanyPositions[1],baseSalary:82,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.04,reqdHacking:11,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1},{name:a.SecurityCompanyPositions[1],nextPosition:null,baseSalary:460,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.1,reqdHacking:101,reqdStrength:301,reqdDefense:301,reqdDexterity:301,reqdAgility:301,reqdCharisma:151,reqdReputation:36e3,repMultiplier:1.25},{name:a.SecurityCompanyPositions[2],nextPosition:a.SecurityCompanyPositions[3],baseSalary:50,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.01,strengthExpGain:.04,defenseExpGain:.04,dexterityExpGain:.04,agilityExpGain:.04,charismaExpGain:.02,reqdStrength:51,reqdDefense:51,reqdDexterity:51,reqdAgility:51,reqdCharisma:1,repMultiplier:1},{name:a.SecurityCompanyPositions[3],nextPosition:a.SecurityCompanyPositions[4],baseSalary:195,hackingEffectiveness:10,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:10,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.05,reqdHacking:26,reqdStrength:151,reqdDefense:151,reqdDexterity:151,reqdAgility:151,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1.1},{name:a.SecurityCompanyPositions[4],nextPosition:a.SecurityCompanyPositions[5],baseSalary:660,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.02,strengthExpGain:.12,defenseExpGain:.12,dexterityExpGain:.12,agilityExpGain:.12,charismaExpGain:.1,reqdHacking:26,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:101,reqdReputation:36e3,repMultiplier:1.25},{name:a.SecurityCompanyPositions[5],nextPosition:null,baseSalary:1320,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.05,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.15,reqdHacking:51,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:151,reqdReputation:144e3,repMultiplier:1.4},{name:a.AgentCompanyPositions[0],nextPosition:a.AgentCompanyPositions[1],baseSalary:330,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:20,hackingExpGain:.04,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.05,reqdHacking:101,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:101,reqdReputation:8e3,repMultiplier:1},{name:a.AgentCompanyPositions[1],nextPosition:a.AgentCompanyPositions[2],baseSalary:990,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.1,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.1,reqdHacking:201,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:201,reqdReputation:32e3,repMultiplier:1.25},{name:a.AgentCompanyPositions[2],nextPosition:null,baseSalary:2e3,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.15,strengthExpGain:.2,defenseExpGain:.2,dexterityExpGain:.2,agilityExpGain:.2,charismaExpGain:.15,reqdHacking:251,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:251,reqdReputation:162e3,repMultiplier:1.5},{name:a.MiscCompanyPositions[0],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.05,repMultiplier:1},{name:a.MiscCompanyPositions[1],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.04,repMultiplier:1},{name:a.SoftwareConsultantCompanyPositions[0],nextPosition:a.SoftwareConsultantCompanyPositions[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:a.SoftwareConsultantCompanyPositions[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:a.BusinessConsultantCompanyPositions[0],nextPosition:a.BusinessConsultantCompanyPositions[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:a.BusinessConsultantCompanyPositions[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:a.PartTimeCompanyPositions[0],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.04,repMultiplier:1},{name:a.PartTimeCompanyPositions[1],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.03,repMultiplier:1}]},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){}]);
|
||
//# sourceMappingURL=engine.bundle.js.map |