bitburner-src/dist/engine.bundle.js
2019-02-04 21:48:59 -08:00

2 lines
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e){function t(t){for(var i,o,s=t[0],l=t[1],c=t[2],p=0,m=[];p<s.length;p++)o=s[p],a[o]&&m.push(a[o][0]),a[o]=0;for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(e[i]=l[i]);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],i=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(i=!1)}i&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var i={},a={2:0},r=[];function o(t){if(i[t])return i[t].exports;var n=i[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=i,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 i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));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 K}),n.d(t,"b",function(){return G});var i=n(14),a=n(65),r=n(89),o=n(6),s=n(10),l=n(35),c=n(48),u=n(76),p=n(20),m=n(119),h=n(108),d=n(34),g=n(41),_=n(1),y=n(68),f=n(28),b=n(109),E=n(36),v=n(11),k=n(62),O=n(16),C=n(51),T=n(57),S=n(5),M=n(47),P=n(103),A=n(12),w=n(19),x=n(37),R=n(83),N=n(88),I=n(39),L=n(4),D=n(9),B=n(21),j=n(70),W=n(15),F=n(3);const U=1e3/_.CONSTANTS.MilliPerCycle;function H(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new I.a(1e3),this.total_money=new I.a(0),this.lifetime_money=new I.a(0),this.homeComputer="",this.city=S.Locations.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.totalHacknetNodeProduction=0,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.scriptProdSinceLastAug=0,this.stockProdSinceLastAug=0,this.crimeProdSinceLastAug=0,this.jobProdSinceLastAug=0}function G(e){if((K=JSON.parse(e,W.Reviver)).money=new I.a(K.money),K.total_money=new I.a(K.total_money),K.lifetime_money=new I.a(K.lifetime_money),K.corporation instanceof y.a){K.corporation.funds=new I.a(K.corporation.funds),K.corporation.revenue=new I.a(K.corporation.revenue),K.corporation.expenses=new I.a(K.corporation.expenses);for(var t=0;t<K.corporation.divisions.length;++t){var n=K.corporation.divisions[t];n.lastCycleRevenue=new I.a(n.lastCycleRevenue),n.lastCycleExpenses=new I.a(n.lastCycleExpenses),n.thisCycleRevenue=new I.a(n.thisCycleRevenue),n.thisCycleExpenses=new I.a(n.thisCycleExpenses)}}}H.prototype.init=function(){var e=new A.d({ip:Object(j.a)(),hostname:"home",organizationName:"Home PC",isConnectedTo:!0,adminRights:!0,purchasedByPlayer:!0,maxRam:8});this.homeComputer=e.ip,this.currentServer=e.ip,Object(A.a)(e),this.getHomeComputer().programs.push(f.Programs.NukeProgram.name)},H.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 I.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].resetTaskStatus();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.hacknetNodes.length=0,this.totalHacknetNodeProduction=0,this.updateSkillLevels(),this.hp=this.max_hp},H.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 I.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=N.SourceFileFlags[10]+this.sleevesFromCovenant;for(let e=0;e<this.sleeves.length;++e)this.sleeves[e]=new P.Sleeve;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.totalHacknetNodeProduction=0,this.gang=null,Object(T.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.updateSkillLevels(),this.hp=this.max_hp},H.prototype.getCurrentServer=function(){return A.b[this.currentServer]},H.prototype.getHomeComputer=function(){return A.b[this.homeComputer]},H.prototype.getUpgradeHomeRamCost=function(){const e=K.getHomeComputer().maxRam,t=Math.log2(e),n=Math.pow(1.58,t);return e*_.CONSTANTS.BaseCostFor1GBOfRamHome*n},H.prototype.receiveInvite=function(e){this.factionInvitations.includes(e)||this.factions.includes(e)||(this.firstFacInvRecvd=!0,this.factionInvitations.push(e))},H.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},H.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),K.hp=Math.round(this.max_hp*e)},H.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},H.prototype.hasProgram=function(e){var t=K.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},H.prototype.setMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.setMoney()"):this.money=e},H.prototype.gainMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainMoney()"):(this.money=this.money.plus(e),this.total_money=this.total_money.plus(e),this.lifetime_money=this.lifetime_money.plus(e))},H.prototype.loseMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.loseMoney()"):this.money=this.money.minus(e)},H.prototype.canAfford=function(e){return isNaN(e)?(console.error("NaN passed into Player.canAfford()"),!1):this.money.gte(e)},H.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))},H.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))},H.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))},H.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))},H.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))},H.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))},H.prototype.gainIntelligenceExp=function(e){isNaN(e)?console.log("ERROR: NaN passed into Player.gainIntelligenceExp()"):(M.b||this.intelligence>0)&&(this.intelligence_exp+=e)},H.prototype.queryStatFromString=function(e){const t=e.toLowerCase();return t.includes("hack")?K.hacking_skill:t.includes("str")?K.strength:t.includes("def")?K.defense:t.includes("dex")?K.dexterity:t.includes("agi")?K.agility:t.includes("cha")?K.charisma:t.includes("int")?K.intelligence:void 0},H.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=""},H.prototype.processWorkEarnings=function(e=1){const t=this.workHackExpGainRate*e,n=this.workStrExpGainRate*e,i=this.workDefExpGainRate*e,a=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(i),this.gainDexterityExp(a),this.gainAgilityExp(r),this.gainCharismaExp(o),this.gainMoney(s),this.workHackExpGained+=t,this.workStrExpGained+=n,this.workDefExpGained+=i,this.workDexExpGained+=a,this.workAgiExpGained+=r,this.workChaExpGained+=o,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e,this.workMoneyGained-=this.workMoneyLossRate*e},H.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(B.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",function(){return K.finishWork(!0),!1}),v.Engine.loadWorkInProgressContent()},H.prototype.work=function(e){var t=!1;if(this.timeWorked+v.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/v.Engine._idleSpeed)),this.timeWorked+=v.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],i="0";null!=n&&n instanceof u.Company?i=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`);const a=this.jobs[this.companyName];document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+a+" at "+this.companyName+" (Current Company Reputation: "+L.numeralWrapper.format(i,"0,0")+")<br><br>You have been working for "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ($"+L.numeralWrapper.format(this.workMoneyGainRate*U,"0,0.00")+" / sec) <br><br>"+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workRepGainRate*U,"0,0.0000")+" / sec) reputation for this company <br><br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workHackExpGainRate*U,"0,0.0000")+" / sec) hacking exp <br><br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workStrExpGainRate*U,"0,0.0000")+" / sec) strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDefExpGainRate*U,"0,0.0000")+" / sec) defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDexExpGainRate*U,"0,0.0000")+" / sec) dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workAgiExpGainRate*U,"0,0.0000")+" / sec) agility exp <br><br> "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workChaExpGainRate*U,"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."},H.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>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation for the company <br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(n=e?"You worked a short shift of "+Object(F.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(D.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,v.Engine.loadLocationContent(),t){var i="You worked a short shift of "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+", "+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation, "+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp.";return this.resetWorkStatus(),i}this.resetWorkStatus()},H.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(B.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",function(){return K.finishWorkPartTime(),!1}),v.Engine.loadWorkInProgressContent()},H.prototype.workPartTime=function(e){var t=!1;if(this.timeWorked+v.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/v.Engine._idleSpeed)),this.timeWorked+=v.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=_.CONSTANTS.MillisecondsPer8Hours)return this.finishWorkPartTime();var n=p.Companies[this.companyName],i="0";null!=n&&n instanceof u.Company?i=n.playerReputation:console.log("ERROR: Could not find Company: "+this.companyName);const a=this.jobs[this.companyName];document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+a+" at "+this.companyName+" (Current Company Reputation: "+L.numeralWrapper.format(i,"0,0")+")<br><br>You have been working for "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ($"+L.numeralWrapper.format(this.workMoneyGainRate*U,"0,0.00")+" / sec) <br><br>"+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workRepGainRate*U,"0,0.0000")+" / sec) reputation for this company <br><br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workHackExpGainRate*U,"0,0.0000")+" / sec) hacking exp <br><br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workStrExpGainRate*U,"0,0.0000")+" / sec) strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDefExpGainRate*U,"0,0.0000")+" / sec) defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDexExpGainRate*U,"0,0.0000")+" / sec) dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workAgiExpGainRate*U,"0,0.0000")+" / sec) agility exp <br><br> "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workChaExpGainRate*U,"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."},H.prototype.finishWorkPartTime=function(e=!1){p.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();var t="You earned a total of: <br>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation for the company <br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(t="You worked for "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br> "+t,e||Object(D.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,v.Engine.loadLocationContent(),e){var n="You worked for "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+", "+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation, "+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},H.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(B.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",function(){return K.finishFactionWork(!0),!1}),v.Engine.loadWorkInProgressContent()},H.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)},H.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)},H.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)},H.prototype.workForFaction=function(e){var t=O.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 i=!1;if(this.timeWorked+v.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer20Hours&&(i=!0,e=Math.round((_.CONSTANTS.MillisecondsPer20Hours-this.timeWorked)/v.Engine._idleSpeed)),this.timeWorked+=v.Engine._idleSpeed*e,this.processWorkEarnings(e),i||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: "+L.numeralWrapper.format(t.playerReputation,"0,0")+"). <br>You have been doing this for "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ("+L.numeralWrapper.format(this.workMoneyGainRate*U,"0,0.00")+" / sec) <br><br>"+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workRepGainRate*U,"0,0.0000")+" / sec) reputation for this faction <br><br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workHackExpGainRate*U,"0,0.0000")+" / sec) hacking exp <br><br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workStrExpGainRate*U,"0,0.0000")+" / sec) strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDefExpGainRate*U,"0,0.0000")+" / sec) defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDexExpGainRate*U,"0,0.0000")+" / sec) dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workAgiExpGainRate*U,"0,0.0000")+" / sec) agility exp <br><br> "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workChaExpGainRate*U,"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."},H.prototype.finishFactionWork=function(e,t=!1){var n=O.Factions[this.currentWorkFactionName];n.playerReputation+=this.workRepGained,this.updateSkillLevels();var i="You worked for your faction "+n.name+" for a total of "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+" <br><br> You earned a total of: <br>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" reputation for the faction <br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(t||Object(D.dialogBoxCreate)(i),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,v.Engine.loadFactionContent(),Object(C.a)(n.name),t){var a="You worked for your faction "+n.name+" for a total of "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+L.numeralWrapper.format(this.workRepGained,"0,0.0000")+" rep, "+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" str exp, "+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" def exp, "+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agi exp, and "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" cha exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()},H.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],i=d.CompanyPositions[n];return null==i?(console.error(`Could not find CompanyPosition object for ${n}. Work salary will be 0`),0):i.baseSalary*t.salaryMultiplier*this.work_money_mult*s.BitNodeMultipliers.CompanyWorkMoney*e},H.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},H.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},H.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},H.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},H.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},H.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},H.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 i=n.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);i+=this.intelligence/_.CONSTANTS.MaxSkillLevel;var a=1+e.favor/100;return isNaN(a)&&(a=1),i*this.company_rep_mult*a},H.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},H.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},H.prototype.startCreateProgramWork=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=_.CONSTANTS.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var i=0;i<this.getHomeComputer().programs.length;++i){var a=this.getHomeComputer().programs[i];if(a.startsWith(e)&&a.endsWith("%-INC")){var r=a.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(i,1)}}this.createProgramName=e;var s=Object(B.clearEventListeners)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",function(){return K.finishCreateProgramWork(!0),!1}),v.Engine.loadWorkInProgressContent()},H.prototype.createProgramWork=function(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t;n=1+(n-1)/5,this.timeWorked+=v.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=v.Engine._idleSpeed*e*n;var i=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1),document.getElementById("work-in-progress-text").innerHTML="You are currently working on coding "+i+".<br><br> You have been working for "+Object(F.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."},H.prototype.finishCreateProgramWork=function(e,t=!1){var n=this.createProgramName;if(!1===e)Object(D.dialogBoxCreate)("You've finished creating "+n+"!<br>The new program can be found on your home computer."),this.getHomeComputer().programs.push(n);else{var i=n+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(i)}e||this.gainIntelligenceExp(this.createProgramReqLvl/_.CONSTANTS.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,v.Engine.loadTerminalContent(),this.resetWorkStatus()},H.prototype.startClass=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=_.CONSTANTS.WorkTypeStudyClass,this.className=n;var i=1e3/v.Engine._idleSpeed,a=0,r=0,o=0,l=0,c=0,u=0,p=0;switch(n){case _.CONSTANTS.ClassStudyComputerScience:r=.5*t/i;break;case _.CONSTANTS.ClassDataStructures:a=_.CONSTANTS.ClassDataStructuresBaseCost*e/i,r=1*t/i;break;case _.CONSTANTS.ClassNetworks:a=_.CONSTANTS.ClassNetworksBaseCost*e/i,r=2*t/i;break;case _.CONSTANTS.ClassAlgorithms:a=_.CONSTANTS.ClassAlgorithmsBaseCost*e/i,r=4*t/i;break;case _.CONSTANTS.ClassManagement:a=_.CONSTANTS.ClassManagementBaseCost*e/i,p=2*t/i;break;case _.CONSTANTS.ClassLeadership:a=_.CONSTANTS.ClassLeadershipBaseCost*e/i,p=4*t/i;break;case _.CONSTANTS.ClassGymStrength:a=_.CONSTANTS.ClassGymBaseCost*e/i,o=1*t/i;break;case _.CONSTANTS.ClassGymDefense:a=_.CONSTANTS.ClassGymBaseCost*e/i,l=1*t/i;break;case _.CONSTANTS.ClassGymDexterity:a=_.CONSTANTS.ClassGymBaseCost*e/i,c=1*t/i;break;case _.CONSTANTS.ClassGymAgility:a=_.CONSTANTS.ClassGymBaseCost*e/i,u=1*t/i;break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=a,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(B.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 K.finishClass(),!1}),v.Engine.loadWorkInProgressContent()},H.prototype.takeClass=function(e){this.timeWorked+=v.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e),document.getElementById("work-in-progress-text").innerHTML="You have been "+t+" for "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>This has cost you: <br>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+" ($"+L.numeralWrapper.format(this.workMoneyLossRate*U,"0,0.00")+" / sec) <br><br>You have gained: <br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workHackExpGainRate*U,"0,0.0000")+" / sec) hacking exp <br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workStrExpGainRate*U,"0,0.0000")+" / sec) strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDefExpGainRate*U,"0,0.0000")+" / sec) defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workDexExpGainRate*U,"0,0.0000")+" / sec) dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workAgiExpGainRate*U,"0,0.0000")+" / sec) agility exp <br>"+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" ("+L.numeralWrapper.format(this.workChaExpGainRate*U,"0,0.0000")+" / sec) charisma exp <br>You may cancel at any time"},H.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(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+", <br>you spent a total of $"+L.numeralWrapper.format(-1*this.workMoneyGained,"0,0.00")+". <br><br>You earned a total of: <br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp <br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp <br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp <br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp <br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp <br>"+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp<br>";if(e||Object(D.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,v.Engine.loadLocationContent(),e){var n="After "+this.className+" for "+Object(F.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of $"+L.numeralWrapper.format(-1*this.workMoneyGained,"0,0.00")+". You earned a total of: "+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},H.prototype.startCrime=function(e,t,n,i,a,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=i*this.defense_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDexExpGained=a*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(B.clearEventListeners)("work-in-progress-cancel-button");p.innerHTML="Cancel crime",p.addEventListener("click",function(){return K.finishCrime(!0),!1}),v.Engine.loadWorkInProgressContent()},H.prototype.commitCrime=function(e){if(this.timeWorked+=v.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 i="["+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(F.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"<br>"+i.replace(/ /g,"&nbsp;")}},H.prototype.finishCrime=function(e){if(!e){if(Object(b.a)(this.crimeType,this.workMoneyGained)){let e=null;for(const t in E.Crimes)if(E.Crimes[t].type==this.crimeType){e=E.Crimes[t];break}null==e&&(console.log(this.crimeType),Object(D.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer")),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+L.numeralWrapper.format(this.workMoneyGained,"$0.000a")+", "+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" str exp, "+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" def exp, "+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(D.dialogBoxCreate)("Crime successful! <br><br>You gained:<br>$"+L.numeralWrapper.format(this.workMoneyGained,"0,0.00")+"<br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking experience <br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength experience<br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense experience<br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity experience<br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility experience<br>"+L.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 "+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" str exp, "+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" def exp, "+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+L.numeralWrapper.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(D.dialogBoxCreate)("Crime failed! <br><br>You gained:<br>"+L.numeralWrapper.format(this.workHackExpGained,"0,0.0000")+" hacking experience <br>"+L.numeralWrapper.format(this.workStrExpGained,"0,0.0000")+" strength experience<br>"+L.numeralWrapper.format(this.workDefExpGained,"0,0.0000")+" defense experience<br>"+L.numeralWrapper.format(this.workDexExpGained,"0,0.0000")+" dexterity experience<br>"+L.numeralWrapper.format(this.workAgiExpGained,"0,0.0000")+" agility experience<br>"+L.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(),v.Engine.loadLocationContent()},H.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},H.prototype.takeDamage=function(e){return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0)},H.prototype.hospitalize=function(){!1===w.Settings.SuppressHospitalizationPopup&&Object(D.dialogBoxCreate)("You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged "+L.numeralWrapper.format(this.max_hp*_.CONSTANTS.HospitalCostPerHp,"$0.000a")),this.loseMoney(this.max_hp*_.CONSTANTS.HospitalCostPerHp),this.hp=this.max_hp},H.prototype.applyForJob=function(e,t=!1){let n=null;""!==this.companyName&&(n=p.Companies[this.companyName]);const i=this.jobs[this.companyName],a=p.Companies[this.location];if(!(a 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(a,r)){var o=Object(h.getJobRequirementText)(a,r);return!t&&void Object(D.dialogBoxCreate)("Unforunately, you do not qualify for this position<br>"+o)}for(;;){let e=Object(m.getNextCompanyPosition)(r);if(null==e)break;if(!a.hasPosition(e))break;if(!this.isQualified(a,e))break;r=e}if(null==n||n.name!=a.name||r.name!=i){if(this.companyName=a.name,this.jobs[a.name]=r.name,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),t)return!0;Object(D.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+r.name+"!"),v.Engine.loadLocationContent()}else{var s=Object(m.getNextCompanyPosition)(r);if(null==s){if(t)return!1;Object(D.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(a.hasPosition(s)){if(t)return!1;o=Object(h.getJobRequirementText)(a,s);Object(D.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion<br>"+o)}else{if(t)return!1;Object(D.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}},H.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 i=this.jobs[this.companyName],a=d.CompanyPositions[i];return a.isSoftwareJob()&&t.isSoftwareJob()||a.isITJob()&&t.isITJob()||a.isBusinessJob()&&t.isBusinessJob()||a.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||a.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||a.isSecurityJob()&&t.isSecurityJob()||a.isAgentJob()&&t.isAgentJob()||a.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||a.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||a.isPartTimeJob()&&t.isPartTimeJob()?Object(m.getNextCompanyPosition)(a):t},H.prototype.applyForSoftwareJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.SoftwareCompanyPositions[0]],e)},H.prototype.applyForSoftwareConsultantJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.SoftwareConsultantCompanyPositions[0]],e)},H.prototype.applyForItJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.ITCompanyPositions[0]],e)},H.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(D.dialogBoxCreate)("Unforunately, you do not qualify for this position")},H.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(D.dialogBoxCreate)("Unforunately, you do not qualify for this position")},H.prototype.applyForBusinessJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.BusinessCompanyPositions[0]],e)},H.prototype.applyForBusinessConsultantJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.BusinessConsultantCompanyPositions[0]],e)},H.prototype.applyForSecurityJob=function(e=!1){return this.applyForJob(d.CompanyPositions[g.SecurityCompanyPositions[2]],e)},H.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(D.dialogBoxCreate)("Unforunately, you do not qualify for this position")},H.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(D.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName),v.Engine.loadLocationContent()}else{if(e)return!1;Object(D.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},H.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(D.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName),v.Engine.loadLocationContent()}else{if(e)return!1;Object(D.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},H.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(D.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName),v.Engine.loadLocationContent()}else{if(e)return!1;Object(D.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},H.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(D.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName),v.Engine.loadLocationContent()}else{if(e)return!1;Object(D.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},H.prototype.isQualified=function(e,t){var n=e.jobStatReqOffset,i=t.requiredHacking>0?t.requiredHacking+n:0,a=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>=i&&this.strength>=a&&this.defense>=r&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation},H.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=i.Augmentations[n];if(null!=t)if(t.owned=!0,t.name!=o.AugmentationNames.NeuroFluxGovernor)Object(a.a)(this.augmentations[e],!0);else for(let n=0;n<t.level;++n)Object(a.a)(this.augmentations[e],!0);else console.log(`WARNING: Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${n} will be skipped`)}},H.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!=R.a[e]?Object(R.b)(this.sourceFiles[t]):console.log("ERROR: Invalid source file number: "+this.sourceFiles[t].n)}},H.prototype.checkForFactionInvitations=function(){let e=[];var t=this.augmentations.length,n=p.Companies[this.companyName],i=0;null!=n&&(i=n.playerReputation);const a=Object.keys(this.jobs),r=Object.values(this.jobs);var o=O.Factions.Illuminati;!o.isBanned&&!o.isMember&&!o.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(o);var s=O.Factions.Daedalus;!s.isBanned&&!s.isMember&&!s.alreadyInvited&&t>=30&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(s);var l=O.Factions["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=30&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=O.Factions.ECorp;!c.isBanned&&!c.isMember&&!c.alreadyInvited&&a.includes(S.Locations.AevumECorp)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(c);var u=O.Factions.MegaCorp;!u.isBanned&&!u.isMember&&!u.alreadyInvited&&a.includes(S.Locations.Sector12MegaCorp)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(u);var m=O.Factions["Bachman & Associates"];!m.isBanned&&!m.isMember&&!m.alreadyInvited&&a.includes(S.Locations.AevumBachmanAndAssociates)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(m);var h=O.Factions["Blade Industries"];!h.isBanned&&!h.isMember&&!h.alreadyInvited&&a.includes(S.Locations.Sector12BladeIndustries)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(h);var d=O.Factions.NWO;!d.isBanned&&!d.isMember&&!d.alreadyInvited&&a.includes(S.Locations.VolhavenNWO)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(d);var g=O.Factions["Clarke Incorporated"];!g.isBanned&&!g.isMember&&!g.alreadyInvited&&a.includes(S.Locations.AevumClarkeIncorporated)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(g);var y=O.Factions["OmniTek Incorporated"];!y.isBanned&&!y.isMember&&!y.alreadyInvited&&a.includes(S.Locations.VolhavenOmniTekIncorporated)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(y);var f=O.Factions["Four Sigma"];!f.isBanned&&!f.isMember&&!f.alreadyInvited&&a.includes(S.Locations.Sector12FourSigma)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(f);var b=O.Factions["KuaiGong International"];!b.isBanned&&!b.isMember&&!b.alreadyInvited&&a.includes(S.Locations.ChongqingKuaiGongInternational)&&i>=_.CONSTANTS.CorpFactionRepRequirement&&e.push(b);var E=O.Factions["Fulcrum Secret Technologies"],v=A.b[x.a[x.b.FulcrumSecretTechnologies]];null==v?console.log("ERROR: Could not find Fulcrum Secret Technologies Server"):!E.isBanned&&!E.isMember&&!E.alreadyInvited&&v.manuallyHacked&&a.includes(S.Locations.AevumFulcrumTechnologies)&&i>=25e4&&e.push(E);var k=O.Factions.BitRunners,C=this.getHomeComputer(),T=A.b[x.a[x.b.BitRunnersServer]];null==T?console.log("ERROR: Could not find BitRunners Server"):!k.isBanned&&!k.isMember&&T.manuallyHacked&&!k.alreadyInvited&&this.hacking_skill>=500&&C.maxRam>=128&&e.push(k);var M=O.Factions["The Black Hand"],P=A.b[x.a[x.b.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&&C.maxRam>=64&&e.push(M);var w=O.Factions.NiteSec,R=A.b[x.a[x.b.NiteSecServer]];null==R?console.log("ERROR: Could not find NiteSec Server"):!w.isBanned&&!w.isMember&&R.manuallyHacked&&!w.alreadyInvited&&this.hacking_skill>=200&&C.maxRam>=32&&e.push(w);var N=O.Factions.Chongqing;N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(2e7)||this.city!=S.Locations.Chongqing||e.push(N);var I=O.Factions["Sector-12"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(15e6)||this.city!=S.Locations.Sector12||e.push(I);var L=O.Factions["New Tokyo"];L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(2e7)||this.city!=S.Locations.NewTokyo||e.push(L);var D=O.Factions.Aevum;D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(4e7)||this.city!=S.Locations.Aevum||e.push(D);var B=O.Factions.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=S.Locations.Ishima||e.push(B);var j=O.Factions.Volhaven;j.isBanned||j.isMember||j.alreadyInvited||!this.money.gte(5e7)||this.city!=S.Locations.Volhaven||e.push(j);var W=O.Factions["Speakers for the Dead"];!W.isBanned&&!W.isMember&&!W.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!a.includes(S.Locations.Sector12CIA)&&!a.includes(S.Locations.Sector12NSA)&&e.push(W);var F=O.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&&!a.includes(S.Locations.Sector12CIA)&&!a.includes(S.Locations.Sector12NSA)&&e.push(F);var U=O.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&&!a.includes(S.Locations.Sector12CIA)&&!a.includes(S.Locations.Sector12NSA)&&e.push(U);var H=O.Factions.Silhouette;!H.isBanned&&!H.isMember&&!H.alreadyInvited&&(r.includes("Chief Technology Officer")||r.includes("Chief Financial Officer")||r.includes("Chief Executive Officer"))&&this.money.gte(15e6)&&this.karma<=-22&&e.push(H);var G=O.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=O.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=O.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=O.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=O.Factions.CyberSec,Q=A.b[x.a[x.b.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},H.prototype.inGang=function(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof T.b},H.prototype.startGang=function(e,t){this.gang=new T.b(e,t)},H.prototype.hasCorporation=function(){return null!=this.corporation&&this.corporation instanceof y.a},H.prototype.inBladeburner=function(){return null!=this.bladeburner&&this.bladeburner instanceof l.a},H.prototype.setBitNodeNumber=function(e){this.bitNodeN=e},H.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))},H.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||!(O.Factions[e.name]instanceof k.Faction))return e.type=c.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);var n=_.CONSTANTS.CodingContractBaseFactionRepGain*t;return O.Factions[e.name].playerReputation+=n,`Gained ${n} faction reputation for ${e.name}`;case c.CodingContractRewardType.FactionReputationAll:const r=_.CONSTANTS.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var i=this.factions.slice();if(0==(i=i.filter(e=>!o.includes(e))).length)return e.type=c.CodingContractRewardType.Money,this.gainCodingContractReward(e,t);const l=Math.floor(r/i.length);for(const e of i)O.Factions[e]instanceof k.Faction&&(O.Factions[e].playerReputation+=l);return`Gained ${l} reputation for each of the following factions: ${i.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 a=_.CONSTANTS.CodingContractBaseMoneyGain*t*s.BitNodeMultipliers.CodingContractMoney;return this.gainMoney(a),`Gained ${L.numeralWrapper.format(a,"$0.000a")}`}},H.prototype.toJSON=function(){return Object(W.Generic_toJSON)("PlayerObject",this)},H.fromJSON=function(e){return Object(W.Generic_fromJSON)(H,e.data)},W.Reviver.constructors.PlayerObject=H;let K=new H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS={Version:"0.43.0",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,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:5e7,TotalNumBitNodes:24,TutorialNetworkingText:"Servers are a central part of the game. You start with a single personal server (your home computer) and you can purchase additional servers as you progress through the game. Connecting to other servers and hacking them can be a major source of income and experience. Servers can also be used to run scripts which can automatically hack servers for you. <br><br>In order to navigate between machines, use the 'scan' or 'scan-analyze' Terminal command to see all servers that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' command to connect to one of the available machines. <br><br>The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the server you are currently connected to.",TutorialHackingText:"In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers. By hacking these servers, you can steal their money and gain experience. <br><br><h1>Gaining root access</h1> <br>The key to hacking a server is to gain root access to that server. This can be done using the NUKE virus (NUKE.exe). You start the game with a copy of the NUKE virus on your home computer. The NUKE virus attacks the target server's open ports using buffer overflow exploits. When successful, you are granted root administrative access to the machine. <br><br>Typically, in order for the NUKE virus to succeed, the target server needs to have at least one of its ports opened. Some servers have no security and will not need any ports opened. Some will have very high security and will need many ports opened. In order to open ports on another server, you will need to run programs that attack the server to open specific ports. These programs can be coded once your hacking skill gets high enough, or they can be purchased if you can find a seller. <br><br>In order to determine how many ports need to be opened to successfully NUKE a server, connect to that server and run the 'analyze' command. This will also show you which ports have already been opened. <br><br>Once you have enough ports opened and have ran the NUKE virus to gain root access, the server can then be hacked by simply calling the 'hack' command through terminal, or by using a script.<br><br><h1>Hacking mechanics</h1><br>When you execute the hack command, either manually through the terminal or automatically through a script, you attempt to hack the server. This action takes time. The more advanced a server's security is, the more time it will take. Your hacking skill level also affects the hacking time, with a higher hacking skill leading to shorter hacking times. Also, running the hack command manually through terminal is faster than hacking from a script. <br><br>Your attempt to hack a server will not always succeed. The chance you have to successfully hack a server is also determined by the server's security and your hacking skill level. Even if your hacking attempt is unsuccessful, you will still gain experience points. <br><br>When you successfully hack a server. You steal a certain percentage of that server's total money. This percentage is determined by the server's security and your hacking skill level. The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking (since you are only hacking a certain percentage). You can increase the amount of money on a server using a script and the grow() function in Netscript.<br><br><h1>Server Security</h1><br>Each server has a security level, typically between 1 and 100. A higher number means the server has stronger security. It is possible for a server to have a security level of 100 or higher, in which case hacking that server will become impossible (0% chance to hack).<br><br>As mentioned above, a server's security level is an important factor to consider when hacking. You can check a server's security level using the 'analyze' command, although this only gives an estimate (with 5% uncertainty). You can also check a server's security in a script, using the <i>getServerSecurityLevel(server)</i> function in Netscript. See the Netscript documentation for more details. This function will give you an exact value for a server's security. <br><br>Whenever a server is hacked manually or through a script, its security level increases by a small amount. Calling the grow() command in a script will also increase security level of the target server. These actions will make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a server's security level in a script using the <i>weaken(server)</i> function in Netscript. See the Netscript documentation for more details.<br><br>A server has a minimum security level that is equal to one third of its starting security, rounded to the nearest integer. To be more precise:<br><br>server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))<br><br>This means that a server's security will not fall below this value if you are trying to weaken it.",TutorialScriptsText:"Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. Documentation about the Netscript language can be found in the 'Netscript Programming Language' section of this 'Tutorial' page. <br><br> <strong>It is highly recommended that you have a basic background in programming to start writing scripts. You by no means need to be an expert. All you need is some familiarity with basic programming constructs like for/while loops, if statements, functions, variables, etc. The Netscript programming language most resembles the Javascript language. Therefore, a good beginner's programming tutorial to read might be <a href='https://www.w3schools.com/js/default.asp' target='_blank'>this one</a>. Note that while the Netscript language is similar to Javascript, it is not the exact same, so the syntax will vary a little bit. </strong> <br><br>Running a script requires RAM. The more complex a script is, the more RAM it requires to run. Scripts can be run on any server you have root access to. <br><br>Here are some Terminal commands that are useful when working with scripts: <br><br><i>check [script] [args...]</i><br>Prints the logs of the script specified by the name and arguments to Terminal. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'check' it you must also add the 'foodnstuff' argument to the check command as so: <br>check foo.script foodnstuff<br><br><i>free</i><br>Shows the current server's RAM usage and availability <br><br><i>kill [script] [args...]</i><br>Stops a script that is running with the specified script name and arguments. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 1 and 2, then just typing 'kill foo.script' will not work. You have to use 'kill foo.script 1 2'. <br><br><i>mem [script] [-t] [n]</i><br>Check how much RAM a script requires to run with n threads<br><br><i>nano [script]</i><br>Create/Edit a script. The name of the script must end with the '.script' extension <br><br><i>ps</i><br>Displays all scripts that are actively running on the current server<br><br><i>rm [script]</i><br>Delete a script<br><br><i>run [script] [-t] [n] [args...]</i><br>Run a script with n threads and the specified arguments. Each argument should be separated by a space. Both the arguments and thread specification are optional. If neither are specified, then the script will be run single-threaded with no arguments.<br>Examples:<br>run foo.script<br>The command above will run 'foo.script' single-threaded with no arguments.<br>run foo.script -t 10<br>The command above will run 'foo.script' with 10 threads and no arguments.<br>run foo.script foodnstuff sigma-cosmetics 10<br>The command above will run 'foo.script' single-threaded with three arguments: [foodnstuff, sigma-cosmetics, 10]<br>run foo.script -t 50 foodnstuff<br>The command above will run 'foo.script' with 50 threads and a single argument: [foodnstuff]<br><br><i>tail [script] [args...]</i><br>Displays the logs of the script specified by the name and arguments. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'tail' it you must also add the 'foodnstuff' argument to the tail command as so: <br>tail foo.script foodnstuff<br><br><i>top</i><br>Displays all active scripts and their RAM usage <br><br><u><h1> Multithreading scripts </h1></u><br>Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of threads. For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would yield $50,000. <br><br> When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script with the number of threads, where the base cost refers to the amount of RAM required to run the script single-threaded. In the terminal, you can run the 'mem [scriptname] -t n' command to see how much RAM a script requires with n threads. <br><br>Every method for running a script has an option for making it multihreaded. To run a script with n threads from a Terminal: <br>run [scriptname] -t n<br><br>Using Netscript commands: <br>run('scriptname.script', n);<br> exec('scriptname.script, 'targetServer', n);<br><br><u><h1> Notes about how scripts work offline </h1> </u><br><strong> The scripts that you write and execute are interpreted in Javascript. For this reason, it is not possible for these scripts to run while offline (when the game is closed). It is important to note that for this reason, conditionals such as if/else statements and certain commands such as purchaseHacknetNode() or nuke() will not work while the game is offline.<br><br>However, Scripts WILL continue to generate money and hacking exp for you while the game is offline. This offline production is based off of the scripts' production while the game is online. <br><br>grow() and weaken() are two Netscript commands that will also be applied when the game is offline, although at a slower rate compared to if the game was open. This is done by having each script keep track of the rate at which the grow() and weaken() commands are called when the game is online. These calculated rates are used to determine how many times these function calls would be made while the game is offline. <br><br> Also, note that because of the way the Netscript interpreter is implemented, whenever you reload or re-open the game all of the scripts that you are running will start running from the BEGINNING of the code. The game does not keep track of where exactly the execution of a script is when it saves/loads. </strong><br><br>",TutorialNetscriptText:"Netscript is a programming language implemented for this game. There are two versions of Netscript: Netscript 1.0 and Netscript 2.0 (NetscriptJS).<br><br><a href='https://bitburner.readthedocs.io/en/latest/index.html' target='_blank'>Click here for Bitburner's official Netscript documentation</a>",TutorialTravelingText:"There are six major cities in the world that you are able to travel to: <br><br> Aevum<br> Chongqing<br> Sector-12<br> New Tokyo<br> Ishima<br> Volhaven<br><br>To travel between cities, visit your current city's travel agency through the 'World' page. From the travel agency you can travel to any other city. Doing so costs money. <br><br>Each city has its own set of companies and unique locations. Also, certain content is only available to you if you are in certain cities, so get exploring!",TutorialCompaniesText:"Hacking is not the only way to gain money and experience! Located around the world are many different companies which you can work for. By working for a company you can earn money, train your various labor skills, and unlock powerful passive perks. <br><br> To apply for a job, visit the company you want to work for through the 'World' menu. The company page will have options that let you apply to positions in the company. There might be several different positions you can apply for, ranging from software engineer to business analyst to security officer. <br><br> When you apply for a job, you will get the offer if your stats are high enough. Your first position at a company will be an entry-level position such as 'intern'. Once you get the job, an button will appear on the company page that allows you to work for the company. Click this button to start working. <br><br>Working occurs in 8 hour shifts. Once you start working, you will begin earning money, experience, and reputation. The rate at which you money and experience depends on the company and your position. The amount of reputation you gain for your company is based on your job performance, which is affected by your stats. Different positions value different stats. When you are working, you are unable to perform any other actions such as using your terminal or visiting other locations (However, note that any scripts you have running on servers will continue to run as you work!). It is possible to cancel your work shift before the 8 hours is up. However, if you have a full-time job, then cancelling a shift early will result in you gaining only half of the reputation that you had earned up to that point. There are also part-time/consultant jobs available where you will not be penalized if you cancel a work shift early. However, these positions pay less than full-time positions.<br><br>As you continue to work at a company, you will gain more and more reputation at that company. When your stats and reputation are high enough, you can get a promotion. You can apply for a promotion on the company page, just like you applied for the job originally. Higher positions at a company provide better salaries and stat gains.<br><br><h1>Infiltrating Companies</h1><br>Many companies have facilities that you can attempt to infiltrate. By infiltrating, you can steal classified company secrets and then sell these for money or for faction reputation. To try and infiltrate a company, visit a company through the 'World' menu. There will be an option that says 'Infiltrate Company'. <br><br>When infiltrating a company, you must progress through clearance levels in the facility. Every clearance level has some form of security that you must get past. There are several forms of security, ranging from high-tech security systems to armed guards. For each form of security, there are a variety of options that you can choose to try and bypass the security. Examples include hacking the security, engaging in combat, assassination, or sneaking past the security. The chance to succeed for each option is determined in part by your stats. So, for example, trying to hack the security system relies on your hacking skill, whereas trying to sneak past the security relies on your agility level.<br><br>The facility has a 'security level' that affects your chance of success when trying to get past a clearance level. Every time you advance to the next clearance level, the facility's security level will increase by a fixed amount. Furthermore the options you choose and whether you succeed or fail will affect the security level as well. For example, if you try to kill a security guard and fail, the security level will increase by a lot. If you choose to sneak past security and succeed, the security level will not increase at all. <br><br>Every 5 clearance levels, you will steal classified company secrets that can be sold for money or faction reputation. However, in order to sell these secrets you must successfully escape the facility using the 'Escape' option. Furthermore, companies have a max clearance level. If you reach the max clearance level you will automatically escape the facility with all of your stolen secrets.<br><br>",TutorialFactionsText:"Throughout the game you may receive invitations from factions. There are many different factions, and each faction has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial to progressing in the game and unlocking endgame content. <br><br> It is possible to join multiple factions if you receive invitations from them. However, note that joining a faction may prevent you from joining other rival factions. <br><br> The 'Factions' link on the menu brings up a list of all factions that you have joined. You can select a Faction on this list to go to that Faction page. This page displays general information about the Faction and also lets you perform work for the faction. Working for a Faction is similar to working for a company except that you don't get paid a salary. You will only earn reputation in your Faction and train your stats. Also, cancelling work early when working for a Faction does NOT result in reduced experience/reputation earnings. <br><br>Earning reputation for a Faction unlocks powerful Augmentations. Purchasing and installing these Augmentations will upgrade your abilities. The Augmentations that are available to unlock vary from faction to faction.",TutorialAugmentationsText:"Advances in science and medicine have lead to powerful new technologies that allow people to augment themselves beyond normal human capabilities. There are many different types of Augmentations, ranging from cybernetic to genetic to biological. Acquiring these Augmentations enhances the user's physical and mental faculties. <br><br>Because of how powerful these Augmentations are, the technology behind them is kept private and secret by the corporations and organizations that create them. Therefore, the only way for the player to obtain Augmentations is through Factions. After joining a Faction and earning enough reputation in it, you will be able to purchase its Augmentations. Different Factions offer different Augmentations. Augmentations must be purchased in order to be installed, and they are fairly expensive. <br><br>When you purchase an Augmentation, the price of purchasing another Augmentation increases by 90%. This multiplier stacks for each Augmentation you purchase. You will not gain the benefits of your purchased Augmentations until you install them. You can choose to install Augmentations through the 'Augmentations' menu tab. Once you install your purchased Augmentations, their costs are reset back to the original price.<br><br>Unfortunately, installing Augmentations has side effects. You will lose most of the progress you've made, including your skills, stats, and money. You will have to start over, but you will have all of the Augmentations you have installed to help you progress. <br><br> To summarize, here is a list of everything you will LOSE when you install an Augmentation: <br><br>Stats/Skills<br>Money<br>Scripts on all servers EXCEPT your home computer<br>Purchased servers<br>Hacknet Nodes<br>Company/faction reputation<br>Jobs and Faction memberships<br>Programs<br>Stocks<br>TOR router<br><br>Here is everything you will KEEP when you install an Augmentation: <br><br>Every Augmentation you have installed<br>Scripts on your home computer<br>RAM and CPU Core Upgrades on your home computer<br>World Stock Exchange account and TIX API Access<br>",LatestUpdate:'\n v0.43.0\n * Added BitNode-10: Digital Carbon\n\n * Stock Market Changes:\n ** Each stock now has a maximum number of shares you can purchase (both Long and Short positions combined)\n ** Added getStockMaxShares() Netscript function to the TIX API\n ** The cost of 4S Market Data TIX API Access increased from $20b to $25b\n\n * Job Changes:\n ** You can now hold multiple jobs at once. This means you no longer lose reputation when leaving a company\n ** Because of this change, the getCharacterInformation() Netscript function returns a slightly different value\n\n * Script Editor Changes:\n ** Added new script editor: CodeMirror. You can choose between the old editor (Ace) or CodeMirror\n ** Navigation keyboard shortcuts no longer work if the script editor is focused\n\n * Trying to programmatically run a script (run(), exec()) with a \'threads\' argument of 0 will now cause the function to return false without running the script\n * Home Computer RAM is now capped at 2 ^ 30 GB (1073741824 GB)\n * The maximum amount, maximum RAM, and cost of purchasing servers can now vary between different BitNodes (new BitNode multipliers)\n * Pop-up dialog boxes are a little bit bigger\n * Bug Fix: When importing scripts, "./" will now be properly ignored (e.g. import { foo } from "./lib.script" )\n '}},function(e,t,n){"use strict";function i(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(i("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(i("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(i("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(i("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(44);function a(e){return e.every(i.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),i=t%86400,a=Math.floor(i/3600),r=i%3600,o=Math.floor(r/60);let s="";return n>0&&(s+=`${n} days `),a>0&&(s+=`${a} hours `),o>0&&(s+=`${o} minutes `),s+=`${r%60} seconds `},t.longestCommonStart=function(e){if(!a(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],i=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),i.charAt(o));)o++;return n.substring(0,o)},t.containsAllStrings=a,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 i=0;i<e;i++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(94);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);t.numeralWrapper=new class{constructor(){this.defaultLocale="en",this.defaultLocale="en"}updateLocale(e){return null!=i.locale(e)||(console.warn(`Invalid locale for numeral: ${e}`),i.locale(this.defaultLocale),!1)}format(e,t){return Math.abs(e)<1e-6&&(e=0),i(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";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}),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";n.d(t,"d",function(){return d}),n.d(t,"e",function(){return h}),n.d(t,"f",function(){return g}),n.d(t,"b",function(){return y}),n.d(t,"c",function(){return m}),n.d(t,"a",function(){return p});n(10),n(1),n(0),n(135);var i=n(30),a=n(12),r=(n(19),n(33)),o=n(54),s=n(63),l=n(102),c=n(44),u=n(395);function p(e,t,n=!1){var i=[],r=t.env;if(r.stopFlag)return n?i:u.reject(t);var s,l,c=e.source.value,p=!1,m=[];if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type)p=!0,s=e.specifiers[0].local.name;else for(var h=0;h<e.specifiers.length;++h)m.push(e.specifiers[h].local.name);var g=Object(a.e)(t.serverIp),_="";if(null==g)return n?i:u.reject(d(t,"Failed to identify server. This is a bug please report to dev",e));for(h=0;h<g.scripts.length;++h)if(g.scripts[h].filename===c){_=g.scripts[h].code;break}if(""===_)return n?i:u.reject(d(t,"Could not find script "+c+" to import",e));try{var y=Object(o.parse)(_,{sourceType:"module"})}catch(a){return console.log("Failed to parse import script"),n?i:u.reject(d(t,"Failed to import functions from "+c+" This is most likely due to a syntax error in the imported script",e))}p&&(r.set(s,{}),l=r.get(s));for(var f=[y];0!=f.length;){var b=f.shift();switch(b.type){case"BlockStatement":case"Program":for(h=0;h<b.body.length;++h)b.body[h]instanceof o.Node&&f.push(b.body[h]);break;case"FunctionDeclaration":if(!b.id||!b.id.name)return n?i:u.reject(d(t,"Invalid function declaration in imported script "+c,e));p?n?i.push(b):l[b.id.name]=b:m.includes(b.id.name)&&(n?i.push(b):r.set(b.id.name,b))}for(var E in b)b.hasOwnProperty(E)&&b[E]instanceof o.Node&&f.push(b[E])}return n||t.scriptRef.log("Imported functions from "+c),n?i:u.resolve(!0)}function m(e){e instanceof i.b&&e.delay&&(clearTimeout(e.delay),e.delayResolve())}function h(e,t){return new u(function(n,i){t.delay=setTimeout(()=>{t.delay=null,n()},e),t.delayResolve=n})}function d(e,t,n=null){var i="";null!=n&&(i=" (Line "+_(n,e)+")");return"|"+e.serverIp+"|"+e.name+"|"+t+i}function g(e,t,n,a,o=1){if(null!=(m=Object(r.d)(t,n,e)))return a.scriptRef.log(t+" is already running on "+e.hostname),u.resolve(!1);for(var l=0;l<n.length;++l)if(null==n[l])return a.scriptRef.log("ERROR: Cannot execute a script with null/undefined as an argument"),u.resolve(!1);for(l=0;l<e.scripts.length;++l)if(e.scripts[l].filename==t){var c=e.scripts[l],p=c.ramUsage;if(0===(o=Math.round(Number(o))))return u.resolve(!1);p*=o;var m,h=e.maxRam-e.ramUsed;return 0==e.hasAdminRights?(a.scriptRef.log("Cannot run script "+t+" on "+e.hostname+" because you do not have root access!"),u.resolve(!1)):p>h?(a.scriptRef.log("Cannot run script "+t+"(t="+o+") on "+e.hostname+" because there is not enough available RAM!"),u.resolve(!1)):(null==a.disableLogs.ALL&&null==a.disableLogs.exec&&null==a.disableLogs.run&&null==a.disableLogs.spawn&&a.scriptRef.log("Running script: "+t+" on "+e.hostname+" with "+o+" threads and args: "+Object(s.arrayToString)(n)+". May take a few seconds to start up..."),(m=new r.b(c,n)).threads=o,e.runningScripts.push(m),Object(i.c)(m,e),u.resolve(!0))}return a.scriptRef.log("Could not find script "+t+" on "+e.hostname),u.resolve(!1)}function _(e,t){var n=t.scriptRef.scriptRef.code;try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}function y(e){if(!Object(c.isString)(e))return!1;let t=e.split("|");if(4!=t.length)return!1;var n=t[1];return!!Object(l.isValidIPAddress)(n)}u.config({warnings:!1,longStackTraces:!1,cancellation:!0,monitoring:!1})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(61);function a(e,t){const n=`<tr class="posted"><td ${void 0===t?'class="terminal-line"':`id="${t}"`} style="${`color: var(--my-font-color); background-color:var(--my-background-color);${void 0===t?" white-space:pre-wrap;":""}`}">${e}</td></tr>`;i.getElementById("terminal-input").insertAdjacentHTML("beforebegin",n),function(){const e=i.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){a(e)},t.hackProgressBarPost=function(e){a(e,"hack-progress-bar")},t.hackProgressPost=function(e){a(e,"hack-progress")}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"dialogBoxCreate",function(){return r}),n.d(t,"dialogBoxOpened",function(){return a});let i=[];e(document).click(function(t){a&&i.length>=1&&(e(t.target).closest(i[0]).length||(i[0].remove(),i.splice(0,1),0==i.length?a=!1:i[0].style.visibility="visible"))}),e(document).on("click",".dialog-box-close-button",function(e){a&&i.length>=1&&(i[0].remove(),i.splice(0,1),0==i.length?a=!1:i[0].style.visibility="visible")});var a=!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="&times;",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),i.length>=1&&(n.style.visibility="hidden"),i.push(n),setTimeout(function(){a=!0},400)}}.call(this,n(72))},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,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,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return re});var i=n(3),a=n(91),r=n(77),o=n(14),s=n(65),l=n(6),c=n(69),u=n(35),p=n(155),m=n(116),h=n(115),d=(n(34),n(20)),g=n(68),_=n(1),y=n(139),f=n(16),b=n(51),E=n(52),v=n(106),k=n(5),O=n(75),C=n(38),T=n(96),S=n(46),M=n(64),P=n(47),A=n(30),w=n(0),x=n(100),R=(n(28),n(110)),N=n(67),I=n(82),L=n(33),D=n(12),B=n(19),j=n(83),W=n(88),F=n(37),U=n(24),H=n(58),G=n(103),K=n(118),q=n(138),$=n(84),Y=n(13),z=n(4),V=n(154),J=n(153),X=n(26),Q=n(9),Z=n(97),ee=(n(17),n(27)),te=(n(21),n(2)),ne=n(42),ie=n(137),ae=n(29);n(265),n(224),n(222),n(220),n(218),n(216),n(214),n(212),n(210),n(208),n(206),n(204),n(202),n(200),n(198),n(196),n(194),n(192),n(190),n(188),n(186),n(184),n(182);e(document).keydown(function(e){if(!0!==B.Settings.DisableHotkeys){try{if(Object(L.e)().isFocused())return}catch(e){}if(!(w.a.isWorking||N.b||M.c||m.a))if(84==e.keyCode&&e.altKey)e.preventDefault(),re.loadTerminalContent();else if(e.keyCode===ae.KEY.C&&e.altKey)e.preventDefault(),re.loadCharacterContent();else if(e.keyCode===ae.KEY.E&&e.altKey)e.preventDefault(),re.loadScriptEditorContent();else if(e.keyCode===ae.KEY.S&&e.altKey)e.preventDefault(),re.loadActiveScriptsContent();else if(e.keyCode===ae.KEY.H&&e.altKey)e.preventDefault(),re.loadHacknetNodesContent();else if(e.keyCode===ae.KEY.W&&e.altKey)e.preventDefault(),re.loadWorldContent();else if(e.keyCode===ae.KEY.J&&e.altKey)e.preventDefault(),re.loadJobContent();else if(e.keyCode===ae.KEY.R&&e.altKey)e.preventDefault(),re.loadTravelContent();else if(e.keyCode===ae.KEY.P&&e.altKey)e.preventDefault(),re.loadCreateProgramContent();else if(e.keyCode===ae.KEY.F&&e.altKey){if(Y.routing.isOn(Y.Page.Terminal)&&E.a.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),re.loadFactionsContent()}else e.keyCode===ae.KEY.A&&e.altKey?(e.preventDefault(),re.loadAugmentationsContent()):e.keyCode===ae.KEY.U&&e.altKey&&(e.preventDefault(),re.loadTutorialContent());e.keyCode===ae.KEY.O&&e.altKey&&(e.preventDefault(),Object(Z.b)())}});const re={version:"",Debug:!0,overview:new p.a,Clickables:{saveMainMenuButton:null,deleteMainMenuButton:null,tutorialNetworkingButton:null,tutorialHackingButton:null,tutorialScriptsButton:null,tutorialNetscriptButton:null,tutorialTravelingButton:null,tutorialCompaniesButton:null,tutorialFactionsButton:null,tutorialAugmentationsButton:null,tutorialBackButton: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(){re.hideAllContent(),re.Display.terminalContent.style.display="block",Y.routing.navigateTo(Y.Page.Terminal),X.MainMenuLinks.Terminal.classList.add("active")},loadCharacterContent:function(){re.hideAllContent(),re.Display.characterContent.style.display="block",re.displayCharacterInfo(),Y.routing.navigateTo(Y.Page.CharacterInfo),X.MainMenuLinks.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){re.hideAllContent(),re.Display.scriptEditorContent.style.display="block";try{Object(L.e)().openScript(e,t)}catch(e){Object(ne.exceptionAlert)(e)}Object(L.i)(),Y.routing.navigateTo(Y.Page.ScriptEditor),X.MainMenuLinks.ScriptEditor.classList.add("active")},loadActiveScriptsContent:function(){re.hideAllContent(),re.Display.activeScriptsContent.style.display="block",Object(r.c)(),Y.routing.navigateTo(Y.Page.ActiveScripts),X.MainMenuLinks.ActiveScripts.classList.add("active")},loadHacknetNodesContent:function(){re.hideAllContent(),re.Display.hacknetNodesContent.style.display="block",Object(O.b)(),Y.routing.navigateTo(Y.Page.HacknetNodes),X.MainMenuLinks.HacknetNodes.classList.add("active")},loadWorldContent:function(){re.hideAllContent(),re.Display.worldContent.style.display="block",re.displayWorldInfo(),Y.routing.navigateTo(Y.Page.World),X.MainMenuLinks.City.classList.add("active")},loadCreateProgramContent:function(){re.hideAllContent(),re.Display.createProgramContent.style.display="block",Object(R.a)(),Y.routing.navigateTo(Y.Page.CreateProgram),X.MainMenuLinks.CreateProgram.classList.add("active")},loadFactionsContent:function(){re.hideAllContent(),re.Display.factionsContent.style.display="block",re.displayFactionsInfo(),Y.routing.navigateTo(Y.Page.Factions),X.MainMenuLinks.Factions.classList.add("active")},loadFactionContent:function(){re.hideAllContent(),re.Display.factionContent.style.display="block",Y.routing.navigateTo(Y.Page.Faction)},loadAugmentationsContent:function(){re.hideAllContent(),re.Display.augmentationsContent.style.display="block",Object(s.c)(re.Display.augmentationsContent),Y.routing.navigateTo(Y.Page.Augmentations),X.MainMenuLinks.Augmentations.classList.add("active")},loadTutorialContent:function(){re.hideAllContent(),re.Display.tutorialContent.style.display="block",re.displayTutorialContent(),Y.routing.navigateTo(Y.Page.Tutorial),X.MainMenuLinks.Tutorial.classList.add("active")},loadDevMenuContent:function(){re.hideAllContent(),Object(y.b)(),Y.routing.navigateTo(Y.Page.DevMenu),X.MainMenuLinks.DevMenu.classList.add("active")},loadLocationContent:function(){re.hideAllContent(),re.Display.locationContent.style.display="block";try{Object(v.a)()}catch(e){Object(ne.exceptionAlert)(e),console.error(e)}Y.routing.navigateTo(Y.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(Q.dialogBoxCreate)("ERROR: Invalid city. This is a bug please contact game dev")}re.loadLocationContent()},loadJobContent:function(){""!=w.a.companyName?(w.a.location=w.a.companyName,re.loadLocationContent()):Object(Q.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.")},loadWorkInProgressContent:function(){re.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",re.Display.workInProgressContent.style.display="block",Y.routing.navigateTo(Y.Page.WorkInProgress)},loadRedPillContent:function(){re.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",re.Display.redPillContent.style.display="block",Y.routing.navigateTo(Y.Page.RedPill)},loadCinematicTextContent:function(){re.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",re.Display.cinematicTextContent.style.display="block",Y.routing.navigateTo(Y.Page.CinematicText)},loadInfiltrationContent:function(){re.hideAllContent(),re.Display.infiltrationContent.style.display="block",Y.routing.navigateTo(Y.Page.Infiltration)},loadStockMarketContent:function(){re.hideAllContent(),re.Display.stockMarketContent.style.display="block",Y.routing.navigateTo(Y.Page.StockMarket),Object(U.g)()},loadGangContent:function(){re.hideAllContent(),document.getElementById("gang-container")||w.a.inGang()?(w.a.gang.displayGangContent(w.a),Y.routing.navigateTo(Y.Page.Gang)):(re.loadTerminalContent(),Y.routing.navigateTo(Y.Page.Terminal))},loadMissionContent:function(){re.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",re.Display.missionContent.style.display="block",Y.routing.navigateTo(Y.Page.Mission)},loadCorporationContent:function(){w.a.corporation instanceof g.a&&(re.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",w.a.corporation.createUI(),Y.routing.navigateTo(Y.Page.Corporation))},loadBladeburnerContent:function(){if(w.a.bladeburner instanceof u.a)try{re.hideAllContent(),Y.routing.navigateTo(Y.Page.Bladeburner),w.a.bladeburner.createContent()}catch(e){Object(ne.exceptionAlert)(e)}},loadSleevesContent:function(){try{re.hideAllContent(),Y.routing.navigateTo(Y.Page.Sleeves),Object(K.createSleevesPage)(w.a)}catch(e){Object(ne.exceptionAlert)(e)}},loadResleevingContent:function(){try{re.hideAllContent(),Y.routing.navigateTo(Y.Page.Resleeves),Object(q.createResleevesPage)(w.a)}catch(e){Object(ne.exceptionAlert)(e)}},hideAllContent:function(){re.Display.terminalContent.style.display="none",re.Display.characterContent.style.display="none",re.Display.scriptEditorContent.style.display="none",re.Display.activeScriptsContent.style.display="none",re.Display.hacknetNodesContent.style.display="none",re.Display.worldContent.style.display="none",re.Display.createProgramContent.style.display="none",re.Display.factionsContent.style.display="none",re.Display.factionContent.style.display="none",re.Display.factionAugmentationsContent.style.display="none",re.Display.augmentationsContent.style.display="none",re.Display.tutorialContent.style.display="none",re.Display.locationContent.style.display="none",re.Display.workInProgressContent.style.display="none",re.Display.redPillContent.style.display="none",re.Display.cinematicTextContent.style.display="none",re.Display.infiltrationContent.style.display="none",re.Display.stockMarketContent.style.display="none",re.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.a&&w.a.corporation.clearUI(),w.a.bladeburner instanceof u.a&&w.a.bladeburner.clearContent(),Object(q.clearResleevesPage)(),Object(K.clearSleevesPage)(),re.aevumLocationsList.style.display="none",re.chongqingLocationsList.style.display="none",re.sector12LocationsList.style.display="none",re.newTokyoLocationsList.style.display="none",re.ishimaLocationsList.style.display="none",re.volhavenLocationsList.style.display="none",X.MainMenuLinks.Terminal.classList.remove("active"),X.MainMenuLinks.ScriptEditor.classList.remove("active"),X.MainMenuLinks.ActiveScripts.classList.remove("active"),X.MainMenuLinks.CreateProgram.classList.remove("active"),X.MainMenuLinks.Stats.classList.remove("active"),X.MainMenuLinks.Factions.classList.remove("active"),X.MainMenuLinks.Augmentations.classList.remove("active"),X.MainMenuLinks.HacknetNodes.classList.remove("active"),X.MainMenuLinks.Sleeves.classList.remove("active"),X.MainMenuLinks.City.classList.remove("active"),X.MainMenuLinks.Travel.classList.remove("active"),X.MainMenuLinks.Job.classList.remove("active"),X.MainMenuLinks.StockMarket.classList.remove("active"),X.MainMenuLinks.Bladeburner.classList.remove("active"),X.MainMenuLinks.Corporation.classList.remove("active"),X.MainMenuLinks.Gang.classList.remove("active"),X.MainMenuLinks.Tutorial.classList.remove("active"),X.MainMenuLinks.Options.classList.remove("active"),X.MainMenuLinks.DevMenu.classList.remove("active"),Object(y.a)()},displayCharacterOverviewInfo:function(){re.overview.update();const e=document.getElementById("character-overview-save-button");B.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},displayCharacterInfo:function(){Object(ee.removeChildrenFromElement)(re.Display.characterInfo);let e="";""!==w.a.companyName&&(e=w.a.jobs[w.a.companyName]);var t="";w.a.intelligence>0&&(t="Intelligence: "+w.a.intelligence.toLocaleString()+"<br>");let n="";if(w.a.sourceFiles.length>0&&(n="Time played since last Bitnode destroyed: "+Object(i.convertTimeMsToTimeElapsedString)(w.a.playtimeSinceLastBitnode)+"<br>"),re.Display.characterInfo.appendChild(Object(te.createElement)("pre",{innerHTML:"<b>General</b><br><br>Current City: "+w.a.city+"<br><br>"+`Employer at which you last worked: ${w.a.companyName}<br>`+`Job you last worked: ${e}<br>`+`All Employers: ${Object.keys(w.a.jobs).join(", ")}<br><br>`+"Money: $"+Object(i.formatNumber)(w.a.money.toNumber(),2)+"<br><br><br><b>Stats</b><br><br>Hacking Level: "+w.a.hacking_skill.toLocaleString()+" ("+z.numeralWrapper.format(w.a.hacking_exp,"(0.000a)")+" experience)<br>Strength: "+w.a.strength.toLocaleString()+" ("+z.numeralWrapper.format(w.a.strength_exp,"(0.000a)")+" experience)<br>Defense: "+w.a.defense.toLocaleString()+" ("+z.numeralWrapper.format(w.a.defense_exp,"(0.000a)")+" experience)<br>Dexterity: "+w.a.dexterity.toLocaleString()+" ("+z.numeralWrapper.format(w.a.dexterity_exp,"(0.000a)")+" experience)<br>Agility: "+w.a.agility.toLocaleString()+" ("+z.numeralWrapper.format(w.a.agility_exp,"(0.000a)")+" experience)<br>Charisma: "+w.a.charisma.toLocaleString()+" ("+z.numeralWrapper.format(w.a.charisma_exp,"(0.000a)")+" experience)<br>"+t+"<br><br><b>Multipliers</b><br><br>Hacking Chance multiplier: "+Object(i.formatNumber)(100*w.a.hacking_chance_mult,2)+"%<br>Hacking Speed multiplier: "+Object(i.formatNumber)(100*w.a.hacking_speed_mult,2)+"%<br>Hacking Money multiplier: "+Object(i.formatNumber)(100*w.a.hacking_money_mult,2)+"%<br>Hacking Growth multiplier: "+Object(i.formatNumber)(100*w.a.hacking_grow_mult,2)+"%<br><br>Hacking Level multiplier: "+Object(i.formatNumber)(100*w.a.hacking_mult,2)+"%<br>Hacking Experience multiplier: "+Object(i.formatNumber)(100*w.a.hacking_exp_mult,2)+"%<br><br>Strength Level multiplier: "+Object(i.formatNumber)(100*w.a.strength_mult,2)+"%<br>Strength Experience multiplier: "+Object(i.formatNumber)(100*w.a.strength_exp_mult,2)+"%<br><br>Defense Level multiplier: "+Object(i.formatNumber)(100*w.a.defense_mult,2)+"%<br>Defense Experience multiplier: "+Object(i.formatNumber)(100*w.a.defense_exp_mult,2)+"%<br><br>Dexterity Level multiplier: "+Object(i.formatNumber)(100*w.a.dexterity_mult,2)+"%<br>Dexterity Experience multiplier: "+Object(i.formatNumber)(100*w.a.dexterity_exp_mult,2)+"%<br><br>Agility Level multiplier: "+Object(i.formatNumber)(100*w.a.agility_mult,2)+"%<br>Agility Experience multiplier: "+Object(i.formatNumber)(100*w.a.agility_exp_mult,2)+"%<br><br>Charisma Level multiplier: "+Object(i.formatNumber)(100*w.a.charisma_mult,2)+"%<br>Charisma Experience multiplier: "+Object(i.formatNumber)(100*w.a.charisma_exp_mult,2)+"%<br><br>Hacknet Node production multiplier: "+Object(i.formatNumber)(100*w.a.hacknet_node_money_mult,2)+"%<br>Hacknet Node purchase cost multiplier: "+Object(i.formatNumber)(100*w.a.hacknet_node_purchase_cost_mult,2)+"%<br>Hacknet Node RAM upgrade cost multiplier: "+Object(i.formatNumber)(100*w.a.hacknet_node_ram_cost_mult,2)+"%<br>Hacknet Node Core purchase cost multiplier: "+Object(i.formatNumber)(100*w.a.hacknet_node_core_cost_mult,2)+"%<br>Hacknet Node level upgrade cost multiplier: "+Object(i.formatNumber)(100*w.a.hacknet_node_level_cost_mult,2)+"%<br><br>Company reputation gain multiplier: "+Object(i.formatNumber)(100*w.a.company_rep_mult,2)+"%<br>Faction reputation gain multiplier: "+Object(i.formatNumber)(100*w.a.faction_rep_mult,2)+"%<br>Salary multiplier: "+Object(i.formatNumber)(100*w.a.work_money_mult,2)+"%<br>Crime success multiplier: "+Object(i.formatNumber)(100*w.a.crime_success_mult,2)+"%<br>Crime money multiplier: "+Object(i.formatNumber)(100*w.a.crime_money_mult,2)+"%<br><br><br><b>Misc</b><br><br>Servers owned: "+w.a.purchasedServers.length+"<br>Hacknet Nodes owned: "+w.a.hacknetNodes.length+"<br>Augmentations installed: "+w.a.augmentations.length+"<br>Time played since last Augmentation: "+Object(i.convertTimeMsToTimeElapsedString)(w.a.playtimeSinceLastAug)+"<br>"+n+"Time played: "+Object(i.convertTimeMsToTimeElapsedString)(w.a.totalPlaytime)})),0!==w.a.sourceFiles.length){var a="BitNode"+w.a.bitNodeN;re.Display.characterInfo.appendChild(Object(te.createElement)("p",{width:"60%",innerHTML:"<br>Current BitNode: "+w.a.bitNodeN+" ("+c.a[a].name+")<br><br>"})),re.Display.characterInfo.appendChild(Object(te.createElement)("p",{width:"60%",fontSize:"13px",marginLeft:"4%",innerHTML:c.a[a].info}))}},aevumLocationsList:null,chongqingLocationsList:null,sector12LocationsList:null,newTokyoLocationsList:null,ishimaLocationsList:null,volhavenLocationsList:null,displayWorldInfo:function(){re.aevumLocationsList.style.display="none",re.chongqingLocationsList.style.display="none",re.sector12LocationsList.style.display="none",re.newTokyoLocationsList.style.display="none",re.ishimaLocationsList.style.display="none",re.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:re.aevumLocationsList.style.display="inline";break;case k.Locations.Chongqing:re.chongqingLocationsList.style.display="inline";break;case k.Locations.Sector12:re.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:re.newTokyoLocationsList.style.display="inline";break;case k.Locations.Ishima:re.ishimaLocationsList.style.display="inline";break;case k.Locations.Volhaven:re.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(ee.removeChildrenFromElement)(t),(e=Object(te.createElement)("li")).appendChild(Object(te.createElement)("a",{innerText:"World Stock Exchange",class:"a-link-button",clickListener:()=>(w.a.location=k.Locations.WorldStockExchange,re.loadStockMarketContent(),!1)})),t.appendChild(e),w.a.corporation instanceof g.a&&null==document.getElementById("location-corporation-button"))&&((e=Object(te.createElement)("li")).appendChild(Object(te.createElement)("a",{innerText:w.a.corporation.name,id:"location-corporation-button",class:"a-link-button",clickListener:()=>(re.loadCorporationContent(),!1)})),t.appendChild(e));w.a.bladeburner instanceof u.a&&((e=Object(te.createElement)("li")).appendChild(Object(te.createElement)("a",{innerText:"Bladeburner Headquarters",class:"a-link-button",clickListener:()=>(re.loadBladeburnerContent(),!1)})),t.appendChild(e))},displayFactionsInfo:function(){Object(ee.removeChildrenFromElement)(re.Display.factionsContent),re.Display.factionsContent.appendChild(Object(te.createElement)("h1",{innerText:"Factions"})),re.Display.factionsContent.appendChild(Object(te.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(te.createElement)("ul");re.Display.factionsContent.appendChild(Object(te.createElement)("br"));for(var t=0;t<w.a.factions.length;++t)!function(){var n=w.a.factions[t];e.appendChild(Object(te.createElement)("a",{class:"a-link-button",innerText:n,padding:"4px",margin:"4px",display:"inline-block",clickListener:()=>(re.loadFactionContent(),Object(b.a)(n),!1)})),e.appendChild(Object(te.createElement)("br"))}();re.Display.factionsContent.appendChild(e),re.Display.factionsContent.appendChild(Object(te.createElement)("br")),re.Display.factionsContent.appendChild(Object(te.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),re.Display.factionsContent.appendChild(Object(te.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(te.createElement)("ul");for(t=0;t<w.a.factionInvitations.length;++t)!function(){var e=w.a.factionInvitations[t],i=Object(te.createElement)("li",{padding:"6px",margin:"6px"});i.appendChild(Object(te.createElement)("p",{innerText:e,display:"inline",margin:"4px",padding:"4px"})),i.appendChild(Object(te.createElement)("a",{innerText:"Accept Faction Invitation",class:"a-link-button",display:"inline",margin:"4px",padding:"4px",clickListener:()=>{Object(b.c)(f.Factions[e]);for(var t=0;t<w.a.factionInvitations.length;++t)(w.a.factionInvitations[t]==e||f.Factions[w.a.factionInvitations[t]].isBanned)&&(w.a.factionInvitations.splice(t,1),t--);return re.displayFactionsInfo(),!1}})),n.appendChild(i)}();re.Display.factionsContent.appendChild(n)},displayTutorialContent:function(){document.getElementById("tutorial-getting-started-link").style.display="block",re.Clickables.tutorialNetworkingButton.style.display="block",re.Clickables.tutorialHackingButton.style.display="block",re.Clickables.tutorialScriptsButton.style.display="block",re.Clickables.tutorialNetscriptButton.style.display="block",re.Clickables.tutorialTravelingButton.style.display="block",re.Clickables.tutorialCompaniesButton.style.display="block",re.Clickables.tutorialFactionsButton.style.display="block",re.Clickables.tutorialAugmentationsButton.style.display="block",document.getElementById("tutorial-shortcuts-link").style.display="block",re.Clickables.tutorialBackButton.style.display="none",document.getElementById("tutorial-text").style.display="none"},displayTutorialPage:function(e){document.getElementById("tutorial-getting-started-link").style.display="none",re.Clickables.tutorialNetworkingButton.style.display="none",re.Clickables.tutorialHackingButton.style.display="none",re.Clickables.tutorialScriptsButton.style.display="none",re.Clickables.tutorialNetscriptButton.style.display="none",re.Clickables.tutorialTravelingButton.style.display="none",re.Clickables.tutorialCompaniesButton.style.display="none",re.Clickables.tutorialFactionsButton.style.display="none",re.Clickables.tutorialAugmentationsButton.style.display="none",document.getElementById("tutorial-shortcuts-link").style.display="none",re.Clickables.tutorialBackButton.style.display="inline-block",document.getElementById("tutorial-text").style.display="block",document.getElementById("tutorial-text").innerHTML=e},idleTimer:function(){var e=(new Date).getTime(),t=e-re._lastUpdate,n=t%re._idleSpeed;(t=Math.floor(t/re._idleSpeed))>0&&(re._lastUpdate=e-n,w.a.lastUpdate=e-n,re.updateGame(t)),window.requestAnimationFrame(re.idleTimer)},updateGame:function(e=1){var t=e*re._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&&(re._totalActionTime=H.a.actionTime,re._actionTimeLeft=H.a.actionTime,re._actionInProgress=!0,re._actionProgressBarCount=1,re._actionProgressStr="[ ]",re._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.a&&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 i=0;i<w.a.sleeves.length;++i)i!==t&&w.a.sleeves[i].gainExperience(w.a,n,e,!0)}re.decrementAllCounters(e),re.checkCounters(),1==re._actionInProgress&&re.updateHackProgress(e),Object(A.g)(e),Object(O.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 re.Counters)re.Counters.hasOwnProperty(t)&&(re.Counters[t]=re.Counters[t]-e)},checkCounters:function(){if(re.Counters.autoSaveCounter<=0&&(I.b.saveGame(oe),null==B.Settings.AutosaveInterval&&(B.Settings.AutosaveInterval=60),0===B.Settings.AutosaveInterval?re.Counters.autoSaveCounter=1/0:re.Counters.autoSaveCounter=5*B.Settings.AutosaveInterval),re.Counters.updateSkillLevelsCounter<=0&&(w.a.updateSkillLevels(),re.Counters.updateSkillLevelsCounter=10),re.Counters.updateActiveScriptsDisplay<=0&&(Object(r.c)(),Y.routing.isOn(Y.Page.ActiveScripts)?re.Counters.updateActiveScriptsDisplay=5:re.Counters.updateActiveScriptsDisplay=10),re.Counters.updateDisplays<=0&&(re.displayCharacterOverviewInfo(),Y.routing.isOn(Y.Page.CharacterInfo)?re.displayCharacterInfo():Y.routing.isOn(Y.Page.HacknetNodes)?Object(O.f)():Y.routing.isOn(Y.Page.CreateProgram)?Object(R.a)():Y.routing.isOn(Y.Page.Sleeves)&&Object(K.updateSleevesPage)(),a.b&&Object(a.c)(),re.Counters.updateDisplays=3),re.Counters.updateDisplaysMed<=0&&(Y.routing.isOn(Y.Page.Corporation)&&w.a.corporation.updateUIContent(),re.Counters.updateDisplaysMed=9),re.Counters.updateDisplaysLong<=0&&(Y.routing.isOn(Y.Page.Gang)&&w.a.inGang()?w.a.gang.updateGangContent():Y.routing.isOn(Y.Page.ScriptEditor)&&Object(L.i)(),re.Counters.updateDisplaysLong=15),re.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")),re.Counters.createProgramNotifications=10}if(re.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 i=n[Math.floor(Math.random()*n.length)];Object(b.b)(i)}re.Counters.checkFactionInvitations=100}if(re.Counters.passiveFactionGrowth<=0){var s=Math.floor(600-re.Counters.passiveFactionGrowth);Object(b.d)(s),re.Counters.passiveFactionGrowth=600}if(re.Counters.messages<=0&&(Object(S.c)(),o.Augmentations[l.AugmentationNames.TheRedPill].owned?re.Counters.messages=4500:re.Counters.messages=150),re.Counters.sCr<=0&&(w.a.hasWseAccount&&Object(U.q)(),re.Counters.sCr=1500),re.Counters.mechanicProcess<=0){if(w.a.corporation instanceof g.a&&w.a.corporation.process(),w.a.bladeburner instanceof u.a)try{w.a.bladeburner.process()}catch(e){Object(ne.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}re.Counters.mechanicProcess=5}re.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(h.a)(),re.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*re._idleSpeed;re._actionTimeLeft-=t/1e3,re._actionTimeLeft=Math.max(re._actionTimeLeft,0);for(var n=Math.round(100*(1-re._actionTimeLeft/re._totalActionTime));2*re._actionProgressBarCount<=n;)re._actionProgressStr=Object(i.replaceAt)(re._actionProgressStr,re._actionProgressBarCount,"|"),re._actionProgressBarCount+=1;re._actionTimeStr="Time left: "+Math.max(0,Math.round(re._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=re._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=re._actionProgressStr.replace(/ /g,"&nbsp;"),n>=100&&(re._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 i=0;i<t.length;++i)e?(t[i].style.opacity=1,t[i].style.maxHeight=t[i].scrollHeight+"px"):(t[i].style.opacity=0,t[i].style.maxHeight=null);for(i=0;i<n.length;++i)e?(n[i].style.opacity=1,n[i].style.maxHeight=n[i].scrollHeight+"px",n[i].style.pointerEvents="auto"):(n[i].style.opacity=0,n[i].style.maxHeight=null,n[i].style.pointerEvents="none")},load:function(e){var t=document.getElementById("terminal-tab"),n=document.getElementById("create-script-tab"),a=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"),y=document.getElementById("travel-tab"),E=document.getElementById("job-tab"),v=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.c)(),Object(c.b)(),Object(j.c)(),re.setDisplayElements(),re.init(),Object(s.d)(),w.a.reapplyAllSourceFiles(),Object(U.i)(),w.a.hasWseAccount&&Object(U.j)(),Object(T.a)(),Object(P.g)(),Object(W.updateSourceFileFlags)(w.a),re._lastUpdate=(new Date).getTime();var B=w.a.lastUpdate,K=Math.floor((re._lastUpdate-B)/re._idleSpeed),q=Object(L.g)();w.a.isWorking&&(console.log("work() called in load() for "+K*re._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(O.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.a&&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*re._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=re._lastUpdate,re.start(),Object(ie.removeLoadingScreen)(),Object(Q.dialogBoxCreate)("While you were offline, your scripts generated <span class='money-gold'>$"+Object(i.formatNumber)(q,2)+"</span> and your Hacknet Nodes generated <span class='money-gold'>$"+Object(i.formatNumber)($,2)+"</span>");var z=[t,n,a,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(E):E.style.display="none",w.a.firstTimeTraveled?z.push(y):y.style.display="none",w.a.firstProgramAvailable?z.push(r):r.style.display="none",w.a.hasWseAccount?z.push(v):v.style.display="none",w.a.bladeburner instanceof u.a?z.push(k):k.style.display="none",w.a.corporation instanceof g.a?z.push(M):M.style.display="none",w.a.inGang()?z.push(A):A.style.display="none",re.closeMainMenuHeader(z)}else{console.log("Initializing new game"),Object(c.c)(),Object(c.b)(),Object(j.c)(),Object(F.c)(),re.setDisplayElements(),re.start(),w.a.init(),Object(D.f)(),Object(d.initCompanies)(),Object(f.initFactions)(),Object(s.d)(),Object(S.d)(),Object(U.i)(),Object(T.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",E.style.display="none",v.style.display="none",y.style.display="none",r.style.display="none",k.style.display="none",M.style.display="none",A.style.display="none",N.style.display="none",re.openMainMenuHeader([t,n,a,o,m,h,x,R]),Object(C.c)(),Object(ie.removeLoadingScreen)()}Object(V.a)(),Object(L.h)(),H.a.resetTerminalInput()},setDisplayElements:function(){if(re.Display.terminalContent=document.getElementById("terminal-container"),Y.routing.navigateTo(Y.Page.Terminal),re.Display.characterContent=document.getElementById("character-container"),re.Display.characterContent.style.display="none",re.Display.scriptEditorContent=document.getElementById("script-editor-container"),re.Display.scriptEditorContent.style.display="none",re.Display.activeScriptsContent=document.getElementById("active-scripts-container"),re.Display.activeScriptsContent.style.display="none",re.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),re.Display.hacknetNodesContent.style.display="none",re.Display.worldContent=document.getElementById("world-container"),re.Display.worldContent.style.display="none",re.Display.createProgramContent=document.getElementById("create-program-container"),re.Display.createProgramContent.style.display="none",re.Display.factionsContent=document.getElementById("factions-container"),re.Display.factionsContent.style.display="none",re.Display.factionContent=document.getElementById("faction-container"),re.Display.factionContent.style.display="none",re.Display.factionAugmentationsContent=document.getElementById("faction-augmentations-container"),re.Display.factionAugmentationsContent.style.display="none",re.Display.augmentationsContent=document.getElementById("augmentations-container"),re.Display.augmentationsContent.style.display="none",re.Display.tutorialContent=document.getElementById("tutorial-container"),re.Display.tutorialContent.style.display="none",re.Display.infiltrationContent=document.getElementById("infiltration-container"),re.Display.infiltrationContent.style.display="none",re.Display.stockMarketContent=document.getElementById("stock-market-container"),re.Display.stockMarketContent.style.display="none",re.Display.missionContent=document.getElementById("mission-container"),re.Display.missionContent.style.display="none",re.Display.characterInfo=document.getElementById("character-content"),re.aevumLocationsList=document.getElementById("aevum-locations-list"),re.chongqingLocationsList=document.getElementById("chongqing-locations-list"),re.sector12LocationsList=document.getElementById("sector12-locations-list"),re.newTokyoLocationsList=document.getElementById("newtokyo-locations-list"),re.ishimaLocationsList=document.getElementById("ishima-locations-list"),re.volhavenLocationsList=document.getElementById("volhaven-locations-list"),re.Display.locationContent=document.getElementById("location-container"),re.Display.locationContent.style.display="none",re.Display.workInProgressContent=document.getElementById("work-in-progress-container"),re.Display.workInProgressContent.style.display="none",re.Display.redPillContent=document.getElementById("red-pill-container"),re.Display.redPillContent.style.display="none",re.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),re.Display.cinematicTextContent.style.display="none",Object(v.b)(),re.Clickables.tutorialNetworkingButton=document.getElementById("tutorial-networking-link"),re.Clickables.tutorialNetworkingButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialNetworkingText)}),re.Clickables.tutorialHackingButton=document.getElementById("tutorial-hacking-link"),re.Clickables.tutorialHackingButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialHackingText)}),re.Clickables.tutorialScriptsButton=document.getElementById("tutorial-scripts-link"),re.Clickables.tutorialScriptsButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialScriptsText)}),re.Clickables.tutorialNetscriptButton=document.getElementById("tutorial-netscript-link"),re.Clickables.tutorialNetscriptButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialNetscriptText)}),re.Clickables.tutorialTravelingButton=document.getElementById("tutorial-traveling-link"),re.Clickables.tutorialTravelingButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialTravelingText)}),re.Clickables.tutorialCompaniesButton=document.getElementById("tutorial-jobs-link"),re.Clickables.tutorialCompaniesButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialCompaniesText)}),re.Clickables.tutorialFactionsButton=document.getElementById("tutorial-factions-link"),re.Clickables.tutorialFactionsButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialFactionsText)}),re.Clickables.tutorialAugmentationsButton=document.getElementById("tutorial-augmentations-link"),re.Clickables.tutorialAugmentationsButton.addEventListener("click",function(){re.displayTutorialPage(_.CONSTANTS.TutorialAugmentationsText)}),re.Clickables.tutorialBackButton=document.getElementById("tutorial-back-button"),re.Clickables.tutorialBackButton.addEventListener("click",function(){re.displayTutorialContent()}),!Object(X.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(ne.exceptionAlert)(new Error(e)),void console.error(e)}},init:function(){if(document.getElementById("import-game-link").onclick=function(){I.b.importGame()},!Object(J.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(ne.exceptionAlert)(new Error(e)),void console.error(e)}(X.MainMenuLinks.Terminal.addEventListener("click",function(){return re.loadTerminalContent(),!1}),X.MainMenuLinks.ScriptEditor.addEventListener("click",function(){return re.loadScriptEditorContent(),!1}),X.MainMenuLinks.ActiveScripts.addEventListener("click",function(){return re.loadActiveScriptsContent(),!1}),X.MainMenuLinks.CreateProgram.addEventListener("click",function(){return re.loadCreateProgramContent(),!1}),X.MainMenuLinks.Stats.addEventListener("click",function(){return re.loadCharacterContent(),!1}),X.MainMenuLinks.Factions.addEventListener("click",function(){return re.loadFactionsContent(),!1}),X.MainMenuLinks.Augmentations.addEventListener("click",function(){return re.loadAugmentationsContent(),!1}),X.MainMenuLinks.HacknetNodes.addEventListener("click",function(){return re.loadHacknetNodesContent(),!1}),X.MainMenuLinks.Sleeves.addEventListener("click",function(){return re.loadSleevesContent(),X.MainMenuLinks.Sleeves.classList.add("active"),!1}),X.MainMenuLinks.City.addEventListener("click",function(){return re.loadWorldContent(),!1}),X.MainMenuLinks.Travel.addEventListener("click",function(){return re.loadTravelContent(),X.MainMenuLinks.Travel.classList.add("active"),!1}),X.MainMenuLinks.Job.addEventListener("click",function(){return re.loadJobContent(),X.MainMenuLinks.Job.classList.add("active"),!1}),X.MainMenuLinks.StockMarket.addEventListener("click",function(){return re.loadStockMarketContent(),X.MainMenuLinks.StockMarket.classList.add("active"),!1}),X.MainMenuLinks.Bladeburner.addEventListener("click",function(){return re.loadBladeburnerContent(),!1}),X.MainMenuLinks.Corporation.addEventListener("click",function(){return re.loadCorporationContent(),X.MainMenuLinks.Corporation.classList.add("active"),!1}),X.MainMenuLinks.Gang.addEventListener("click",function(){return re.loadGangContent(),!1}),X.MainMenuLinks.Tutorial.addEventListener("click",function(){return re.loadTutorialContent(),!1}),X.MainMenuLinks.DevMenu.addEventListener("click",function(){return!1}),re.ActiveScriptsList=document.getElementById("active-scripts-list"),re.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),re.Clickables.saveMainMenuButton.addEventListener("click",function(){return I.b.saveGame(oe),!1}),re.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),re.Clickables.deleteMainMenuButton.addEventListener("click",function(){return I.b.deleteGame(oe),!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(oe),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(Z.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){f.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)}),re.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(Q.dialogBoxCreate)("Forcefully deleted all running scripts on home computer. Please save and refresh page"),Object(Z.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(Q.dialogBoxCreate)("Soft Reset!"),Object(x.a)(),Object(Z.a)(),!1})},start:function(){re.idleTimer(),Object(A.f)()}};var oe,se;window.onload=function(){if(!window.indexedDB)return re.load(null);(se=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.log("Error opening indexedDB: "),console.log(e),re.load(null)},se.onsuccess=function(e){console.log("Opening bitburnerSave database successful!");var t=(oe=e.target.result).transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.log("Error in Database request to get savestring: "+e),re.load(null)},t.onsuccess=function(e){re.load(t.result)}},se.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(72))},function(e,t,n){"use strict";n.d(t,"f",function(){return y}),n.d(t,"h",function(){return f}),n.d(t,"k",function(){return b}),n.d(t,"j",function(){return E}),n.d(t,"i",function(){return k}),n.d(t,"g",function(){return O}),n.d(t,"a",function(){return C}),n.d(t,"c",function(){return T}),n.d(t,"e",function(){return S}),n.d(t,"d",function(){return _}),n.d(t,"b",function(){return v});var i=n(10),a=n(48),r=n(1),o=n(33),s=n(0),l=n(28),c=n(37),u=n(73),p=n(17),m=n(70),h=n(161),d=n(15),g=n(102);function _(e={ip:Object(m.a)(),hostname:""}){this.ip=e.ip?e.ip:Object(m.a)();for(var t=e.hostname,n=0,a="";null!=T(t+a);)a="-"+n,++n;this.hostname=t+a,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights,this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.manuallyHacked=!1,this.maxRam=null!=e.maxRam?e.maxRam:0,this.ramUsed=0,this.cpuCores=1,this.scripts=[],this.runningScripts=[],this.programs=[],this.messages=[],this.textFiles=[],this.contracts=[],this.dir=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.serversOnNetwork=[],this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5,this.sshPortOpen=!1,this.ftpPortOpen=!1,this.smtpPortOpen=!1,this.httpPortOpen=!1,this.sqlPortOpen=!1,this.openPortCount=0}function y(){const e=[];for(let t=0;t<15;t++)e.push([]);const t=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],n=e=>{switch(typeof e){case"number":return e;case"object":return Object(p.getRandomInt)(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const i of h.serverMetadata){const a={hostname:i.hostname,ip:Object(m.a)(),numOpenPortsRequired:i.numOpenPortsRequired,organizationName:i.organizationName};void 0!==i.maxRamExponent&&(a.maxRam=Math.pow(2,n(i.maxRamExponent)));for(const e of t)void 0!==i[e]&&(a[e]=n(i[e]));const r=new _(a);for(const e of i.literature||[])r.messages.push(e);void 0!==i.specialName&&c.a.addIp(i.specialName,r.ip),C(r),void 0!==i.networkLayer&&e[n(i.networkLayer)-1].push(r)}const i=e=>e[Math.floor(Math.random()*e.length)],a=(e,t)=>{for(const n of e)r=n,o=t(),r.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(r.ip)};var r,o;a(e[0],()=>s.a.getHomeComputer());for(let t=1;t<e.length;t++)a(e[t],()=>i(e[t-1]))}function f(e,t){let n=1+(r.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;n>r.CONSTANTS.ServerMaxGrowthRate&&(n=r.CONSTANTS.ServerMaxGrowthRate);const i=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*s.a.hacking_grow_mult*i)}function b(e,t){const n=Math.max(Math.floor(t/450),0);var a=1+(r.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;a>r.CONSTANTS.ServerMaxGrowthRate&&(a=r.CONSTANTS.ServerMaxGrowthRate);const o=n*(e.serverGrowth/100)*i.BitNodeMultipliers.ServerGrowthRate;var l=Math.pow(a,o*s.a.hacking_grow_mult);l<1&&(console.log("WARN: serverGrowth calculated to be less than 1"),l=1);const c=e.moneyAvailable;if(e.moneyAvailable*=l,e.moneyMax&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),e.moneyMax&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),c!==e.moneyAvailable){let t=f(e,e.moneyAvailable/c);t=Math.max(0,t),e.fortify(2*r.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/c}function E(e){const t=e.programs.includes(l.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.Programs.NukeProgram.name),t&&e.programs.push(l.Programs.BitFlume.name),e.scripts.forEach(function(e){e.updateRamUsage()}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")}_.prototype.setMaxRam=function(e){this.maxRam=e},_.prototype.getServerOnNetwork=function(e){if(!(e>this.serversOnNetwork.length))return v[this.serversOnNetwork[e]];console.log("Tried to get server on network that was out of range")},_.prototype.getScript=function(e){for(var t=0;t<this.scripts.length;t++)if(this.scripts[t].filename==e)return this.scripts[t];return null},_.prototype.capDifficulty=function(){this.hackDifficulty<this.minDifficulty&&(this.hackDifficulty=this.minDifficulty),this.hackDifficulty<1&&(this.hackDifficulty=1),this.hackDifficulty>1e6&&(this.hackDifficulty=1e6)},_.prototype.fortify=function(e){this.hackDifficulty+=e,this.capDifficulty()},_.prototype.weaken=function(e){this.hackDifficulty-=e*i.BitNodeMultipliers.ServerWeakenRate,this.capDifficulty()},_.prototype.writeToScriptFile=function(e,t){var n={success:!1,overwritten:!1};if(!Object(o.f)(e))return n;for(let i=0;i<this.scripts.length;++i)if(e===this.scripts[i].filename){let e=this.scripts[i];return e.code=t,e.updateRamUsage(),e.module="",n.overwritten=!0,n.success=!0,n}var i=new o.c;return i.filename=e,i.code=t,i.updateRamUsage(),i.server=this.ip,this.scripts.push(i),n.success=!0,n},_.prototype.writeToTextFile=function(e,t){var n={success:!1,overwritten:!1};if(!e.endsWith("txt"))return n;for(let i=0;i<this.textFiles.length;++i)if(this.textFiles[i].fn===e)return n.overwritten=!0,this.textFiles[i].text=t,n.success=!0,n;var i=new u.TextFile(e,t);return this.textFiles.push(i),n.success=!0,n},_.prototype.addContract=function(e){this.contracts.push(e)},_.prototype.removeContract=function(e){e instanceof a.CodingContract?this.contracts=this.contracts.filter(t=>t.fn!==e.fn):this.contracts=this.contracts.filter(t=>t.fn!==e)},_.prototype.getContract=function(e){for(const t of this.contracts)if(t.fn===e)return t;return null},_.prototype.toJSON=function(){return Object(d.Generic_toJSON)("Server",this)},_.fromJSON=function(e){return Object(d.Generic_fromJSON)(_,e.data)},d.Reviver.constructors.Server=_;let v={};function k(){for(var e in v)delete v[e];v={}}function O(e){v=JSON.parse(e,d.Reviver)}function C(e){var t=e.ip;if(Object(m.b)(t))throw console.log("IP of server that's being added: "+t),console.log("Hostname of the server thats being added: "+e.hostname),console.log("The server that already has this IP is: "+v[t].hostname),new Error("Error: Trying to add a server with an existing IP");v[t]=e}function T(e){for(var t in v)if(v.hasOwnProperty(t)&&v[t].hostname==e)return v[t];return null}function S(e){return Object(g.isValidIPAddress)(e)?void 0!==v[e]?v[e]:null:T(e)}function M(e,t,n){this.s=e,this.p=t,this.c=[],this.n=n,this.d=t.d+1,this.scrs=[],this.pgms=[],this.msgs=[]}M.prototype.createSubdir=function(e){new M(this.s,this,e)},M.prototype.getPath=function(e){for(var t=[],n=this;null!==n;)t.unshift(n.n,"/"),n=n.parent;return t.unshift("/"),t.join("")}},function(e,t,n){"use strict";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";function i(e,t){var n;return null==t?(console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0):"object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data&&"function"==typeof(n=i.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON?n.fromJSON(t):t}function a(e,t,n){var i,a,r;for(n||(n=Object.keys(t)),i={},a=0;a<n.length;++a)i[r=n[a]]=t[r];return{ctor:e,data:i}}function r(e,t){var n,i;for(i in n=new e,t)n[i]=t[i];return n}n.r(t),n.d(t,"Reviver",function(){return i}),n.d(t,"Generic_toJSON",function(){return a}),n.d(t,"Generic_fromJSON",function(){return r}),i.constructors={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(62),a=n(133),r=n(15);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 i.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 a.FactionInfos)l(new i.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),i=Math.max(e,t);return Math.floor(Math.random()*(i-n+1))+n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),a=n(10),r=n(16),o=n(15);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.name=e.name,this.info=e.info,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*i.CONSTANTS.AugmentationRepMultiplier*a.BitNodeMultipliers.AugmentationRepCost,this.baseCost=e.moneyCost*i.CONSTANTS.AugmentationCostMultiplier*a.BitNodeMultipliers.AugmentationMoneyCost,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";Object.defineProperty(t,"__esModule",{value:!0});const i=n(45),a={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:a.AutosaveInterval,CodeInstructionRunTime:25,DisableHotkeys:a.DisableHotkeys,Editor:i.EditorSetting.Ace,EditorKeybinding:i.AceKeybindingSetting.Ace,EditorTheme:"Monokai",Locale:"en",MaxLogCapacity:a.MaxLogCapacity,MaxPortCapacity:a.MaxPortCapacity,OwnedAugmentationsOrder:i.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:i.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:a.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:a.SuppressFactionInvites,SuppressHospitalizationPopup:a.SuppressHospitalizationPopup,SuppressMessages:a.SuppressMessages,SuppressTravelConfirmation:a.SuppressTravelConfirmation,init(){Object.assign(t.Settings,a)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(256),a=n(76),r=n(15);t.Companies={},t.initCompanies=function(){const e=t.Companies;var n;t.Companies={},i.companiesMetadata.forEach(e=>{n=e,null!=t.Companies[n.name]&&console.warn(`Duplicate Company Position being defined: ${n.name}`),t.Companies[n.name]=new a.Company(n)});for(const n in t.Companies){const i=t.Companies[n];e[n]instanceof a.Company?(i.favor=e[n].favor,isNaN(i.favor)&&(i.favor=0)):i.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 i=n(61);t.clearEventListeners=function(e){try{let t;const n=(t="string"==typeof e?i.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 i=n(21);t.yesNoBoxOpen=!1;const a=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 a?a.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 i.clearEventListeners("yes-no-box-yes")},t.yesNoBoxGetNoButton=function(){return i.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"),a?a.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 i.clearEventListeners("yes-no-text-input-box-yes")},t.yesNoTxtInpBoxGetNoButton=function(){return i.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 i=n(61),a=n(66);t.removeElementById=function(e){try{const t=i.getElementById(e);a.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";n.d(t,"c",function(){return M}),n.d(t,"d",function(){return P}),n.d(t,"e",function(){return A}),n.d(t,"i",function(){return x}),n.d(t,"h",function(){return R}),n.d(t,"j",function(){return N}),n.d(t,"q",function(){return I}),n.d(t,"p",function(){return B}),n.d(t,"n",function(){return j}),n.d(t,"m",function(){return W}),n.d(t,"g",function(){return q}),n.d(t,"r",function(){return Q}),n.d(t,"k",function(){return w}),n.d(t,"o",function(){return U}),n.d(t,"l",function(){return O}),n.d(t,"f",function(){return C}),n.d(t,"a",function(){return v}),n.d(t,"b",function(){return k});var i=n(32),a=n(1),r=n(5),o=n(47),s=n(30),l=n(0),c=n(13),u=n(4),p=n(9),m=n(21),h=n(15),d=n(42),g=n(17),_=n(29),y=n(2),f=n(27),b=n(23),E=n(22),v={LimitBuy:"Limit Buy Order",LimitSell:"Limit Sell Order",StopBuy:"Stop Buy Order",StopSell:"Stop Sell Order"},k={Long:"L",Short:"S"};function O(e,t,n,a,r,o=null){var l=o instanceof s.b,c=new S(e,t,n,a,r);if(isNaN(t)||isNaN(n))return l?o.scriptRef.log("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"):Object(p.dialogBoxCreate)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;if(null==M.Orders){var u={};for(var m in M)if(M.hasOwnProperty(m)){if(!((e=M[m])instanceof i.Stock))continue;u[e.symbol]=[]}M.Orders=u}return M.Orders[e.symbol].push(c),F(c.stock,c.type,c.pos),Z(c.stock),!0}function C(e,t=null){var n=t instanceof s.b;if(null==M.Orders)return!1;if(e.order&&e.order instanceof S){for(var a=e.order,r=M.Orders[a.stock.symbol],o=0;o<r.length;++o)if(a==r[o])return r.splice(o,1),Z(a.stock),!0;return!1}if(e.stock&&e.shares&&e.price&&e.type&&e.pos&&e.stock instanceof i.Stock){r=M.Orders[e.stock.symbol];var l=e.stock.symbol+" - "+e.shares+" @ "+u.numeralWrapper.format(e.price,"$0.000a");for(o=0;o<r.length;++o){a=r[o];if(e.shares===a.shares&&e.price===a.price&&e.type===a.type&&e.pos===a.pos)return r.splice(o,1),Z(a.stock),n&&t.scriptRef.log("Successfully cancelled order: "+l),!0}return n&&t.scriptRef.log("Failed to cancel order: "+l),!1}return!1}function T(e){var t=e.stock,n=M.Orders[t.symbol],i=!0;switch(console.log("Executing the following order:"),console.log(e),e.type){case v.LimitBuy:case v.StopBuy:e.pos===k.Long?i=L(e.stock,e.shares)&&i:e.pos===k.Short&&(i=B(e.stock,e.shares)&&i);break;case v.LimitSell:case v.StopSell:e.pos===k.Long?i=D(e.stock,e.shares)&&i:e.pos===k.Short&&(i=j(e.stock,e.shares)&&i)}if(i){for(var a=0;a<n.length;++a)if(e==n[a])return n.splice(a,1),void Z(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 S(e,t,n,i,a){this.stock=e,this.shares=t,this.price=n,this.type=i,this.pos=a}S.prototype.toJSON=function(){return Object(h.Generic_toJSON)("Order",this)},S.fromJSON=function(e){return Object(h.Generic_fromJSON)(S,e.data)},h.Reviver.constructors.Order=S;let M={},P={},A={};function w(e){M=""===e?{}:JSON.parse(e,h.Reviver)}function x(){P[r.Locations.AevumECorp]="ECP",P[r.Locations.Sector12MegaCorp]="MGCP",P[r.Locations.Sector12BladeIndustries]="BLD",P[r.Locations.AevumClarkeIncorporated]="CLRK",P[r.Locations.VolhavenOmniTekIncorporated]="OMTK",P[r.Locations.Sector12FourSigma]="FSIG",P[r.Locations.ChongqingKuaiGongInternational]="KGI",P[r.Locations.AevumFulcrumTechnologies]="FLCM",P[r.Locations.IshimaStormTechnologies]="STM",P[r.Locations.NewTokyoDefComm]="DCOMM",P[r.Locations.VolhavenHeliosLabs]="HLS",P[r.Locations.NewTokyoVitaLife]="VITA",P[r.Locations.Sector12IcarusMicrosystems]="ICRS",P[r.Locations.Sector12UniversalEnergy]="UNV",P[r.Locations.AevumAeroCorp]="AERO",P[r.Locations.VolhavenOmniaCybersystems]="OMN",P[r.Locations.ChongqingSolarisSpaceSystems]="SLRS",P[r.Locations.NewTokyoGlobalPharmaceuticals]="GPH",P[r.Locations.IshimaNovaMedical]="NVMD",P[r.Locations.AevumWatchdogSecurity]="WDS",P[r.Locations.VolhavenLexoCorp]="LXO",P[r.Locations.AevumRhoConstruction]="RHOC",P[r.Locations.Sector12AlphaEnterprises]="APHE",P[r.Locations.VolhavenSysCoreSecurities]="SYSC",P[r.Locations.VolhavenCompuTek]="CTK",P[r.Locations.AevumNetLinkTechnologies]="NTLK",P[r.Locations.IshimaOmegaSoftware]="OMGA",P[r.Locations.Sector12FoodNStuff]="FNS",P["Sigma Cosmetics"]="SGC",P["Joes Guns"]="JGN",P["Catalyst Ventures"]="CTYS",P["Microdyne Technologies"]="MDYN",P["Titan Laboratories"]="TITN"}function R(){for(var e in M)M.hasOwnProperty(e)&&delete M[e];const t=g.getRandomInt;var n=r.Locations.AevumECorp,a=new i.Stock(n,P[n],t(40,50)/100,!0,19,t(17e3,28e3),24e11);M[n]=a;var o=r.Locations.Sector12MegaCorp,s=new i.Stock(o,P[o],t(40,50)/100,!0,19,t(24e3,34e3),24e11);M[o]=s;var l=r.Locations.Sector12BladeIndustries,c=new i.Stock(l,P[l],t(70,80)/100,!0,13,t(12e3,25e3),16e11);M[l]=c;var u=r.Locations.AevumClarkeIncorporated,p=new i.Stock(u,P[u],t(65,75)/100,!0,12,t(1e4,25e3),15e11);M[u]=p;var m=r.Locations.VolhavenOmniTekIncorporated,h=new i.Stock(m,P[m],t(60,70)/100,!0,12,t(32e3,43e3),18e11);M[m]=h;var d=r.Locations.Sector12FourSigma,_=new i.Stock(d,P[d],t(100,110)/100,!0,17,t(5e4,8e4),2e12);M[d]=_;var y=r.Locations.ChongqingKuaiGongInternational,f=new i.Stock(y,P[y],t(75,85)/100,!0,10,t(16e3,28e3),19e11);M[y]=f;var b=r.Locations.AevumFulcrumTechnologies,E=new i.Stock(b,P[b],t(120,130)/100,!0,16,t(29e3,36e3),2e12);M[b]=E;var v=r.Locations.IshimaStormTechnologies,k=new i.Stock(v,P[v],t(80,90)/100,!0,7,t(2e4,25e3),12e11);M[v]=k;var O=r.Locations.NewTokyoDefComm,C=new i.Stock(O,P[O],t(60,70)/100,!0,10,t(6e3,19e3),9e11);M[O]=C;var T=r.Locations.VolhavenHeliosLabs,S=new i.Stock(T,P[T],t(55,65)/100,!0,9,t(1e4,18e3),825e9);M[T]=S;var A=r.Locations.NewTokyoVitaLife,w=new i.Stock(A,P[A],t(70,80)/100,!0,7,t(8e3,14e3),1e12);M[A]=w;var x=r.Locations.Sector12IcarusMicrosystems,R=new i.Stock(x,P[x],t(60,70)/100,!0,7.5,t(12e3,24e3),8e11);M[x]=R;var N=r.Locations.Sector12UniversalEnergy,I=new i.Stock(N,P[N],t(50,60)/100,!0,10,t(16e3,29e3),9e11);M[N]=I;var L=r.Locations.AevumAeroCorp,D=new i.Stock(L,P[L],t(55,65)/100,!0,6,t(8e3,17e3),64e10);M[L]=D;var B=r.Locations.VolhavenOmniaCybersystems,j=new i.Stock(B,P[B],t(65,75)/100,!0,4.5,t(6e3,15e3),6e11);M[B]=j;var W=r.Locations.ChongqingSolarisSpaceSystems,F=new i.Stock(W,P[W],t(70,80)/100,!0,8.5,t(14e3,28e3),705e9);M[W]=F;var U=r.Locations.NewTokyoGlobalPharmaceuticals,H=new i.Stock(U,P[U],t(55,65)/100,!0,10.5,t(12e3,3e4),695e9);M[U]=H;var G=r.Locations.IshimaNovaMedical,K=new i.Stock(G,P[G],t(70,80)/100,!0,5,t(15e3,27e3),6e11);M[G]=K;var q=r.Locations.AevumWatchdogSecurity,$=new i.Stock(q,P[q],t(240,260)/100,!0,1.5,t(4e3,8500),45e10);M[q]=$;var Y=r.Locations.VolhavenLexoCorp,z=new i.Stock(Y,P[Y],t(115,135)/100,!0,6,t(4500,8e3),3e11);M[Y]=z;var V=r.Locations.AevumRhoConstruction,J=new i.Stock(V,P[V],t(50,70)/100,!0,1,t(2e3,7e3),18e10);M[V]=J;var X=r.Locations.Sector12AlphaEnterprises,Q=new i.Stock(X,P[X],t(175,205)/100,!0,10,t(4e3,8500),24e10);M[X]=Q;var Z=r.Locations.VolhavenSysCoreSecurities,ee=new i.Stock(Z,P[Z],t(150,170)/100,!0,3,t(3e3,8e3),2e11);M[Z]=ee;var te=r.Locations.VolhavenCompuTek,ne=new i.Stock(te,P[te],t(80,100)/100,!0,4,t(1e3,6e3),185e9);M[te]=ne;var ie=r.Locations.AevumNetLinkTechnologies,ae=new i.Stock(ie,P[ie],t(400,430)/100,!0,1,t(1e3,5e3),58e9);M[ie]=ae;var re=r.Locations.IshimaOmegaSoftware,oe=new i.Stock(re,P[re],t(90,110)/100,!0,.5,t(1e3,8e3),6e10);M[re]=oe;var se=r.Locations.Sector12FoodNStuff,le=new i.Stock(se,P[se],t(70,80)/100,!1,1,t(500,4500),45e9);M[se]=le;var ce=new i.Stock("Sigma Cosmetics",P["Sigma Cosmetics"],t(260,300)/100,!0,0,t(1500,3500),3e10);M["Sigma Cosmetics"]=ce;var ue=new i.Stock("Joes Guns",P["Joes Guns"],t(360,400)/100,!0,1,t(250,1500),42e9);M["Joes Guns"]=ue;var pe="Catalyst Ventures",me=new i.Stock(pe,P[pe],t(120,175)/100,!0,13.5,t(250,1500),1e11);M[pe]=me;var he="Microdyne Technologies",de=new i.Stock(he,P[he],t(70,80)/100,!0,8,t(15e3,3e4),36e10);M[he]=de;var ge="Titan Laboratories",_e=new i.Stock(ge,P[ge],t(50,70)/100,!0,11,t(12e3,24e3),42e10);M[ge]=_e;var ye={};for(var fe in M)if(M.hasOwnProperty(fe)){var be=M[fe];if(!(be instanceof i.Stock))continue;ye[be.symbol]=[]}M.Orders=ye,M.storedCycles=0,M.lastUpdate=0}function N(){for(var e in P)if(P.hasOwnProperty(e)){var t=M[e];if(null==t){console.error(`Could not find Stock for ${e}`);continue}var n=P[e];A[n]=t}}function I(){for(var e in M)if(M.hasOwnProperty(e)){var t=M[e];if(!(t instanceof i.Stock))continue;var n=.6;t.b&&(n=.4),Math.random()<n&&(t.b=!t.b)}}function L(e,t){if(0==(t=Math.round(t))||t<0)return!1;if(null==e||isNaN(t))return Object(p.dialogBoxCreate)("Failed to buy stock. This may be a bug, contact developer"),!1;var n=e.price*t;if(l.a.money.lt(n+a.CONSTANTS.StockMarketCommission))return Object(p.dialogBoxCreate)("You do not have enough money to purchase this. You need "+u.numeralWrapper.format(n+a.CONSTANTS.StockMarketCommission,"($0.000a)")+"."),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return Object(p.dialogBoxCreate)(`You cannot purchase this many shares. ${e.symbol} has a maximum of `+`${u.numeralWrapper.formatBigNumber(e.maxShares)} shares.`),!1;var i=e.playerShares*e.playerAvgPx;l.a.loseMoney(n+a.CONSTANTS.StockMarketCommission);var r=i+n;return e.playerShares=Math.round(e.playerShares+t),e.playerAvgPx=r/e.playerShares,Q(e),Object(p.dialogBoxCreate)("Bought "+u.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+u.numeralWrapper.format(e.price,"($0.000a)")+" per share. Paid "+u.numeralWrapper.format(a.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."),!0}function D(e,t){if(0==t)return!1;if(null==e||t<0||isNaN(t))return Object(p.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-a.CONSTANTS.StockMarketCommission;return l.a.gainMoney(n),e.playerShares=Math.round(e.playerShares-t),0==e.playerShares&&(e.playerAvgPx=0),Q(e),Object(p.dialogBoxCreate)("Sold "+u.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+u.numeralWrapper.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+u.numeralWrapper.format(n,"($0.000a)")+"."),!0}function B(e,t,n=null){var i=n instanceof s.b;if(0===(t=Math.round(t))||t<0)return!1;if(null==e||isNaN(t))return i?n.scriptRef.log("ERROR: shortStock() failed because of invalid arguments."):Object(p.dialogBoxCreate)("Failed to initiate a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;var r=e.price*t;if(l.a.money.lt(r+a.CONSTANTS.StockMarketCommission))return i?n.scriptRef.log("ERROR: shortStock() failed because you do not have enough money to purchase this short position. You need "+u.numeralWrapper.format(r+a.CONSTANTS.StockMarketCommission,"($0.000a)")+"."):Object(p.dialogBoxCreate)("You do not have enough money to purchase this short position. You need "+u.numeralWrapper.format(r+a.CONSTANTS.StockMarketCommission,"($0.000a)")+"."),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return i?n.scriptRef.log("ERROR: shortStock() failed because purchasing this many short shares would exceed "+`${e.symbol}'s maximum number of shares.`):Object(p.dialogBoxCreate)(`You cannot purchase this many shares. ${e.symbol} has a maximum of `+`${e.maxShares} shares.`),!1;var o=e.playerShortShares*e.playerAvgShortPx;l.a.loseMoney(r+a.CONSTANTS.StockMarketCommission);var c=o+r;return e.playerShortShares=Math.round(e.playerShortShares+t),e.playerAvgShortPx=c/e.playerShortShares,Q(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.shortStock&&n.scriptRef.log("Bought a short position of "+u.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+u.numeralWrapper.format(e.price,"($0.000a)")+" per share. Paid "+u.numeralWrapper.format(a.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."):Object(p.dialogBoxCreate)("Bought a short position of "+u.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+u.numeralWrapper.format(e.price,"($0.000a)")+" per share. Paid "+u.numeralWrapper.format(a.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."),!0}function j(e,t,n=null){var i=n instanceof s.b;if(null==e||isNaN(t)||t<0)return i?n.scriptRef.log("ERROR: sellShort() failed because of invalid arguments."):Object(p.dialogBoxCreate)("Failed to sell a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;if((t=Math.round(t))>e.playerShortShares&&(t=e.playerShortShares),0===t)return!1;var r=t*e.playerAvgShortPx,o=(e.playerAvgShortPx-e.price)*t-a.CONSTANTS.StockMarketCommission;return isNaN(o)&&(o=0),l.a.gainMoney(r+o),i&&(n.scriptRef.onlineMoneyMade+=o,l.a.scriptProdSinceLastAug+=o),e.playerShortShares=Math.round(e.playerShortShares-t),0===e.playerShortShares&&(e.playerAvgShortPx=0),Q(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.sellShort&&n.scriptRef.log("Sold your short position of "+u.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+u.numeralWrapper.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+u.numeralWrapper.format(r+o,"($0.000a)")+"."):Object(p.dialogBoxCreate)("Sold your short position of "+u.numeralWrapper.format(t,"0,0")+" shares of "+e.symbol+" at "+u.numeralWrapper.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+u.numeralWrapper.format(r+o,"($0.000a)")+"."),!0}function W(e=1){(null==M.storedCycles||isNaN(M.storedCycles))&&(M.storedCycles=0),M.storedCycles+=e;const t=6e3/a.CONSTANTS.MilliPerCycle;if(M.storedCycles<t)return;const n=(new Date).getTime();if(!(n-M.lastUpdate<4e3)){M.lastUpdate=n,M.storedCycles-=t;var r=Math.random();for(var o in M)if(M.hasOwnProperty(o)){var s=M[o];if(!(s instanceof i.Stock))continue;var l=r*s.mv/100;isNaN(l)&&(l=.02);var u=50;s.b?(u=(u+s.otlkMag)/100,isNaN(u)&&(u=.5)):(u=(u-s.otlkMag)/100,isNaN(u)&&(u=.5)),s.price>=s.cap&&(u=.1,s.b=!1);var p=Math.random();p<u?(s.price*=1+l,F(s,v.LimitBuy,k.Short),F(s,v.LimitSell,k.Long),F(s,v.StopBuy,k.Long),F(s,v.StopSell,k.Short),c.routing.isOn(c.Page.StockMarket)&&X(s,!0)):(s.price/=1+l,F(s,v.LimitBuy,k.Long),F(s,v.LimitSell,k.Short),F(s,v.StopBuy,k.Short),F(s,v.StopSell,k.Long),c.routing.isOn(c.Page.StockMarket)&&X(s,!1));var m=s.otlkMag*l;s.otlkMag<=.1&&(m=1),p<.5?s.otlkMag+=m:s.otlkMag-=m,s.otlkMag<0&&(s.otlkMag*=-1,s.b=!s.b)}}}function F(e,t,n){var a=M.Orders;if(null!=a){var r=a[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 v.LimitBuy:s.pos===k.Long&&e.price<=s.price?T(s):s.pos===k.Short&&e.price>=s.price&&T(s);break;case v.LimitSell:case v.StopBuy:s.pos===k.Long&&e.price>=s.price?T(s):s.pos===k.Short&&e.price<=s.price&&T(s);break;case v.StopSell:s.pos===k.Long&&e.price<=s.price?T(s):s.pos===k.Short&&e.price>=s.price&&T(s);break;default:return void console.log("Invalid order type: "+s.type)}}}else{var l={};for(var c in M)if(M.hasOwnProperty(c)){if(!((e=M[c])instanceof i.Stock))continue;l[e.symbol]=[]}M.Orders=l}}function U(e){H=e}var H=!1,G=!1,K=a.CONSTANTS.StockMarketCommission;function q(){function e(e,t,n,i,a){e.innerText=i,e.classList.remove("a-link-button"),e.classList.remove("a-link-button-bought"),e.classList.remove("a-link-button-inactive"),!n&&l.a.money.gte(t)?e.classList.add("a-link-button"):n?(e.innerText=a,e.classList.add("a-link-button-bought")):e.classList.add("a-link-button-inactive")}null==l.a.hasWseAccount&&(l.a.hasWseAccount=!1),null==l.a.hasTixApiAccess&&(l.a.hasTixApiAccess=!1),null==l.a.has4SData&&(l.a.has4SData=!1),null==l.a.has4SDataTixApi&&(l.a.has4SDataTixApi=!1);var t=Object(m.clearEventListeners)("stock-market-buy-account");e(t,a.CONSTANTS.WSEAccountCost,l.a.hasWseAccount,"Buy WSE Account - "+u.numeralWrapper.format(a.CONSTANTS.WSEAccountCost,"($0.000a)"),"WSE Account - Purchased"),t.addEventListener("click",function(){return l.a.hasWseAccount=!0,R(),N(),l.a.loseMoney(a.CONSTANTS.WSEAccountCost),q(),!1});var n=Object(m.clearEventListeners)("stock-market-buy-tix-api");e(n,a.CONSTANTS.TIXAPICost,l.a.hasTixApiAccess,"Buy Trade Information eXchange (TIX) API Access - "+u.numeralWrapper.format(a.CONSTANTS.TIXAPICost,"($0.000a)"),"TIX API Access - Purchased"),n.addEventListener("click",function(){return l.a.hasTixApiAccess=!0,l.a.loseMoney(a.CONSTANTS.TIXAPICost),q(),!1});var r=Object(m.clearEventListeners)("stock-market-buy-4s-data");e(r,a.CONSTANTS.MarketData4SCost,l.a.has4SData,"Buy 4S Market Data Access - "+u.numeralWrapper.format(a.CONSTANTS.MarketData4SCost,"($0.000a)"),"4S Market Data - Purchased"),r.addEventListener("click",function(){return!l.a.money.lt(a.CONSTANTS.MarketData4SCost)&&(l.a.has4SData=!0,l.a.loseMoney(a.CONSTANTS.MarketData4SCost),q(),!1)}),r.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you view additional pricing and volatility information about stocks"})),r.style.marginRight="2px";var o=Object(m.clearEventListeners)("stock-market-4s-data-help-tip");o.style.marginTop="10px",o.addEventListener("click",()=>(Object(p.dialogBoxCreate)("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility<br><br>Price Forecast indicates the probability the stock has of increasing or decreasing. A '+' forecast means the stock has a higher chance of increasing than decreasing, and a '-' means the opposite. The number of '+/-' symbols is used to illustrate the magnitude of these probabilities. For example, '+++' means that the stock has a significantly higher chance of increasing than decreasing, while '+' means that the stock only has a slightly higher chance of increasing than decreasing.<br><br>Volatility represents the maximum percentage by which a stock's price can change every tick (a tick occurs every few seconds while the game is running).<br><br>A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change."),!1));var s=Object(m.clearEventListeners)("stock-market-buy-4s-tix-api");if(e(s,a.CONSTANTS.MarketDataTixApi4SCost,l.a.has4SDataTixApi,"Buy 4S Market Data TIX API Access - "+u.numeralWrapper.format(a.CONSTANTS.MarketDataTixApi4SCost,"($0.000a)"),"4S Market Data TIX API - Purchased"),l.a.hasTixApiAccess?(s.addEventListener("click",function(){return!l.a.money.lt(a.CONSTANTS.MarketDataTixApi4SCost)&&(l.a.has4SDataTixApi=!0,l.a.loseMoney(a.CONSTANTS.MarketDataTixApi4SCost),q(),!1)}),s.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you access 4S Market Data through Netscript"}))):(s.classList.remove("a-link-button"),s.classList.remove("a-link-button-bought"),s.classList.remove("a-link-button-inactive"),s.classList.add("a-link-button-inactive"),s.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Requires TIX API Access"}))),null!=(E=document.getElementById("stock-market-list"))){var c=document.getElementById("stock-market-commission"),h=document.getElementById("stock-market-mode"),d=document.getElementById("stock-market-expand-tickers"),g=document.getElementById("stock-market-collapse-tickers"),f=document.getElementById("stock-market-watchlist-filter"),b=document.getElementById("stock-market-watchlist-filter-update");if(!l.a.hasWseAccount){for(H=!1;E.firstChild;)E.removeChild(E.firstChild);return c.style.visibility="hidden",h.style.visibility="hidden",d.style.visibility="hidden",g.style.visibility="hidden",f.style.visibility="hidden",void(b.style.visibility="hidden")}if(c.style.visibility="visible",h.style.visibility="visible",d.style.visibility="visible",g.style.visibility="visible",f.style.visibility="visible",b.style.visibility="visible",!H&&l.a.hasWseAccount){console.log("Creating Stock Market UI"),c.innerHTML="Commission Fees: Every transaction you make has a "+u.numeralWrapper.format(a.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(m.clearEventListeners)("stock-market-investopedia").addEventListener("click",function(){return Object(p.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}),h&&(G=!1,h.innerHTML="Switch to 'Portfolio' Mode<span class='tooltiptext'>Displays only the stocks for which you have shares or orders</span>",h.addEventListener("click",$));var E=document.getElementById("stock-market-list");d&&d.addEventListener("click",()=>{for(var e=E.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")||e[t].click()}),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()}),f&&b?(M.watchlistFilter&&(f.value=M.watchlistFilter),b.addEventListener("click",()=>{let e=f.value.toString();M.watchlistFilter=e.replace(/\s/g,""),G?$():Y()}),f.addEventListener("keyup",e=>{e.preventDefault(),e.keyCode===_.KEY.ENTER&&b.click()})):console.warn("Stock Market Watchlist DOM elements could not be found"),z(),H=!0}if(l.a.hasWseAccount)for(var v in M)if(M.hasOwnProperty(v)){var k=M[v];k instanceof i.Stock&&(X(k,null),Z(k))}}}function $(){G=!0;var e=Object(m.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",Y)),z()}function Y(){G=!1;var e=Object(m.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()}function z(){var e=document.getElementById("stock-market-list");null==e&&Object(d.exceptionAlert)("Error creating Stock Tickers UI. DOM element with ID 'stock-market-list' could not be found"),Object(f.removeChildrenFromElement)(e);var t=M.Orders;if(null==t){var n={};for(var a in M)if(M.hasOwnProperty(a)){if(!((o=M[a])instanceof i.Stock))continue;n[o.symbol]=[]}M.Orders=n,t=M.Orders}let r=null;if(null!=M.watchlistFilter&&""!==M.watchlistFilter){r=M.watchlistFilter.replace(/\s/g,"").split(",")}for(var a in M)if(M.hasOwnProperty(a)){var o;if(!((o=M[a])instanceof i.Stock))continue;if(r&&!r.includes(o.symbol))continue;let e=t[o.symbol];if(G&&0===o.playerShares&&0===o.playerShortShares&&0===e.length)continue;V(o)}J()}function V(e){if(e instanceof i.Stock){var t="stock-market-ticker-"+e.symbol,n=document.createElement("li"),a=document.createElement("button");a.classList.add("accordion-header"),a.setAttribute("id",t+"-hdr"),a.innerHTML=e.name+" - "+e.symbol+" - "+u.numeralWrapper.format(e.price,"($0.000a)");var r=document.createElement("div");r.classList.add("accordion-panel"),r.setAttribute("id",t+"-panel");var s=document.createElement("input"),c=document.createElement("select"),m=document.createElement("select"),h=document.createElement("span"),d=document.createElement("span"),g=document.createElement("span"),_=document.createElement("span"),y=document.createElement("p"),f=document.createElement("ul");s.classList.add("stock-market-input"),s.placeholder="Quantity (Shares)",s.setAttribute("id",t+"-qty-input"),s.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) )"),c.classList.add("stock-market-input"),c.setAttribute("id",t+"-pos-selector");var b=document.createElement("option");if(b.text="Long",c.add(b),8===l.a.bitNodeN||o.f&&o.h>=2){var C=document.createElement("option");C.text="Short",c.add(C)}m.classList.add("stock-market-input"),m.setAttribute("id",t+"-order-selector");var T=document.createElement("option");if(T.text="Market Order",m.add(T),8===l.a.bitNodeN||o.f&&o.h>=3){var S=document.createElement("option");S.text="Limit Order",m.add(S);var M=document.createElement("option");M.text="Stop Order",m.add(M)}h.classList.add("stock-market-input"),h.classList.add("a-link-button"),h.innerHTML="Buy",h.addEventListener("click",()=>{var n=c.options[c.selectedIndex].text;n="Long"===n?k.Long:k.Short;var i=m.options[m.selectedIndex].text,a=Number(document.getElementById(t+"-qty-input").value);if(isNaN(a))return!1;switch(i){case"Market Order":n===k.Long?L(e,a):B(e,a,null);break;case"Limit Order":case"Stop Order":var r=Object(E.yesNoTxtInpBoxGetYesButton)(),o=Object(E.yesNoTxtInpBoxGetNoButton)();r.innerText="Place Buy "+i,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(E.yesNoTxtInpBoxGetInput)());t="Limit Order"===i?v.LimitBuy:v.StopBuy,O(e,a,r,t,n),Object(E.yesNoTxtInpBoxClose)()}),o.addEventListener("click",()=>{Object(E.yesNoTxtInpBoxClose)()}),Object(E.yesNoTxtInpBoxCreate)("Enter the price for your "+i);break;default:console.log("ERROR: Invalid order type")}return!1}),d.classList.add("stock-market-input"),d.classList.add("a-link-button"),d.innerHTML="Sell",d.addEventListener("click",()=>{var n=c.options[c.selectedIndex].text;n="Long"===n?k.Long:k.Short;var i=m.options[m.selectedIndex].text,a=Number(document.getElementById(t+"-qty-input").value);if(isNaN(a))return!1;switch(i){case"Market Order":n===k.Long?D(e,a):j(e,a,null);break;case"Limit Order":case"Stop Order":var r=Object(E.yesNoTxtInpBoxGetYesButton)(),o=Object(E.yesNoTxtInpBoxGetNoButton)();r.innerText="Place Sell "+i,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(E.yesNoTxtInpBoxGetInput)());t="Limit Order"===i?v.LimitSell:v.StopSell,Object(E.yesNoTxtInpBoxClose)(),O(e,a,r,t,n)}),o.addEventListener("click",()=>{Object(E.yesNoTxtInpBoxClose)()}),Object(E.yesNoTxtInpBoxCreate)("Enter the price for your "+i);break;default:console.log("ERROR: Invalid order type")}return!1}),g.classList.add("stock-market-input"),g.classList.add("a-link-button"),g.innerHTML="Buy MAX",g.addEventListener("click",()=>{var t=c.options[c.selectedIndex].text;t="Long"===t?k.Long:k.Short;var n=m.options[m.selectedIndex].text,i=l.a.money.toNumber();switch(n){case"Market Order":var a=Math.floor((i-K)/e.price);a=Math.min(a,Math.round(e.maxShares-e.playerShares-e.playerShortShares)),t===k.Long?L(e,a):B(e,a,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 a,r=Number(Object(E.yesNoTxtInpBoxGetInput)());a="Limit Order"===n?v.LimitBuy:v.StopBuy;var o=Math.floor((i-K)/r);o=Math.min(o,Math.round(e.maxShares-e.playerShares-e.playerShortShares)),O(e,o,r,a,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}),_.classList.add("stock-market-input"),_.classList.add("a-link-button"),_.innerHTML="Sell ALL",_.addEventListener("click",()=>{var t=c.options[c.selectedIndex].text;switch(t="Long"===t?k.Long:k.Short,m.options[m.selectedIndex].text){case"Market Order":if(t===k.Long){var n=e.playerShares;D(e,n)}else{n=e.playerShortShares;j(e,n,null)}break;case"Limit Order":case"Stop Order":Object(p.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,f.setAttribute("id",t+"-order-list"),f.classList.add("stock-market-order-list"),r.appendChild(s),r.appendChild(c),r.appendChild(m),r.appendChild(h),r.appendChild(d),r.appendChild(g),r.appendChild(_),r.appendChild(y),r.appendChild(f),n.appendChild(a),n.appendChild(r),document.getElementById("stock-market-list").appendChild(n),X(e,!0),Q(e),Z(e)}else console.log("Invalid stock in createStockSticker()")}function J(){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 X(e,t){if(!c.routing.isOn(c.Page.StockMarket))return;if(!(e instanceof i.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)&&Q(e);var a=document.getElementById(n+"-hdr");if(null==a){if(!G){let t=M.watchlistFilter;""!==t&&t.includes(e.symbol)&&console.log("ERROR: Couldn't find ticker element for stock: "+e.symbol)}return}let r=e.name+" ("+e.symbol+") - "+u.numeralWrapper.format(e.price,"($0.000a)");l.a.has4SData&&(r+=" - Volatility: "+u.numeralWrapper.format(e.mv,"0,0.00")+"% - Price Forecast: ",e.b?r+="+".repeat(Math.floor(e.otlkMag/10)+1):r+="-".repeat(Math.floor(e.otlkMag/10)+1)),a.innerText=r,null!=t&&(a.style.color=t?"#66ff33":"red")}function Q(e){if(!c.routing.isOn(c.Page.StockMarket))return;if(!(e instanceof i.Stock))return console.log("Invalid stock in updateStockPlayerPosition():"),void console.log(e);var t="stock-market-ticker-"+e.symbol;if(G){if(0===e.playerShares&&0===e.playerShortShares&&M.Orders&&M.Orders[e.symbol]&&0===M.Orders[e.symbol].length)return Object(b.removeElementById)(t+"-hdr"),void Object(b.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return V(e),void J()}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 a=(e.price-e.playerAvgPx)*e.playerShares,r=a/n;isNaN(r)&&(r=0);const s=e.playerShortShares*e.playerAvgShortPx;let p=(e.playerAvgShortPx-e.price)*e.playerShortShares,m=p/s;isNaN(m)&&(m=0),e.posTxtEl.innerHTML=`Max Shares: ${u.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: "+u.numeralWrapper.format(e.playerShares,"0,0")+"<br>Average Price: "+u.numeralWrapper.format(e.playerAvgPx,"$0.000a")+" (Total Cost: "+u.numeralWrapper.format(n,"$0.000a")+")<br>Profit: "+u.numeralWrapper.format(a,"$0.000a")+" ("+u.numeralWrapper.format(r,"0.00%")+")<br>",(8===l.a.bitNodeN||o.f&&o.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: "+u.numeralWrapper.format(e.playerShortShares,"0,0")+"<br>Average Price: "+u.numeralWrapper.formatMoney(e.playerAvgShortPx)+" (Total Cost: "+u.numeralWrapper.formatMoney(s)+")<br>Profit: "+u.numeralWrapper.formatMoney(p)+" ("+u.numeralWrapper.format(m,"0.00%")+")<br><br><h3 class='stock-market-position-text'>Orders:</h3>")}function Z(e){if(c.routing.isOn(c.Page.StockMarket)){var t="stock-market-ticker-"+e.symbol,n=document.getElementById(t+"-order-list");if(null!=n){var i=M.Orders;if(null!=i){var a=i[e.symbol];if(null!=a){if(G){if(0===e.playerShares&&0===e.playerShortShares&&M.Orders&&M.Orders[e.symbol]&&0===M.Orders[e.symbol].length)return Object(b.removeElementById)(t+"-hdr"),void Object(b.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return V(e),void J()}for(;n.firstChild;)n.removeChild(n.firstChild);for(var r=0;r<a.length;++r)!function(){var e=a[r],t=document.createElement("li");t.style.padding="4px";var i=e.pos===k.Long?"Long Position":"Short Position";t.style.color="white",t.innerText=e.type+" - "+i+" - "+e.shares+" @ "+u.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 C({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(!G){let t=M.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 i=n(255),a=n(4);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: "+a.numeralWrapper.format(t.IndustryStartingCosts.Energy,"$0.000a")+"<br>Recommended starting Industry: NO",Utilities:"Distributes water and provides wastewater services.<br><br>Starting cost: "+a.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: "+a.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: "+a.numeralWrapper.format(t.IndustryStartingCosts.Fishing,"$0.000a")+"<br>Recommended starting Industry: NO",Mining:"Extract and process metals from the earth.<br><br>Starting cost: "+a.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: "+a.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: "+a.numeralWrapper.format(t.IndustryStartingCosts.Tobacco,"$0.000a")+"<br>Recommended starting Industry: YES",Chemical:"Product industrial chemicals<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Chemical,"$0.000a")+"<br>Recommended starting Industry: NO",Pharmaceutical:"Discover, develop, and create new pharmaceutical drugs.<br><br>Starting cost: "+a.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: "+a.numeralWrapper.format(t.IndustryStartingCosts.Computer,"$0.000a")+"<br>Recommended starting Industry: NO",Robotics:"Develop and create robots.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Robotics,"$0.000a")+"<br>Recommended starting Industry: NO",Software:"Develop computer software and create AI Cores.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Software,"$0.000a")+"<br>Recommended starting Industry: YES",Healthcare:"Create and manage hospitals.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Healthcare,"$0.000a")+"<br>Recommended starting Industry: NO",RealEstate:"Develop and manage real estate properties.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.RealEstate,"$0.000a")+"<br>Recommended starting Industry: NO"},t.IndustryResearchTrees={Energy:i.getBaseResearchTreeCopy(),Utilities:i.getBaseResearchTreeCopy(),Agriculture:i.getBaseResearchTreeCopy(),Fishing:i.getBaseResearchTreeCopy(),Mining:i.getBaseResearchTreeCopy(),Food:i.getBaseResearchTreeCopy(),Tobacco:i.getBaseResearchTreeCopy(),Chemical:i.getBaseResearchTreeCopy(),Pharmaceutical:i.getBaseResearchTreeCopy(),Computer:i.getBaseResearchTreeCopy(),Robotics:i.getBaseResearchTreeCopy(),Software:i.getBaseResearchTreeCopy(),Healthcare:i.getBaseResearchTreeCopy(),RealEstate:i.getBaseResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=i.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=i.getBaseResearchTreeCopy()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(21);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=i.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 i=n(44),a=n(61);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=i.isString(e)?a.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});const i=n(237),a=n(236);t.Programs={};for(const e of a.programsMetadata)t.Programs[e.key]=new i.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,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";n.d(t,"b",function(){return k}),n.d(t,"h",function(){return O}),n.d(t,"a",function(){return C}),n.d(t,"f",function(){return A}),n.d(t,"d",function(){return w}),n.d(t,"c",function(){return x}),n.d(t,"g",function(){return R}),n.d(t,"e",function(){return S});var i=n(77),a=n(1),r=n(11),o=n(156),s=n(135),l=n(7),c=n(47),u=n(136),p=n(81),m=n(12),h=n(19),d=n(127),g=n(54),_=n(9),y=n(107),f=n(63),b=n(95),E=n(3);const v=n(175);function k(e){this.name=e.filename,this.running=!1,this.serverIp=null,this.code=e.scriptRef.code,this.env=new s.a(this),this.env.set("args",e.args.slice()),this.output="",this.ramUsage=0,this.scriptRef=e,this.errorMessage="",this.args=e.args.slice(),this.delay=null,this.fnWorker=null,this.checkingRam=!1,this.loadedFns={},this.disableLogs={},this.dynamicRamUsage=a.CONSTANTS.ScriptBaseRamCost,this.dynamicLoadedFns={}}k.prototype.getServer=function(){return m.b[this.serverIp]},k.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},k.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},k.prototype.shouldLog=function(e){return null==this.disableLogs.ALL&&null==this.disableLogs[e]},k.prototype.log=function(e){this.scriptRef.log(e)};let O=[];for(var C=[],T=0;T<a.CONSTANTS.NumNetscriptPorts;++T)C.push(new p.a);function S(){for(var e=0;e<O.length;++e)Object(i.b)(O[e]),O[e].env.stopFlag=!0;Object(i.c)(5e3),O.length=0}function M(e){e.running=!0;let t=null;function n(n,i){return function(...a){if(e.env.stopFlag)throw e;if("sleep"===n)return i(...a);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=i(...a)}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 P(e){var t,n,i=e.code;e.running=!0;try{let a=function(e,t){var n=Object(g.parse)(e,{ecmaVersion:6,allowReserved:!0,sourceType:"module"}),i=t.getServer();if(null==i)throw new Error("Failed to find underlying Server object for script");var a="",r=!1;if(v.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<i.scripts.length;++t)if(i.scripts[t].filename===e)return i.scripts[t];return null}(t);if(null==n)throw new Error("'Import' failed due to invalid script: "+t);let o=Object(g.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=[],i=[];v.simple(o,{FunctionDeclaration:e=>{n.push(e.id.name),i.push(e)}}),a="var "+t+";\n(function (namespace) {\n",i.forEach(e=>{a+=Object(d.generate)(e),a+="\n"}),n.forEach(e=>{a+="namespace."+e+" = "+e,a+="\n"}),a+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];v.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{a+=Object(d.generate)(e),a+="\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=(a.match(/\n/g)||[]).length-o;return e=Object(d.generate)(n),{code:e=a+e,lineOffset:s}}(i,e);t=a.code,n=a.lineOffset}catch(t){return Object(_.dialogBoxCreate)("Error processing Imports in "+e.name+":<br>"+t),e.env.stopFlag=!0,void(e.running=!1)}var a;try{a=new o.a(t,function(t,n){var i=Object(c.a)(e);for(let e in i){let a=i[e];if("function"==typeof a)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"run"===e||"exec"===e){let i=function(){let e=[];for(let t=0;t<arguments.length-1;++t)e.push(arguments[t]);let t=arguments[arguments.length-1];a.apply(null,e).then(function(e){t(e)})};t.setProperty(n,e,t.createAsyncFunction(i))}else if("sprintf"===e||"vsprintf"===e||"scp"===e||"write"==e||"read"===e||"tryWrite"===e){let i=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 a.apply(null,e)};t.setProperty(n,e,t.createNativeFunction(i))}else{let i=function(){let e=a.apply(null,arguments);return null==e?e:e.constructor===Array||e===Object(e)?t.nativeToPseudo(e):e};t.setProperty(n,e,t.createNativeFunction(i))}else t.setProperty(n,e,t.nativeToPseudo(a))}t.setProperty(n,"args",t.nativeToPseudo(e.args))},n)}catch(t){return Object(_.dialogBoxCreate)("Syntax ERROR in "+e.name+":<br>"+t),e.env.stopFlag=!0,void(e.running=!1)}return new Promise(function(t,n){try{!function i(){try{if(e.env.stopFlag)return n(e);a.step()?window.setTimeout(i,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 k?t:e)}})}function A(){for(var e=!1,t=O.length-1;t>=0;t--)if(0==O[t].running&&1==O[t].env.stopFlag){e=!0;var n=O[t].serverIp,a=O[t].name;m.b[n].ramUsed=0;for(let e=0;e<O.length;e++)O[e].serverIp===n&&e!==t&&(m.b[n].ramUsed+=O[e].ramUsage);Object(i.b)(O[t]);for(var r=0;r<m.b[n].runningScripts.length;r++)if(m.b[n].runningScripts[r].filename==a&&Object(y.compareArrays)(m.b[n].runningScripts[r].args,O[t].args)){m.b[n].runningScripts.splice(r,1);break}O.splice(t,1)}e&&Object(i.c)();for(t=0;t<O.length;t++)if(0==O[t].running&&0==O[t].env.stopFlag){let e=null;if(O[t].name.endsWith(".js")||O[t].name.endsWith(".ns"))e=M(O[t]);else if(!((e=P(O[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(_.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 k){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],i=t[2],a=t[3];Object(_.dialogBoxCreate)("Script runtime error: <br>Server Ip: "+n+"<br>Script name: "+i+"<br>Args:"+Object(f.arrayToString)(e.args)+"<br>"+a),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(_.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(_.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.log(e)}else console.log("Script returning with value: "+e[1])})}setTimeout(A,6e3)}function w(e,t){for(var n=0;n<O.length;n++)if(O[n].name==e.filename&&O[n].serverIp==t&&Object(y.compareArrays)(O[n].args,e.args)){O[n].env.stopFlag=!0,Object(l.c)(O[n]);for(var i=O[n];i.fnWorker;)i.fnWorker.env.stopFlag=!0,Object(l.c)(i.fnWorker),i=i.fnWorker;return!0}return!1}function x(e,t){e.filename;var n=1;e.threads&&!isNaN(e.threads)?n=e.threads:e.threads=1;var a=Object(b.roundToTwo)(e.scriptRef.ramUsage*n);if(a>t.maxRam-t.ramUsed)Object(_.dialogBoxCreate)("Not enough RAM to run script "+e.filename+" with args "+Object(f.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(b.roundToTwo)(t.ramUsed+a);var r=new k(e);r.serverIp=t.ip,r.ramUsage=a,Object(i.a)(r),O.push(r)}}function R(e=1){for(var t=e*r.Engine._idleSpeed/1e3,n=0;n<O.length;++n)O[n].scriptRef.onlineRunningTime+=t}},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 i=n(15),a=n(17);class r{static fromJSON(e){return i.Generic_fromJSON(r,e.data)}constructor(e="",t="",n=1,i=!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=i,this.otlkMag=r,this.cap=a.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 i.Generic_toJSON("Stock",this)}}t.Stock=r,i.Reviver.constructors.Stock=r},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"e",function(){return getCurrentEditor}),__webpack_require__.d(__webpack_exports__,"i",function(){return updateScriptEditorContent}),__webpack_require__.d(__webpack_exports__,"g",function(){return loadAllRunningScripts}),__webpack_require__.d(__webpack_exports__,"d",function(){return findRunningScript}),__webpack_require__.d(__webpack_exports__,"b",function(){return RunningScript}),__webpack_require__.d(__webpack_exports__,"c",function(){return Script}),__webpack_require__.d(__webpack_exports__,"a",function(){return AllServersMap}),__webpack_require__.d(__webpack_exports__,"h",function(){return scriptEditorInit}),__webpack_require__.d(__webpack_exports__,"f",function(){return isScriptFilename});var _Constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),_Constants__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_0__),_engine__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(11),_Fconf__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(52),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(38),_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(7),_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(47),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(30),_Player__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(0),_ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(93),_ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(92),_Server__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(12),_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(19),_Settings_Settings__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__),_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(45),_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_12__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(8),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_13__),_TextFile__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(73),_TextFile__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_14__),_utils_acorn__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(54),_utils_acorn__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_15__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(13),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_16__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(4),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(9),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(15),_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(107),_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_20__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(2),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(101),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_22__),_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(95),_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_23__);const walk=__webpack_require__(175);function isScriptFilename(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}var scriptEditorRamCheck=null,scriptEditorRamText=null;function scriptEditorInit(){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(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Beautify",clickListener:()=>{let e=getCurrentEditor();return null!=e&&e.beautifyScript(),!1}});scriptEditorRamText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});const n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__.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"});(scriptEditorRamCheck=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__.createElement)("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/index.html",innerText:"Netscript Documentation",target:"_blank"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_21__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(saveAndCloseScriptEditor(),!1)});e.appendChild(t),e.appendChild(a),e.appendChild(scriptEditorRamText),e.appendChild(scriptEditorRamCheck),e.appendChild(n),e.appendChild(i);const r={saveAndCloseFn:saveAndCloseScriptEditor,quitFn:_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.loadTerminalContent};_ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__.a.init(r),_ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__.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_Settings__WEBPACK_IMPORTED_MODULE_11__.Settings.Editor){o.selectedIndex=e;break}o.onchange=(()=>{const e=o.value;switch(e){case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_12__.EditorSetting.Ace:const t=_ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__.a.getCode(),n=_ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__.a.getFilename();_ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__.a.create(),_ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__.a.setInvisible(),_ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__.a.openScript(n,t);break;case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_12__.EditorSetting.CodeMirror:const i=_ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__.a.getCode(),a=_ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__.a.getFilename();_ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__.a.create(),_ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__.a.setInvisible(),_ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__.a.openScript(a,i);break;default:return void console.error(`Unrecognized Editor Setting: ${e}`)}_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__.Settings.Editor=e}),o.onchange()}function getCurrentEditor(){switch(_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__.Settings.Editor){case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_12__.EditorSetting.Ace:return _ScriptEditor_Ace__WEBPACK_IMPORTED_MODULE_8__.a;case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_12__.EditorSetting.CodeMirror:return _ScriptEditor_CodeMirror__WEBPACK_IMPORTED_MODULE_9__.a;default:throw console.log(`Invalid Editor Setting: ${_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__.Settings.Editor}`),new Error(`Invalid Editor Setting: ${_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__.Settings.Editor}`)}}async function updateScriptEditorContent(){var e=document.getElementById("script-editor-filename").value;if(null==scriptEditorRamCheck||!scriptEditorRamCheck.checked||!isScriptFilename(e))return void(scriptEditorRamText.innerText="N/A");let t;try{t=getCurrentEditor().getCode()}catch(e){return void(scriptEditorRamText.innerText="RAM: ERROR")}var n=t.repeat(1),i=await calculateRamUsage(n);scriptEditorRamText.innerText=-1!==i?"RAM: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__.numeralWrapper.format(i,"0.00")+" GB":"RAM: Syntax Error"}function saveAndCloseScriptEditor(){var e=document.getElementById("script-editor-filename").value;let t;try{t=getCurrentEditor().getCode()}catch(e){return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Something went wrong when trying to save (getCurrentEditor().getCode()). Please report to game developer with details")}if(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__.a.isRunning&&_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__.a.currStep===_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__.d.TerminalTypeScript){if("foodnstuff.script"!==e)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Leave the script name as 'foodnstuff'!");if(-1==(t=t.replace(/\s/g,"")).indexOf("while(true){hack('foodnstuff');}"))return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Please copy and paste the code from the tutorial!");let i=_Player__WEBPACK_IMPORTED_MODULE_7__.a.getCurrentServer();for(var n=0;n<i.scripts.length;n++)if(e==i.scripts[n].filename)return i.scripts[n].saveScript(),_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.loadTerminalContent(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__.b)();let a=new Script;return a.saveScript(),i.scripts.push(a),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__.b)()}if(""!=e)if(0!=checkValidFilename(e)){var i=_Player__WEBPACK_IMPORTED_MODULE_7__.a.getCurrentServer();if(".fconf"===e)try{Object(_Fconf__WEBPACK_IMPORTED_MODULE_2__.d)(t)}catch(e){return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)(`Invalid .fconf file: ${e}`)}else if(isScriptFilename(e)){for(n=0;n<i.scripts.length;n++)if(e==i.scripts[n].filename)return i.scripts[n].saveScript(),void _engine__WEBPACK_IMPORTED_MODULE_1__.Engine.loadTerminalContent();var a=new Script;a.saveScript(),i.scripts.push(a)}else{if(!e.endsWith(".txt"))return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.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 _engine__WEBPACK_IMPORTED_MODULE_1__.Engine.loadTerminalContent();var r=new _TextFile__WEBPACK_IMPORTED_MODULE_14__.TextFile(e,t);i.textFiles.push(r)}_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.loadTerminalContent()}else Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Script filename can contain only alphanumerics, hyphens, and underscores");else Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You must specify a filename!")}function checkValidFilename(e){return!!e.match(/^[.a-zA-Z0-9_-]+$/)}function Script(e="",t="",n=""){this.filename=e,this.code=t,this.ramUsage=0,this.server=n,this.module="",""!==this.code&&this.updateRamUsage()}$(document).keydown(function(e){!0!==_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__.Settings.DisableHotkeys&&_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_16__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_16__.Page.ScriptEditor)&&66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),saveAndCloseScriptEditor())}),Script.prototype.saveScript=function(){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_16__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_16__.Page.ScriptEditor)){const t=getCurrentEditor().getCode();this.code=t.replace(/^\s+|\s+$/g,"");var e=document.getElementById("script-editor-filename").value;this.filename=e,this.server=_Player__WEBPACK_IMPORTED_MODULE_7__.a.currentServer,this.updateRamUsage(),this.module=""}},Script.prototype.updateRamUsage=async function(){var e=this.code.repeat(1),t=await calculateRamUsage(e);-1!==t&&(this.ramUsage=Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_23__.roundToTwo)(t))};const 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]: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_15__.parse)(e,{sourceType:"module",ecmaVersion:8}),i=t+memCheckGlobalKey,a={};a[i]=new Set;let r={};var o=[];function s(e,n){const i=a[e]||(a[e]=new Set);n in r&&i.add(r[n]),i.add(t+"."+n),i.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:i},Object.assign({ImportDeclaration:(e,t,n)=>{const i=e.source.value;o.push(i),a[t.key].add(i+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]=i+"."+o.imported.name:a[t.key].add(i+".*")}},FunctionDeclaration:(e,n,i)=>{const a=t+"."+e.id.name;walk.recursive(e,{key:a},c())}},c())),{dependencyMap:a,additionalModules:o}}async function calculateRamUsage(e){var t=_Player__WEBPACK_IMPORTED_MODULE_7__.a.getCurrentServer(),n=new _NetscriptWorker__WEBPACK_IMPORTED_MODULE_6__.b({filename:"foo",scriptRef:{code:""},args:[]});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 i=Object(_utils_acorn__WEBPACK_IMPORTED_MODULE_15__.parse)(e,{sourceType:"module"})}catch(e){return-1}var a=[],r=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptBaseRamCost,o=!1,s=!1,l=!1;for(a.push(i);0!=a.length;){var c=a.shift();switch(c.type){case"ImportDeclaration":for(var u=Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_4__.a)(c,n,!0),p=0;p<u.length;++p)a.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_15__.Node&&a.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_15__.Node&&a.push(c[h])}return e.includes("hacknet")&&(r+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptHacknetNodesRamCost),r}function loadAllRunningScripts(){var e=0;let t=-1!==window.location.href.toLowerCase().indexOf("?noscripts");for(var n in t&&console.log("Skipping the load of any scripts during startup"),_Server__WEBPACK_IMPORTED_MODULE_10__.b)if(_Server__WEBPACK_IMPORTED_MODULE_10__.b.hasOwnProperty(n)){var i=_Server__WEBPACK_IMPORTED_MODULE_10__.b[n];i.ramUsed=0;for(var a=0;a<i.scripts.length;++a)i.scripts[a].module="";if(t)i.runningScripts.length=0;else for(var r=0;r<i.runningScripts.length;++r)0,i.runningScripts[r].scriptRef.module="",Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_6__.c)(i.runningScripts[r],i),e+=scriptCalculateOfflineProduction(i.runningScripts[r])}return e}function scriptCalculateOfflineProduction(e){var t=((new Date).getTime()-_Player__WEBPACK_IMPORTED_MODULE_7__.a.lastUpdate)/1e3,n=e.onlineRunningTime/14400;for(var i in n>=1&&(n=1),e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][2]||null==e.dataMap[i][2])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_10__.b[i]))continue;var a=Math.round(.5*e.dataMap[i][2]/e.onlineRunningTime*t);console.log(e.filename+" called grow() on "+u.hostname+" "+a+" times while offline"),e.log("Called grow() on "+u.hostname+" "+a+" times while offline");var r=Object(_Server__WEBPACK_IMPORTED_MODULE_10__.k)(u,450*a);e.log(u.hostname+" grown by "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__.numeralWrapper.format(100*r-100,"0.000000%")+" from grow() calls made while offline")}var o=0;for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][0]||null==e.dataMap[i][0])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_10__.b[i]))continue;var s=.5*e.dataMap[i][0]/e.onlineRunningTime*t;(s*=n)>u.moneyAvailable&&(s=u.moneyAvailable),o+=s,_Player__WEBPACK_IMPORTED_MODULE_7__.a.gainMoney(s),console.log(e.filename+" generated $"+s+" while offline by hacking "+u.hostname),e.log(e.filename+" generated $"+s+" while offline by hacking "+u.hostname),u.moneyAvailable-=s,u.moneyAvailable<0&&(u.moneyAvailable=0),isNaN(u.moneyAvailable)&&(u.moneyAvailable=0)}var l=e.onlineExpGained/e.onlineRunningTime*.5*t;for(var i in l*=n,_Player__WEBPACK_IMPORTED_MODULE_7__.a.gainHackingExp(l),e.offlineMoneyMade+=o,e.offlineRunningTime+=t,e.offlineExpGained+=l,e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][1]||null==e.dataMap[i][1])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_10__.b[i]))continue;var c=Math.round(.5*e.dataMap[i][1]/e.onlineRunningTime*t);console.log(e.filename+" hacked "+u.hostname+" "+c+" times while offline"),e.log("Hacked "+u.hostname+" "+c+" times while offline"),u.fortify(_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ServerFortifyAmount*c)}for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][3]||null==e.dataMap[i][3])continue;var u;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_10__.b[i]))continue;var p=Math.round(.5*e.dataMap[i][3]/e.onlineRunningTime*t);console.log(e.filename+" called weaken() on "+u.hostname+" "+p+" times while offline"),e.log("Called weaken() on "+u.hostname+" "+p+" times while offline"),u.weaken(_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ServerWeakenAmount*p)}return o}function findRunningScript(e,t,n){for(var i=0;i<n.runningScripts.length;++i)if(n.runningScripts[i].filename==e&&Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_20__.compareArrays)(n.runningScripts[i].args,t))return n.runningScripts[i];return null}function RunningScript(e,t){null!=e&&void 0!=e&&(this.filename=e.filename,this.args=t,this.scriptRef=e,this.server=e.server,this.logs=[],this.logUpd=!1,this.offlineRunningTime=.01,this.offlineMoneyMade=0,this.offlineExpGained=0,this.onlineRunningTime=.01,this.onlineMoneyMade=0,this.onlineExpGained=0,this.threads=1,this.dataMap=new AllServersMap([0,0,0,0],!0))}function AllServersMap(e=!1,t=!1){for(var n in _Server__WEBPACK_IMPORTED_MODULE_10__.b)if(_Server__WEBPACK_IMPORTED_MODULE_10__.b.hasOwnProperty(n)){if(t&&(_Server__WEBPACK_IMPORTED_MODULE_10__.b[n].purchasedByPlayer||"home"===_Server__WEBPACK_IMPORTED_MODULE_10__.b[n].hostname))continue;this[n]=e?[0,0,0,0]:0}}Script.prototype.download=function(){var 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"),i=URL.createObjectURL(t);n.href=i,n.download=e,document.body.appendChild(n),n.click(),setTimeout(function(){document.body.removeChild(n),window.URL.revokeObjectURL(i)},0)}},Script.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Generic_toJSON)("Script",this)},Script.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Generic_fromJSON)(Script,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Reviver.constructors.Script=Script,RunningScript.prototype.log=function(e){this.logs.length>_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__.Settings.MaxLogCapacity&&this.logs.shift();let t=e;_Fconf__WEBPACK_IMPORTED_MODULE_2__.a.ENABLE_TIMESTAMPS&&(t="["+Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_22__.getTimestamp)()+"] "+t),this.logs.push(t),this.logUpd=!0},RunningScript.prototype.displayLog=function(){for(var e=0;e<this.logs.length;++e)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_13__.post)(this.logs[e])},RunningScript.prototype.clearLog=function(){this.logs.length=0},RunningScript.prototype.recordHack=function(e,t,n=1){null==this.dataMap&&(this.dataMap=new AllServersMap([0,0,0,0],!0)),this.dataMap[e][0]+=t,this.dataMap[e][1]+=n},RunningScript.prototype.recordGrow=function(e,t=1){null==this.dataMap&&(this.dataMap=new AllServersMap([0,0,0,0],!0)),this.dataMap[e][2]+=t},RunningScript.prototype.recordWeaken=function(e,t=1){null==this.dataMap&&(this.dataMap=new AllServersMap([0,0,0,0],!0)),this.dataMap[e][3]+=t},RunningScript.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Generic_toJSON)("RunningScript",this)},RunningScript.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Generic_fromJSON)(RunningScript,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Reviver.constructors.RunningScript=RunningScript,AllServersMap.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Generic_toJSON)("AllServersMap",this)},AllServersMap.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Generic_fromJSON)(AllServersMap,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_19__.Reviver.constructors.AllServersMap=AllServersMap}).call(this,__webpack_require__(72))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(257),a=n(105);var r;t.CompanyPositions={},i.companyPositionMetadata.forEach(e=>{r=e,null!=t.CompanyPositions[r.name]&&console.warn(`Duplicate Company Position being defined: ${r.name}`),t.CompanyPositions[r.name]=new a.CompanyPosition(r)})},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return V});var i=n(14),a=n(6),r=n(10),o=n(1),s=n(11),l=n(62),c=n(16),u=n(51),p=n(5),m=n(0),h=n(67),d=n(4),g=n(29),_=n(90),y=n(9),f=n(27),b=n(15),E=n(74),v=n(59),k=n(87),O=n(2),C=n(40),T=n(13),S=n(42),M=n(3),P=n(17),A=n(101),w=n(66),x=n(23),R=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],N=1e9,I="bladeburner-active-action",L=0,D={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 B(e={}){this.name=e.name?e.name:p.Locations.Sector12,this.pop=e.pop?e.pop:Object(P.getRandomInt)(8e8,1.2*N),this.popEst=this.pop*(Math.random()+.5),this.comms=e.comms?e.comms:Object(P.getRandomInt)(5,100),this.commsEst=this.comms+Object(P.getRandomInt)(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}function j(e={name:"foo",desc:"foo"}){if(!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(this.name=e.name,!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.desc=e.desc,this.baseCost=e.baseCost?e.baseCost:1,this.costInc=e.costInc?e.costInc:1,e.maxLvl&&(this.maxLvl=e.maxLvl),e.successChanceAll&&(this.successChanceAll=e.successChanceAll),e.successChanceStealth&&(this.successChanceStealth=e.successChanceStealth),e.successChanceKill&&(this.successChanceKill=e.successChanceKill),e.successChanceContract&&(this.successChanceContract=e.successChanceContract),e.successChanceOperation&&(this.successChanceOperation=e.successChanceOperation),e.successChanceEstimate&&(this.successChanceEstimate=e.successChanceEstimate),e.actionTime&&(this.actionTime=e.actionTime),e.effHack&&(this.effHack=e.effHack),e.effStr&&(this.effStr=e.effStr),e.effDef&&(this.effDef=e.effDef),e.effDex&&(this.effDex=e.effDex),e.effAgi&&(this.effAgi=e.effAgi),e.effCha&&(this.effCha=e.effCha),e.stamina&&(this.stamina=e.stamina),e.weaponAbility&&(this.weaponAbility=e.weaponAbility),e.gunAbility&&(this.gunAbility=e.gunAbility)}e(document).keydown(function(e){if(T.routing.isOn(T.Page.Bladeburner)){if(!(m.a.bladeburner instanceof V))return;let r=m.a.bladeburner.consoleHistory;if(e.keyCode===g.KEY.ENTER){e.preventDefault();var t=J.consoleInput.value;t.length>0&&(m.a.bladeburner.postToConsole("> "+t),m.a.bladeburner.resetConsoleInput(),m.a.bladeburner.executeConsoleCommands(t))}if(e.keyCode===g.KEY.UPARROW){if(null==J.consoleInput)return;var n=L;if(0===(a=r.length))return;(n<0||n>a)&&(L=a),0!==n&&--L;var i=r[L];J.consoleInput.value=i,setTimeout(function(){J.consoleInput.selectionStart=J.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===g.KEY.DOWNARROW){if(null==J.consoleInput)return;var a;n=L;if(0==(a=r.length))return;if((n<0||n>a)&&(L=a),n==a||n==a-1)L=a,J.consoleInput.value="";else{i=r[++L];J.consoleInput.value=i}}}}),B.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))},B.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))},B.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))},B.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)},B.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}},B.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))},B.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)}},B.prototype.toJSON=function(){return Object(b.Generic_toJSON)("City",this)},B.fromJSON=function(e){return Object(b.Generic_fromJSON)(B,e.data)},b.Reviver.constructors.City=B,j.prototype.calculateCost=function(e){return Math.floor((this.baseCost+e*this.costInc)*r.BitNodeMultipliers.BladeburnerSkillCost)};var W={},F={BladesIntuition:"Blade's Intuition",Reaper:"Reaper",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",Overclock:"Overclock",EvasiveSystem:"Evasive System",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Datamancer:"Datamancer",Tracer:"Tracer",CybersEdge:"Cyber's Edge"};function U(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(P.getRandomInt)(1e3,25e3),this.countGrowth=e.countGrowth?e.countGrowth:Object(P.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 i 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(i)&&this.decays[i]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}U.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},U.prototype.getSuccessChance=function(e,t={}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");var n=this.getDifficulty(),i=0;for(var a in this.weights)if(this.weights.hasOwnProperty(a)){var r=m.a.queryStatFromString(a),o="eff"+a.charAt(0).toUpperCase()+a.slice(1),s=e.skillMultipliers[o];null==s&&(console.log("ERROR: Failed to find Bladeburner Skill multiplier for: "+a),s=1),i+=this.weights[a]*Math.pow(s*r,this.decays[a])}(i*=e.calculateStaminaPenalty(),this instanceof $||this instanceof Y)&&(this.teamCount&&this.teamCount>0&&(this.teamCount=Math.min(this.teamCount,e.teamSize),i*=Math.pow(this.teamCount,.05)));if(!(this instanceof Y)){var l=e.getCurrentCity();if(t.est?i*=l.popEst/N:i*=l.pop/N,l.chaos>50){var c=l.chaos-50+1;n*=Math.pow(c,.1)}if(this instanceof $&&"Raid"===this.name&&l.comms<=0)return 0}if(i*=e.skillMultipliers.successChanceAll,(this instanceof $||this instanceof Y)&&(i*=e.skillMultipliers.successChanceOperation),this instanceof q&&(i*=e.skillMultipliers.successChanceContract),this.isStealth&&(i*=e.skillMultipliers.successChanceStealth),this.isKill&&(i*=e.skillMultipliers.successChanceKill),i*=m.a.bladeburner_success_chance_mult,isNaN(i))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,i/n)},U.prototype.attempt=function(e){return Math.random()<this.getSuccessChance(e)},U.prototype.getActionTime=function(e){var t=this.getDifficulty()/10,n=e.skillMultipliers.actionTime,i=m.a.agility*e.skillMultipliers.effAgi,a=m.a.dexterity*e.skillMultipliers.effDex,r=.5*(Math.pow(i,.032)+Math.pow(a,.03)+i/4e4+a/4e4);if(t=Math.max(1,t*n/r),this instanceof q)return Math.ceil(t);if(this instanceof $)return Math.ceil(t);if(this instanceof Y)return Math.ceil(1.5*t);throw new Error("Unrecognized Action Type in Action.getActionTime(this). Must be either Contract, Operation, or BlackOperation")},U.prototype.getSuccessesNeededForNextLevel=function(e){return Math.ceil(.5*this.maxLevel*(2*e+(this.maxLevel-1)))},U.prototype.setMaxLevel=function(e){this.successes>=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel},U.prototype.toJSON=function(){return Object(b.Generic_toJSON)("Action",this)},U.fromJSON=function(e){return Object(b.Generic_fromJSON)(U,e.data)},b.Reviver.constructors.Action=U;var H={},G=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7});function K(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function q(e={}){U.call(this,e)}function $(e={}){U.call(this,e),this.reqdRank=e.reqdRank?e.reqdRank:100,this.teamCount=e.teamCount?e.teamCount:0}function Y(e={}){$.call(this,e),this.count=1,this.countGrowth=0}K.prototype.toJSON=function(){return Object(b.Generic_toJSON)("ActionIdentifier",this)},K.fromJSON=function(e){return Object(b.Generic_fromJSON)(K,e.data)},b.Reviver.constructors.ActionIdentifier=K,q.prototype=Object.create(U.prototype),q.prototype.toJSON=function(){return Object(b.Generic_toJSON)("Contract",this)},q.fromJSON=function(e){return Object(b.Generic_fromJSON)(q,e.data)},b.Reviver.constructors.Contract=q,$.prototype=Object.create(U.prototype),$.prototype.toJSON=function(){return Object(b.Generic_toJSON)("Operation",this)},$.fromJSON=function(e){return Object(b.Generic_fromJSON)($,e.data)},b.Reviver.constructors.Operation=$,Y.prototype=Object.create(U.prototype),Y.prototype.toJSON=function(){return Object(b.Generic_toJSON)("BlackOperation",this)},Y.fromJSON=function(e){return Object(b.Generic_fromJSON)(Y,e.data)},b.Reviver.constructors.BlackOperation=Y;var z={};function V(e={}){this.numHosp=0,this.moneyLost=0,this.rank=0,this.maxRank=0,this.skillPoints=0,this.totalSkillPoints=0,this.teamSize=0,this.teamLost=0,this.storedCycles=0,this.randomEventCounter=Object(P.getRandomInt)(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t,n=G.Idle;this.action=new K({type:n}),this.cities={};for(var i=0;i<R.length;++i)this.cities[R[i]]=new B({name:R[i]});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=[],W[F.BladesIntuition]=new j({name:F.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:5,costInc:2,successChanceAll:3}),W[F.Reaper]=new j({name:F.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 3%",baseCost:3,costInc:2,effStr:3,effDef:3,effDex:3,effAgi:3}),W[F.Cloak]=new j({name:F.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:3,costInc:1,successChanceStealth:5.5}),W[F.Overclock]=new j({name:F.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 95)",baseCost:5,costInc:1.1,maxLvl:95,actionTime:1}),W[F.EvasiveSystem]=new j({name:F.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 5%",baseCost:2,costInc:1,effDex:5,effAgi:5}),W[F.ShortCircuit]=new j({name:F.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:3,costInc:2,successChanceKill:5.5}),W[F.DigitalObserver]=new j({name:F.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:5,costInc:2,successChanceOperation:4}),W[F.Datamancer]=new j({name:F.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}),W[F.Tracer]=new j({name:F.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:3,costInc:2,successChanceContract:4}),W[F.CybersEdge]=new j({name:F.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),H[t="Training"]=new U({name:t,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."}),H[t="Field Analysis"]=new U({name:t,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."}),H[t="Recruitment"]=new U({name:t,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.<br><br>Does NOT require stamina."}),z["Operation Typhoon"]=new Y({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}),z["Operation Zero"]=new Y({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}),z["Operation X"]=new Y({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}),z["Operation Titan"]=new Y({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}),z["Operation Ares"]=new Y({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}),z["Operation Archangel"]=new Y({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}),z["Operation Juggernaut"]=new Y({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}),z["Operation Red Dragon"]=new Y({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}),z["Operation K"]=new Y({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}),z["Operation Deckard"]=new Y({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}),z["Operation Tyrell"]=new Y({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}),z["Operation Wallace"]=new Y({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}),z["Operation Shoulder of Orion"]=new Y({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}),z["Operation Hyron"]=new Y({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}),z["Operation Morpheus"]=new Y({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}),z["Operation Ion Storm"]=new Y({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}),z["Operation Annihilus"]=new Y({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}),z["Operation Ultron"]=new Y({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}),z["Operation Centurion"]=new Y({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}}),z["Operation Vindictus"]=new Y({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}}),z["Operation Daedalus"]=new Y({name:"Operation Daedalus",desc:"Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.",baseDifficulty:8e4,reqdRank:4e5,rankGain:4e4,rankLoss:1e4,hpLoss:1e5,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),this.initializeDomElementRefs(),e.new&&this.create()}V.prototype.prestige=function(){this.resetAction();var e=c.Factions.Bladeburners;this.rank>=25&&Object(u.c)(e)},V.prototype.create=function(){this.contracts.Tracking=new q({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(P.getRandomInt)(25,500),countGrowth:Object(P.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 q({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(P.getRandomInt)(5,500),countGrowth:Object(P.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 q({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(P.getRandomInt)(5,500),countGrowth:Object(P.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 $({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(P.getRandomInt)(1,250),countGrowth:Object(P.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 $({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(P.getRandomInt)(1,250),countGrowth:Object(P.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 $({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(P.getRandomInt)(1,300),countGrowth:Object(P.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 $({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(P.getRandomInt)(1,200),countGrowth:Object(P.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 $({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(P.getRandomInt)(1,250),countGrowth:Object(P.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 $({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(P.getRandomInt)(1,200),countGrowth:Object(P.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})},V.prototype.storeCycles=function(e=1){this.storedCycles+=e},V.prototype.process=function(){if(!1===h.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(h.a)(m.a.bitNodeN);if(!1===i.Augmentations[a.AugmentationNames.BladesSimulacrum].owned&&m.a.isWorking){if(this.action.type!==G.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/300}for(var r in this.operations)if(this.operations.hasOwnProperty(r)){var o=this.operations[r];o.count+=e*o.countGrowth/300}for(var s=0;s<R.length;++s){var l=this.cities[R[s]];if(!(l instanceof B))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(P.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 K({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 K({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(this.action)))),T.routing.isOn(T.Page.Bladeburner)&&this.updateContent()}},V.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},V.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)},V.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},V.prototype.changeRank=function(e){if(isNaN(e))throw new Error("NaN passed into Bladeburner.changeRank()");this.rank+=e,this.rank<0&&(this.rank=0),this.maxRank=Math.max(this.rank,this.maxRank);if(Object(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 i=4*(this.totalSkillPoints+1);if(this.maxRank>=i){var a=Math.floor((this.maxRank-i)/4+1);this.skillPoints+=a,this.totalSkillPoints+=a}},V.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof B))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},V.prototype.resetSkillMultipliers=function(){this.skillMultipliers={successChanceAll:1,successChanceStealth:1,successChanceKill:1,successChanceContract:1,successChanceOperation:1,successChanceEstimate:1,actionTime:1,effHack:1,effStr:1,effDef:1,effDex:1,effAgi:1,effCha:1,effInt:1,stamina:1,weaponAbility:1,gunAbility:1}},V.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=W[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 i=Object.keys(this.skillMultipliers),a=0;a<i.length;++a){var r=i[a];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}}}},V.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()},V.prototype.getActionObject=function(e){switch(e.type){case G.Contract:return this.contracts[e.name];case G.Operation:return this.operations[e.name];case G.BlackOp:case G.BlackOperation:return z[e.name];case G.Training:return H.Training;case G["Field Analysis"]:return H["Field Analysis"];case G.Recruitment:return H.Recruitment;default:return null}},V.prototype.resetAction=function(){this.action=new K({type:G.Idle})},V.prototype.startAction=function(e){if(null!=e)switch(this.action=e,this.actionTimeCurrent=0,e.type){case G.Idle:this.actionTimeToComplete=0;break;case G.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(S.exceptionAlert)(e)}break;case G.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(S.exceptionAlert)(e)}break;case G.BlackOp:case G.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(S.exceptionAlert)(e)}break;case G.Training:this.actionTimeToComplete=30;break;case G.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime();break;case G.FieldAnalysis:case G["Field Analysis"]:this.actionTimeToComplete=30;break;default:throw new Error("Invalid Action Type in Bladeburner.startAction(): "+e.type)}},V.prototype.processAction=function(e){if(this.action.type!==G.Idle){if(this.actionTimeToComplete<=0)throw console.log("action.type: "+this.action.type),new Error("Invalid actionTimeToComplete value: "+this.actionTimeToComplete);if(!(this.action instanceof K))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=e,this.actionTimeCurrent>=this.actionTimeToComplete?this.completeAction():void 0}},V.prototype.completeAction=function(){switch(this.action.type){case G.Contract:case G.Operation:try{var e=this.action.type===G.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,i=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 a=0;if(e||(a=5e4*i,m.a.gainMoney(a)),e?p.setMaxLevel(3):p.setMaxLevel(3.5),p.rankGain){var s=Object(E.addOffset)(p.rankGain*i*r.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(s),e&&this.logging.ops?this.log(p.name+" successfully completed! Gained "+Object(M.formatNumber)(s,3)+" rank"):!e&&this.logging.contracts&&this.log(p.name+" contract successfully completed! Gained "+Object(M.formatNumber)(s,3)+" rank and "+d.numeralWrapper.format(a,"$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*i,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(M.formatNumber)(l,3)+" rank."),c>0&&(u+="Took "+Object(M.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(S.exceptionAlert)(e)}break;case G.BlackOp:case G.BlackOperation:try{var p;if(null==(p=this.getActionObject(this.action))||!(p instanceof Y))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 y=0;if(p.rankGain&&(y=Object(E.addOffset)(p.rankGain*r.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(y)),g=Math.ceil(_/2),"Operation Daedalus"===p.name)return this.resetAction(),Object(h.a)(m.a.bitNodeN);T.routing.isOn(T.Page.Bladeburner)&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(p.name+" successful! Gained "+Object(M.formatNumber)(y,1)+" rank")}else{this.gainActionStats(p,!1);var f=0;c=0;p.rankLoss&&(f=Object(E.addOffset)(p.rankLoss,10),this.changeRank(-1*f)),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(M.formatNumber)(f,1)+" rank and took "+Object(M.formatNumber)(c,0)+" damage")}if(this.resetAction(),_>=1){var b=Object(P.getRandomInt)(1,g);this.teamSize-=b,this.teamLost+=b,this.logging.blackops&&this.log("You lost "+Object(M.formatNumber)(b,0)+" team members during "+p.name)}}catch(e){Object(S.exceptionAlert)(e)}break;case G.Training:this.stamina-=.1425;var v=30*m.a.strength_exp_mult,k=30*m.a.defense_exp_mult,O=30*m.a.dexterity_exp_mult,C=30*m.a.agility_exp_mult,A=.04*this.skillMultipliers.stamina;m.a.gainStrengthExp(v),m.a.gainDefenseExp(k),m.a.gainDexterityExp(O),m.a.gainAgilityExp(C),this.staminaBonus+=A,this.logging.general&&this.log("Training completed. Gained: "+Object(M.formatNumber)(v,1)+" str exp, "+Object(M.formatNumber)(k,1)+" def exp, "+Object(M.formatNumber)(O,1)+" dex exp, "+Object(M.formatNumber)(C,1)+" agi exp, "+Object(M.formatNumber)(A,3)+" max stamina"),this.startAction(this.action);break;case G.FieldAnalysis:case G["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(M.formatNumber)(x,1)+" hacking exp, and "+Object(M.formatNumber)(R,1)+" charisma exp"),this.startAction(this.action);break;case G.Recruitment:var N=this.getRecruitmentSuccessChance();if(console.log("Bladeburner recruitment success chance: "+N),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(M.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(M.formatNumber)(I,1)+" charisma exp")}this.startAction(this.action)}},V.prototype.completeContract=function(e){if(this.action.type!==G.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(P.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)}},V.prototype.completeOperation=function(e){if(this.action.type!==G.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,i=t.teamCount;if(i>=1){n=e?Math.ceil(i/2):Math.floor(i);var a=Object(P.getRandomInt)(0,n);this.teamSize-=a,this.teamLost+=a,this.logging.ops&&a>0&&this.log("Lost "+Object(M.formatNumber)(a,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(P.getRandomInt)(-3,-1);r.changePopulationByPercentage(o,{nonZero:!0})}r.changeChaosByPercentage(Object(P.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&r.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByPercentage(Object(P.getRandomInt)(-3,-1));break;case"Assassination":e&&r.changePopulationByCount(-1,{estChange:-1}),r.changeChaosByPercentage(Object(P.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},V.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))},V.prototype.getRecruitmentSuccessChance=function(){return Math.pow(m.a.charisma,.45)/(this.teamSize+1)},V.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),i=Math.pow(n,.28)+n/650,a=this.actionTimeToComplete,r=t?1:.5,o=1*a*r*i,s=.001*a*r*i;m.a.gainHackingExp(o*e.weights.hack*m.a.hacking_exp_mult),m.a.gainStrengthExp(o*e.weights.str*m.a.strength_exp_mult),m.a.gainDefenseExp(o*e.weights.def*m.a.defense_exp_mult),m.a.gainDexterityExp(o*e.weights.dex*m.a.dexterity_exp_mult),m.a.gainAgilityExp(o*e.weights.agi*m.a.agility_exp_mult),m.a.gainCharismaExp(o*e.weights.cha*m.a.charisma_exp_mult),m.a.gainIntelligenceExp(s*e.weights.int)},V.prototype.randomEvent=function(){var e=Math.random(),t=R[Object(P.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof B))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var i=R[Object(P.getRandomInt)(0,5)];i===t;)i=R[Object(P.getRandomInt)(0,5)];var a=this.cities[i];if(!(n instanceof B&&a instanceof B))throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var r=Object(P.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(P.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,++a.comms;r=Object(P.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop-=o,a.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(P.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(P.getRandomInt)(5,10)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){r=Object(P.getRandomInt)(5,20)/100,o=Math.round(n.pop*r);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},V.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.log("ERROR: Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()<t&&this.triggerMigration(e)},V.prototype.triggerMigration=function(e){for(var t=R[Object(P.getRandomInt)(0,5)];t===e;)t=R[Object(P.getRandomInt)(0,5)];var n=this.cities[t],i=this.cities[e];if(null==n||null==i)throw new Error("Failed to find City with name: "+t);var a=Math.random(),r=Object(P.getRandomInt)(3,15)/100;a<.05&&i.comms>0&&(r*=Object(P.getRandomInt)(2,4),--i.comms,++n.comms);var o=Math.round(i.pop*r);i.pop-=o,n.pop+=o};var J={};V.prototype.initializeDomElementRefs=function(){J={bladeburnerDiv:null,overviewConsoleParentDiv:null,overviewDiv:null,actionAndSkillsDiv:null,currentTab:null,consoleDiv:null,consoleTable:null,consoleInputRow:null,consoleInputCell:null,consoleInputHeader:null,consoleInput:null,overviewRank:null,overviewStamina:null,overviewStaminaHelpTip:null,overviewGen1:null,overviewEstPop:null,overviewEstPopHelpTip:null,overviewEstComms:null,overviewChaos:null,overviewSkillPoints:null,overviewBonusTime:null,overviewAugSuccessMult:null,overviewAugMaxStaminaMult:null,overviewAugStaminaGainMult:null,overviewAugAnalysisMult:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},V.prototype.createContent=function(){if(J.bladeburnerDiv=Object(O.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),J.overviewConsoleParentDiv=Object(O.createElement)("div",{height:"60%",display:"block",position:"relative"}),J.overviewDiv=Object(O.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),J.actionAndSkillsDiv=Object(O.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),J.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),J.consoleDiv=Object(O.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(J.consoleInput instanceof Element&&J.consoleInput.focus(),!1)}),J.consoleTable=Object(O.createElement)("table",{class:"bladeburner-console-table"}),J.consoleInputRow=Object(O.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),J.consoleInputCell=Object(O.createElement)("td",{class:"bladeburner-console-input-cell"}),J.consoleInputHeader=Object(O.createElement)("pre",{innerText:"> "}),J.consoleInput=Object(O.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{J.consoleInput.value=J.consoleInput.value}}),J.consoleInputCell.appendChild(J.consoleInputHeader),J.consoleInputCell.appendChild(J.consoleInput),J.consoleInputRow.appendChild(J.consoleInputCell),J.consoleTable.appendChild(J.consoleInputRow),J.consoleDiv.appendChild(J.consoleTable),J.overviewConsoleParentDiv.appendChild(J.overviewDiv),J.overviewConsoleParentDiv.appendChild(J.consoleDiv),J.bladeburnerDiv.appendChild(J.overviewConsoleParentDiv),J.bladeburnerDiv.appendChild(J.actionAndSkillsDiv),document.getElementById("entire-game-container").appendChild(J.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);J.consoleInput.focus()},V.prototype.clearContent=function(){J.bladeburnerDiv instanceof Element&&(Object(f.removeChildrenFromElement)(J.bladeburnerDiv),Object(w.removeElement)(J.bladeburnerDiv)),Object(k.clearObject)(J),this.initializeDomElementRefs()},V.prototype.createOverviewContent=function(){if(null==J.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");J.overviewRank=Object(O.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),J.overviewStamina=Object(O.createElement)("p",{display:"inline-block"}),J.overviewStaminaHelpTip=Object(O.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.")}}),J.overviewGen1=Object(O.createElement)("p",{display:"block"}),J.overviewEstPop=Object(O.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."}),J.overviewEstPopHelpTip=Object(O.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.")}}),J.overviewEstComms=Object(O.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."}),J.overviewChaos=Object(O.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."}),J.overviewBonusTime=Object(O.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."}),J.overviewSkillPoints=Object(O.createElement)("p",{display:"block"}),J.overviewAugSuccessMult=Object(O.createElement)("p",{display:"block"}),J.overviewAugMaxStaminaMult=Object(O.createElement)("p",{display:"block"}),J.overviewAugStaminaGainMult=Object(O.createElement)("p",{display:"block"}),J.overviewAugAnalysisMult=Object(O.createElement)("p",{display:"block"}),J.overviewDiv.appendChild(J.overviewRank),Object(v.appendLineBreaks)(J.overviewDiv,1),J.overviewDiv.appendChild(J.overviewStamina),J.overviewDiv.appendChild(J.overviewStaminaHelpTip),J.overviewDiv.appendChild(J.overviewGen1),J.overviewDiv.appendChild(J.overviewEstPop),J.overviewDiv.appendChild(J.overviewEstPopHelpTip),Object(v.appendLineBreaks)(J.overviewDiv,1),J.overviewDiv.appendChild(J.overviewEstComms),Object(v.appendLineBreaks)(J.overviewDiv,1),J.overviewDiv.appendChild(J.overviewChaos),Object(v.appendLineBreaks)(J.overviewDiv,2),J.overviewDiv.appendChild(J.overviewBonusTime),J.overviewDiv.appendChild(J.overviewSkillPoints),Object(v.appendLineBreaks)(J.overviewDiv,1),J.overviewDiv.appendChild(J.overviewAugSuccessMult),J.overviewDiv.appendChild(J.overviewAugMaxStaminaMult),J.overviewDiv.appendChild(J.overviewAugStaminaGainMult),J.overviewDiv.appendChild(J.overviewAugAnalysisMult),Object(v.appendLineBreaks)(J.overviewDiv,1),J.overviewDiv.appendChild(Object(O.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(O.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(x.removeElementById)(e),!1)})),t.push(Object(O.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<R.length;++n)!function(n,i){t.push(Object(O.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerText:R[i],clickListener:()=>(n.city=R[i],Object(x.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(C.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");J.overviewDiv.appendChild(Object(O.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(f.removeChildrenFromElement)(J.overviewDiv),this.createOverviewContent()):Object(y.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}J.overviewDiv.appendChild(Object(O.createElement)("br")),J.overviewDiv.appendChild(Object(O.createElement)("br")),this.updateOverviewContent()},V.prototype.createActionAndSkillsContent=function(){null==J.currentTab&&(J.currentTab="general"),Object(f.removeChildrenFromElement)(J.actionAndSkillsDiv),Object(k.clearObject)(J.generalActions),Object(k.clearObject)(J.contracts),Object(k.clearObject)(J.operations),Object(k.clearObject)(J.blackops),Object(k.clearObject)(J.skills);for(var e=J.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n<t.length;++n)!function(e,t,n,i){J.actionAndSkillsDiv.appendChild(Object(O.createElement)("a",{innerText:e[t],class:i===e[t].toLowerCase()?"bladeburner-nav-button-inactive":"bladeburner-nav-button",clickListener:()=>(J.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(J.actionsAndSkillsDesc=Object(O.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(f.removeChildrenFromElement)(J.actionsAndSkillsList),J.actionsAndSkillsList=Object(O.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(),J.actionAndSkillsDiv.appendChild(J.actionsAndSkillsDesc),J.actionAndSkillsDiv.appendChild(J.actionsAndSkillsList)},V.prototype.createGeneralActionsContent=function(){if(null==J.actionsAndSkillsList||null==J.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in J.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",H)H.hasOwnProperty(e)&&(J.generalActions[e]=Object(O.createElement)("div",{class:"bladeburner-action",name:e}),J.actionsAndSkillsList.appendChild(J.generalActions[e]))},V.prototype.createContractsContent=function(){if(null==J.actionsAndSkillsList||null==J.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in J.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)&&(J.contracts[e]=Object(O.createElement)("div",{class:"bladeburner-action",name:e}),J.actionsAndSkillsList.appendChild(J.contracts[e]))},V.prototype.createOperationsContent=function(){if(null==J.actionsAndSkillsList||null==J.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in J.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)&&(J.operations[e]=Object(O.createElement)("div",{class:"bladeburner-action",name:e}),J.actionsAndSkillsList.appendChild(J.operations[e]))},V.prototype.createBlackOpsContent=function(){if(null==J.actionsAndSkillsList||null==J.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");J.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 z)z.hasOwnProperty(t)&&e.push(z[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=0;n<e.length&&(J.blackops[e[n].name]=Object(O.createElement)("div",{class:"bladeburner-action",name:e[n].name}),J.actionsAndSkillsList.appendChild(J.blackops[e[n].name]),null!=this.blackops[[e[n].name]]);++n);},V.prototype.createSkillsContent=function(){if(null==J.actionsAndSkillsList||null==J.actionsAndSkillsDesc)throw new Error("Bladeburner.createSkillsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");J.actionsAndSkillsDesc.innerHTML="You will gain one skill point every 4 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(M.formatNumber)(n,3),e[t]){case"successChanceAll":J.actionsAndSkillsDesc.innerHTML+="Total Success Chance: x"+n+"<br>";break;case"successChanceStealth":J.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"<br>";break;case"successChanceKill":J.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"<br>";break;case"successChanceContract":J.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"<br>";break;case"successChanceOperation":J.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"<br>";break;case"successChanceEstimate":J.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"<br>";break;case"actionTime":J.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"<br>";break;case"effHack":J.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"<br>";break;case"effStr":J.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"<br>";break;case"effDef":J.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"<br>";break;case"effDex":J.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"<br>";break;case"effAgi":J.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"<br>";break;case"effCha":J.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"<br>";break;case"effInt":J.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"<br>";break;case"stamina":J.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"<br>";break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+e[t])}}for(var i in J.skillPointsDisplay=Object(O.createElement)("p",{innerHTML:"<br><strong>Skill Points: "+Object(M.formatNumber)(this.skillPoints,0)+"</strong>"}),J.actionAndSkillsDiv.appendChild(J.skillPointsDisplay),W)W.hasOwnProperty(i)&&(J.skills[i]=Object(O.createElement)("div",{class:"bladeburner-action",name:i}),J.actionsAndSkillsList.appendChild(J.skills[i]))},V.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},V.prototype.updateOverviewContent=function(){T.routing.isOn(T.Page.Bladeburner)&&(J.overviewRank.childNodes[0].nodeValue="Rank: "+Object(M.formatNumber)(this.rank,2),J.overviewStamina.innerText="Stamina: "+Object(M.formatNumber)(this.stamina,3)+" / "+Object(M.formatNumber)(this.maxStamina,3),J.overviewGen1.innerHTML="Stamina Penalty: "+Object(M.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%<br><br>Team Size: "+Object(M.formatNumber)(this.teamSize,0)+"<br>Team Members Lost: "+Object(M.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>",J.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+d.numeralWrapper.format(this.getCurrentCity().popEst,"0.000a"),J.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(M.formatNumber)(this.getCurrentCity().comms,0),J.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(M.formatNumber)(this.getCurrentCity().chaos),J.overviewSkillPoints.innerText="Skill Points: "+Object(M.formatNumber)(this.skillPoints,0),J.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+this.storedCycles/5,J.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(M.formatNumber)(100*m.a.bladeburner_success_chance_mult,1)+"%",J.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(M.formatNumber)(100*m.a.bladeburner_max_stamina_mult,1)+"%",J.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(M.formatNumber)(100*m.a.bladeburner_stamina_gain_mult,1)+"%",J.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(M.formatNumber)(100*m.a.bladeburner_analysis_mult,1)+"%")},V.prototype.updateActionAndSkillsContent=function(){switch(null==J.currentTab&&(J.currentTab="general"),J.currentTab.toLowerCase()){case"general":for(var e=Object.keys(J.generalActions),t=0;t<e.length;++t){var n=J.generalActions[e[t]],i=n.name,a=H[i];if(null==a)throw new Error("Could not find Object "+i+" in Bladeburner.updateActionAndSkillsContent()");this.action.type===G[i]?n.classList.add(I):n.classList.remove(I),this.updateGeneralActionsUIElement(n,a)}break;case"contracts":var r=Object.keys(J.contracts);for(t=0;t<r.length;++t){var o=J.contracts[r[t]];i=o.name;this.action.type===G.Contract&&i===this.action.name?o.classList.add(I):o.classList.remove(I);var s=this.contracts[i];if(null==s)throw new Error("Could not find Contract "+i+" in Bladeburner.updateActionAndSkillsContent()");this.updateContractsUIElement(o,s)}break;case"operations":var l=Object.keys(J.operations);for(t=0;t<l.length;++t){var c=J.operations[l[t]];i=c.name;this.action.type===G.Operation&&i===this.action.name?c.classList.add(I):c.classList.remove(I);var u=this.operations[i];if(null==u)throw new Error("Could not find Operation "+i+" in Bladeburner.updateActionAndSkillsContent()");this.updateOperationsUIElement(c,u)}break;case"blackops":var p=Object.keys(J.blackops);for(t=0;t<p.length;++t){var m=J.blackops[p[t]];i=m.name;this.action.type===G.BlackOperation&&i===this.action.name?m.classList.add(I):m.classList.remove(I);var h=z[i];if(null==h)throw new Error("Could not find BlackOperation "+i+" in Bladeburner.updateActionAndSkillsContent()");this.updateBlackOpsUIElement(m,h)}break;case"skills":J.skillPointsDisplay.innerHTML="<br><strong>Skill Points: "+Object(M.formatNumber)(this.skillPoints,0)+"</strong>";var d=Object.keys(J.skills);for(t=0;t<d.length;++t){var g=J.skills[d[t]],_=(i=g.name,W[i]);if(null==_)throw new Error("Could not find Skill "+i+" in Bladeburner.updateActionAndSkillsContent()");this.updateSkillsUIElement(g,_)}break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}},V.prototype.updateGeneralActionsUIElement=function(e,t){Object(f.removeChildrenFromElement)(e);var n=e.classList.contains(I);if(e.appendChild(Object(O.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(M.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(M.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(O.createElement)("p",{display:"block",innerText:Object(_.createProgressBarText)({progress:i})}))}else e.appendChild(Object(O.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=G[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(O.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},V.prototype.updateContractsUIElement=function(e,t){Object(f.removeChildrenFromElement)(e);var n=e.classList.contains(I),i=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(O.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(M.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(M.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(O.createElement)("p",{display:"block",innerText:Object(_.createProgressBarText)({progress:a})}))}else e.appendChild(Object(O.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=G.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(O.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3.5)+" successes needed for next level"})),e.appendChild(Object(O.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"&uarr;",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(O.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"&darr;",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)}));var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(O.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(M.formatNumber)(100*i,1)+"%\nTime Required (s): "+Object(M.formatNumber)(o,0)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(O.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(O.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase contract level when possible"}));var l=Object(O.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateOperationsUIElement=function(e,t){Object(f.removeChildrenFromElement)(e);var n=e.classList.contains(I),i=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(O.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(M.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(M.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(O.createElement)("p",{display:"block",innerText:Object(_.createProgressBarText)({progress:a})}))}else e.appendChild(Object(O.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=G.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(O.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(M.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",i=Object(O.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."}),a=Object(O.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(O.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var i=Math.round(parseFloat(a.value));return isNaN(i)?Object(y.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=i,this.updateOperationsUIElement(e,t)),Object(x.removeElementById)(n),!1}}),o=Object(O.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(x.removeElementById)(n),!1)});Object(C.createPopup)(n,[i,a,r,o])}}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(O.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3)+" successes needed for next level"})),e.appendChild(Object(O.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"&uarr;",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(O.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"&darr;",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)}));t.getDifficulty();var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(O.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(M.formatNumber)(100*i,1)+"%\nTime Required(s): "+Object(M.formatNumber)(o,1)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(O.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(O.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase operation level when possible"}));var l=Object(O.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateBlackOpsUIElement=function(e,t){Object(f.removeChildrenFromElement)(e);var n=e.classList.contains(I),i=null!=this.blackops[t.name],a=t.getSuccessChance(this,{est:!0}),r=(t.getDifficulty(),t.getActionTime(this)),o=this.rank>=t.reqdRank;if(i)e.appendChild(Object(O.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(O.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(M.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(M.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var s=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(O.createElement)("p",{display:"block",innerText:Object(_.createProgressBarText)({progress:s})}))}else e.appendChild(Object(O.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=G.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(O.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(M.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",i=Object(O.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."}),a=Object(O.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(O.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var i=Math.round(parseFloat(a.value));return isNaN(i)?Object(y.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=i,this.updateBlackOpsUIElement(e,t)),Object(x.removeElementById)(n),!1}}),o=Object(O.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(x.removeElementById)(n),!1)});Object(C.createPopup)(n,[i,a,r,o])}}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(O.createElement)("p",{display:"inline-block",innerHTML:"<br>"+t.desc+"<br><br>"})),e.appendChild(Object(O.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(M.formatNumber)(t.reqdRank,0)+"<br>"})),e.appendChild(Object(O.createElement)("p",{display:"inline-block",innerHTML:"Estimated Success Chance: "+Object(M.formatNumber)(100*a,1)+"%\nTime Required(s): "+Object(M.formatNumber)(r,1)}))}},V.prototype.updateSkillsUIElement=function(e,t){Object(f.removeChildrenFromElement)(e);var n=t.name,i=0;this.skills[n]&&!isNaN(this.skills[n])&&(i=this.skills[n]);var a=t.calculateCost(i);e.appendChild(Object(O.createElement)("h2",{innerText:t.name+" (Lvl "+i+")",display:"inline-block"}));var r=this.skillPoints>=a,o=!!t.maxLvl&&i>=t.maxLvl;e.appendChild(Object(O.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<a))return this.skillPoints-=a,this.upgradeSkill(t),this.createActionAndSkillsContent(),!1}})),Object(v.appendLineBreaks)(e,2),o?e.appendChild(Object(O.createElement)("p",{color:"red",display:"block",innerText:"MAX LEVEL"})):e.appendChild(Object(O.createElement)("p",{display:"block",innerText:"Skill Points required: "+Object(M.formatNumber)(a,0)})),e.appendChild(Object(O.createElement)("p",{innerHTML:t.desc,display:"inline-block"}))},V.prototype.postToConsole=function(t,n=!0){!0===n&&(this.consoleLogs.push(t),this.consoleLogs.length>100&&this.consoleLogs.shift()),null!=t&&null!=J.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>"),J.consoleTable.childNodes.length>100&&J.consoleTable.removeChild(J.consoleTable.firstChild),this.updateConsoleScroll())},V.prototype.updateConsoleScroll=function(){J.consoleDiv.scrollTop=J.consoleDiv.scrollHeight},V.prototype.resetConsoleInput=function(){J.consoleInput.value=""},V.prototype.clearConsole=function(){for(;J.consoleTable.childNodes.length>1;)J.consoleTable.removeChild(J.consoleTable.firstChild);this.consoleLogs.length=0},V.prototype.log=function(e){this.postToConsole(`[${Object(A.getTimestamp)()}] ${e}`)},V.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)),L=this.consoleHistory.length;for(var t=e.split(";"),n=0;n<t.length;++n)this.executeConsoleCommand(t[n])}catch(e){Object(S.exceptionAlert)(e)}},V.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")}},V.prototype.parseCommandArguments=function(e){for(var t=[],n=0,i=0;i<e.length;){var a=e.charAt(i);if('"'===a){var r=e.indexOf('"',i+1);if(-1!==r&&(r===e.length-1||" "===e.charAt(r+1))){t.push(e.substr(i+1,r-i-1)),n=i=r===e.length-1?r+1:r+2;continue}}else" "===a&&(t.push(e.substr(n,i-n)),n=i+1);++i}return n!==i&&t.push(e.substr(n,i-n)),console.log("Bladeburner.parseCommandArguments returned: "+t),t},V.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],i=!1;switch(e[3].toLowerCase().includes("hi")&&(i=!0),t){case"general":case"gen":if(null!=H[n]){var a=new K({type:G[n],name:n});i?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(i?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid action name specified: "+n);break;case"contract":case"contracts":if(null!=this.contracts[n]){a=new K({type:G.Contract,name:n});i?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(i?"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]){a=new K({type:G.Operation,name:n});i?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(i?"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):(i?this.automateThreshHigh=Number(n):this.automateThreshLow=Number(n),this.log("Automate ("+(i?"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(M.formatNumber)(this.automateThreshLow,0)+", you will automatically switch to "+this.automateActionLow.name+". When your stamina recovers to "+Object(M.formatNumber)(this.automateThreshHigh,0)+", you will automatically switch to "+this.automateActionHigh.name+".");else if(r.toLowerCase().includes("en")){if(!(this.automateActionLow instanceof K&&this.automateActionHigh instanceof K))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")},V.prototype.executeHelpConsoleCommand=function(e){if(1===e.length)this.postToConsole(D.helpList);else for(var t=1;t<e.length;++t){var n=D[e[t]];null!=n&&(this.postToConsole(n),this.postToConsole("<br>"))}},V.prototype.executeLogConsoleCommand=function(e){if(e.length<3)return this.postToConsole("Invalid usage of log command: log [enable/disable] [action/event]"),void this.postToConsole("Use 'help log' for more details and examples");var t=!0;switch(e[1].toLowerCase().includes("d")&&(t=!1),e[2].toLowerCase()){case"general":case"gen":this.logging.general=t,this.log("Logging "+(t?"enabled":"disabled")+" for general actions");break;case"contract":case"contracts":this.logging.contracts=t,this.log("Logging "+(t?"enabled":"disabled")+" for Contracts");break;case"ops":case"op":case"operations":case"operation":this.logging.ops=t,this.log("Logging "+(t?"enabled":"disabled")+" for Operations");break;case"blackops":case"blackop":case"black operations":case"black operation":this.logging.blackops=t,this.log("Logging "+(t?"enabled":"disabled")+" for BlackOps");break;case"event":case"events":this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for events");break;case"all":this.logging.general=t,this.logging.contracts=t,this.logging.ops=t,this.logging.blackops=t,this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for everything");break;default:this.postToConsole("Invalid action/event type specified: "+e[2]),this.postToConsole("Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]")}},V.prototype.executeSkillConsoleCommand=function(e){switch(e.length){case 1:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 2:if("list"===e[1].toLowerCase()){this.postToConsole("Skills: ");for(var t=Object.keys(W),n=0;n<t.length;++n){var i=W[t[n]],a=0;null!=this.skills[i.name]&&(a=this.skills[i.name]),this.postToConsole(i.name+": Level "+Object(M.formatNumber)(a,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(M.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==(i=W[s])||!(i instanceof j))return this.postToConsole("Invalid skill name (Note that this is case-sensitive): "+s);if("list"===e[1].toLowerCase())this.postToConsole(i.name+": Level "+Object(M.formatNumber)(this.skills[i.name]),0);else if("level"===e[1].toLowerCase()){var l=0;this.skills[s]&&!isNaN(this.skills[s])&&(l=this.skills[s]);var c=i.calculateCost(l);this.skillPoints>=c?(this.skillPoints-=c,this.upgradeSkill(i),this.log(i.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(M.formatNumber)(c,0))}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;default:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info")}},V.prototype.executeStartConsoleCommand=function(e){if(3!==e.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");var t=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=H[t]?(this.action.type=G[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=G.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=G.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!=z[t]?(this.action.type=G.BlackOperation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid BlackOp name specified: "+e[2]);break;default:this.postToConsole("Invalid action/event type specified: "+e[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}},V.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new K,i=e.toLowerCase().trim(),a=t.toLowerCase().trim();switch(i){case"contract":case"contracts":case"contr":return n.type=G.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=G.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=G.BlackOp,z.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(i.startsWith("gen")){switch(a){case"training":n.type=G.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=G.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=G["Field Analysis"],n.name="Field Analysis";break;default:return null}return n}},V.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(G);for(let i=0;i<n.length;++i)if(e.type===G[n[i]]){t.type=n[i];break}return null==t.type&&(t.type="Idle"),t.name=null!=e.name?e.name:"Idle",t},V.prototype.getContractNamesNetscriptFn=function(){return Object.keys(this.contracts)},V.prototype.getOperationNamesNetscriptFn=function(){return Object.keys(this.operations)},V.prototype.getBlackOpNamesNetscriptFn=function(){return Object.keys(z)},V.prototype.getGeneralActionNamesNetscriptFn=function(){return Object.keys(H)},V.prototype.getSkillNamesNetscriptFn=function(){return Object.keys(W)},V.prototype.startActionNetscriptFn=function(e,t,n){var i="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.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),!1;if(a.type===G.BlackOp){if(this.getActionObject(a).reqdRank>this.rank)return n.log(`Failed to start Black Op ${a.name} due to insufficient rank`),!1;if(null!=this.blackops[a.name])return n.log(`Failed to start Black Op ${a.name} because its already been completed`),!1;var r=[];for(const e in z)z.hasOwnProperty(e)&&r.push(e);r.sort(function(e,t){return z[e].reqdRank-z[t].reqdRank});let e=r.indexOf(a.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 ${a.name} because you have not done the preceding one`),!1}try{return this.startAction(a),n.shouldLog("startAction")&&n.scriptRef.log("Starting bladeburner action with type "+e+" and name "+t),!0}catch(i){return this.resetAction(),n.scriptRef.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}},V.prototype.getActionTimeNetscriptFn=function(e,t,n){var i="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.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),-1;var r=this.getActionObject(a);if(null==r)return n.log(i),-1;switch(a.type){case G.Contract:case G.Operation:case G.BlackOp:case G.BlackOperation:return r.getActionTime(this);case G.Training:case G["Field Analysis"]:case G.FieldAnalysis:return 30;case G.Recruitment:return this.getRecruitmentTime();default:return n.log(i),-1}},V.prototype.getActionEstimatedSuccessChanceNetscriptFn=function(e,t,n){var i="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.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),-1;var r=this.getActionObject(a);if(null==r)return n.log(i),-1;switch(a.type){case G.Contract:case G.Operation:case G.BlackOp:case G.BlackOperation:return r.getSuccessChance(this,{est:!0});case G.Training:case G["Field Analysis"]:case G.FieldAnalysis:return 1;case G.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log(i),-1}},V.prototype.getActionCountRemainingNetscriptFn=function(e,t,n){var i="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.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),-1;var r=this.getActionObject(a);if(null==r)return n.log(i),-1;switch(a.type){case G.Contract:case G.Operation:return Math.floor(r.count);case G.BlackOp:case G.BlackOperation:return null!=this.blackops[t]?0:1;case G.Training:case G["Field Analysis"]:case G.FieldAnalysis:return 1/0;default:return n.log(i),-1}},V.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:W.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log(n),-1)},V.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(!W.hasOwnProperty(e))return t.log(n),-1;var i=W[e];return null==this.skills[e]?i.calculateCost(0):i.calculateCost(this.skills[e])},V.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(!W.hasOwnProperty(e))return t.log(n),!1;var i=W[e],a=0;this.skills[e]&&!isNaN(this.skills[e])&&(a=this.skills[e]);var r=i.calculateCost(a);return i.maxLvl&&a>=i.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(i),T.routing.isOn(T.Page.Bladeburner)&&"skills"===J.currentTab.toLowerCase()&&this.createActionAndSkillsContent(),t.shouldLog("upgradeSkill")&&t.log(e+" successfully upgraded to level "+this.skills[e]),!0)},V.prototype.getTeamSizeNetscriptFn=function(e,t,n){if(""===e&&""===t)return this.teamSize;var i="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.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),-1;var r=this.getActionObject(a);return null==r?(n.log(i),-1):a.type===G.Operation||a.type===G.BlackOp||a.type===G.BlackOperation?r.teamCount:0},V.prototype.setTeamSizeNetscriptFn=function(e,t,n,i){var a="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 i.log(a),-1;if(r.type!==G.Operation&&r.type!==G.BlackOp&&r.type!==G.BlackOperation)return i.log("ERROR: bladeburner.setTeamSize() failed. This function only works for Operations and BlackOps"),-1;var o=this.getActionObject(r);if(null==o)return i.log(a),-1;var s=Math.round(n);return isNaN(s)?(i.log("ERROR: bladeburner.setTeamSize() failed due to an invalid 'size' argument: "+n),-1):(this.teamSize<s&&(s=this.teamSize),o.teamCount=s,i.shouldLog("setTeamSize")&&i.log("Team size for "+t+" set to "+s),s)},V.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)},V.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)},V.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)},V.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)},V.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"),T.routing.isOn(T.Page.Bladeburner)&&(Object(f.removeChildrenFromElement)(J.overviewDiv),this.createOverviewContent()),!0):(e.shouldLog("joinBladeburnerFaction")&&e.log("Failed to join Bladeburners Faction because you do not have the required 25 rank"),!1))},V.prototype.toJSON=function(){return Object(b.Generic_toJSON)("Bladeburner",this)},V.fromJSON=function(e){return Object(b.Generic_fromJSON)(V,e.data)},b.Reviver.constructors.Bladeburner=V}).call(this,n(72))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(152),a=n(1);t.Crimes={Shoplift:new i.Crime("Shoplift",a.CONSTANTS.CrimeShoplift,2e3,15e3,.05,.1,{dexterity_success_weight:1,agility_success_weight:1,dexterity_exp:2,agility_exp:2}),RobStore:new i.Crime("Rob Store",a.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*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Mug:new i.Crime("Mug",a.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 i.Crime("Larceny",a.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*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),DealDrugs:new i.Crime("Deal Drugs",a.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 i.Crime("Bond Forgery",a.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*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),TraffickArms:new i.Crime("Traffick Arms",a.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 i.Crime("Homicide",a.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 i.Crime("Grand Theft Auto",a.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:a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Kidnap:new i.Crime("Kidnap",a.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*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Assassination:new i.Crime("Assassination",a.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*a.CONSTANTS.IntelligenceCrimeBaseExpGain,kills:1}),Heist:new i.Crime("Heist",a.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*a.CONSTANTS.IntelligenceCrimeBaseExpGain})}},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return c});var i=n(15);let a={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};function r(){}r.prototype.addIp=function(e,t){this[e]=t},r.prototype.toJSON=function(){return Object(i.Generic_toJSON)("SpecialServerIpsMap",this)},r.fromJSON=function(e){return Object(i.Generic_fromJSON)(r,e.data)},i.Reviver.constructors.SpecialServerIpsMap=r;let o=new r;function s(){for(var e in o)delete o[e];o=null,o=new r}function l(e){o=JSON.parse(e,i.Reviver)}function c(){o=new r}},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 y}),n.d(t,"a",function(){return d});var i=n(11),a=n(0),r=n(19),o=n(26),s=n(42),l=n(21),c=n(2),u=n(40),p=n(23);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;i.Engine.loadTerminalContent(),i.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 f(),!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 y(),!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"),a=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"),a.removeAttribute("class"),r.removeAttribute("class"),o.removeAttribute("class");var s=document.getElementById("interactive-tutorial-next");switch(d.currStep){case h.Start:i.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:i.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 i.Engine.loadCharacterContent(),y(),!1});break;case h.CharacterPage:i.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:i.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 i.Engine.loadTerminalContent(),y(),!1});break;case h.TerminalIntro:i.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:i.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:i.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:i.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:i.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:i.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:i.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:i.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:i.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:i.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:i.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:i.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:i.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>&nbsp;&nbsp;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:i.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:i.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:i.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 i.Engine.loadActiveScriptsContent(),y(),!1});break;case h.ActiveScriptsPage:i.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 i.Engine.loadTerminalContent(),y(),!1});break;case h.ActiveScriptsToTerminal:i.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:i.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:i.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",a.setAttribute("class","flashing-button"),a.addEventListener("click",function(){return i.Engine.loadHacknetNodesContent(),y(),!1});break;case h.HacknetNodesIntroduction:i.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:i.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 i.Engine.loadWorldContent(),y(),!1});break;case h.WorldDescription:i.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 i.Engine.loadTutorialContent(),y(),!1});break;case h.TutorialPageInfo:i.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:f();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 y(){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 f(){if(0===r.Settings.AutosaveInterval?i.Engine.Counters.autoSaveCounter=1/0:i.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)}i.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='http://bitburner.wikia.com/wiki/Chapt3rs_Guide_to_Getting_Started_with_Bitburner' target='_blank'>Getting Started Guide</a><a class='a-link-button' href='http://bitburner.wikia.com/wiki/Bitburner_Wiki' target='_blank'>Wiki</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]),a.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});const i=n(2),a=n(61);t.createPopup=function(e,t,n={}){const r=i.createElement("div",{class:"popup-box-container",display:"flex",id:e}),o=i.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),a.getElementById("entire-game-container").appendChild(r),r}},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 i=n(9);t.exceptionAlert=function(e){i.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";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return s});var i=n(0),a=n(57),r=n(7);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(!(i.a.gang instanceof a.b))throw Object(r.d)(e,n)}},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";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";n.d(t,"b",function(){return f}),n.d(t,"c",function(){return _}),n.d(t,"f",function(){return g}),n.d(t,"e",function(){return b}),n.d(t,"d",function(){return v}),n.d(t,"a",function(){return h});n(18);var i=n(14),a=n(6),r=n(28),o=n(64),s=n(0),l=n(67),c=n(12),u=n(19),p=n(9),m=n(15);function h(e="",t=""){this.filename=e,this.msg=t,this.recvd=!1}function d(e,t=!1){console.log("sending message: "+e.filename),e.recvd=!0,!t&&u.Settings.SuppressMessages||g(e),function(e,t){var n=Object(c.c)(t);if(null==n)return void console.log("WARNING: Did not locate "+t);for(var i=0;i<n.messages.length;++i)if(n.messages[i].filename===e.filename)return;n.messages.push(e)}(e,"home")}function g(e){var t="Message received from unknown sender: <br><br><i>"+e.msg+"</i><br><br>This message was saved as "+e.filename+" onto your home computer.";Object(p.dialogBoxCreate)(t)}function _(){var e=f[E.Jumper0],t=f[E.Jumper1],n=f[E.Jumper2],c=f[E.Jumper3],u=f[E.Jumper4],m=f[E.CyberSecTest],h=f[E.NiteSecTest],g=f[E.BitRunnersTest],_=f[E.RedPill],y=!1;i.Augmentations[a.AugmentationNames.TheRedPill].owned&&(y=!0),_&&y&&0===s.a.sourceFiles.length&&!l.b&&!o.c?p.dialogBoxOpened||d(_,!0):_&&y?l.b||o.c||p.dialogBoxOpened||d(_):e&&!e.recvd&&s.a.hacking_skill>=25?(d(e),s.a.getHomeComputer().programs.push(r.Programs.Flight.name)):t&&!t.recvd&&s.a.hacking_skill>=40?d(t):m&&!m.recvd&&s.a.hacking_skill>=50?d(m):n&&!n.recvd&&s.a.hacking_skill>=175?d(n):h&&!h.recvd&&s.a.hacking_skill>=200?d(h):c&&!c.recvd&&s.a.hacking_skill>=350?d(c):u&&!u.recvd&&s.a.hacking_skill>=490?d(u):g&&!g.recvd&&s.a.hacking_skill>=500&&d(g)}function y(e){f[e.filename]=e}h.prototype.toJSON=function(){return Object(m.Generic_toJSON)("Message",this)},h.fromJSON=function(e){return Object(m.Generic_fromJSON)(h,e.data)},m.Reviver.constructors.Message=h;let f={};function b(e){f=JSON.parse(e,m.Reviver)}let E={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={},y(new h(E.Jumper0,"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer. <br><br>It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.<br><br>Use this program to track your progress<br><br>The fl1ght.exe program was added to your home computer<br><br>-jump3R")),y(new h(E.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search. <br><br>You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.<br><br>-jump3R")),y(new h(E.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec.<br><br>-jump3R")),y(new h(E.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand. <br><br>I.I.I.I <br><br>-jump3R")),y(new h(E.Jumper4,"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.<br><br>-jump3R")),y(new h(E.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")),y(new h(E.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")),y(new h(E.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for. <br><br> We can help you find the answers.<br><br>run4theh111z")),y(new h(E.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 re}),n.d(t,"g",function(){return ae}),n.d(t,"d",function(){return ee}),n.d(t,"f",function(){return Z}),n.d(t,"h",function(){return ne}),n.d(t,"e",function(){return z}),n.d(t,"b",function(){return J}),n.d(t,"c",function(){return X});var i=n(77),a=n(18),r=n(14),o=n(65),s=n(6),l=n(10),c=n(109),u=n(35),p=n(76),m=n(20),h=n(105),d=n(34),g=n(1),_=n(80),y=n(53),f=n(57),b=n(62),E=n(16),v=n(51),k=n(75),O=n(5),C=n(46),T=n(64),S=n(0),M=n(28),P=n(33),A=n(12),w=n(56),x=(n(19),n(37)),R=(n(32),n(24)),N=n(8),I=n(73),L=n(60),D=n(43),B=n(30),j=n(7),W=n(81),F=(n(39),n(13)),U=(n(9),n(134),n(63)),H=n(70),G=n(3),K=n(44),q=n(22),$=n(176).sprintf,Y=n(176).vsprintf,z=!1,V=!1,J=!1,X=!1,Q=!1,Z=!1,ee=!1,te=1,ne=1,ie={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 ae(){for(var e=0;e<S.a.sourceFiles.length;++e)3===S.a.sourceFiles[e].n&&(z=!0),4===S.a.sourceFiles[e].n&&(V=!0,te=S.a.sourceFiles[e].lvl),5===S.a.sourceFiles[e].n&&(J=!0),6===S.a.sourceFiles[e].n&&(X=!0),7===S.a.sourceFiles[e].n&&(Q=!0),8===S.a.sourceFiles[e].n&&(Z=!0,ne=S.a.sourceFiles[e].lvl),11===S.a.sourceFiles[e].n&&(ee=!0)}function re(t){var n=function(e,n){if(t.dynamicLoadedFns[e])return;t.dynamicLoadedFns[e]=!0;const i=t.scriptRef.threads;if("number"!=typeof i&&(console.warn(`WorkerScript detected NaN for threadcount for ${t.name} on ${t.serverIp}`),i=1),t.dynamicRamUsage+=n*i,t.dynamicRamUsage>1.01*t.ramUsage)throw Object(j.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)},z=function(e,n){return t.loadedFns[e]?0:(t.loadedFns[e]=!0,n)},X=function(e,n=""){var i=Object(A.e)(e);if(null==i)throw Object(j.d)(t,`Invalid IP or hostname passed into ${n}() function`);return i},ee=function(e){if(isNaN(e))throw Object(j.d)(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=S.a.hacknetNodes.length)throw Object(j.d)(t,"Index specified for Hacknet Node is out-of-bounds: "+e);return S.a.hacknetNodes[e]},ae=function(e,t){return X(t,"getCodingContract").getContract(e)};return{hacknet:{numNodes:function(){return S.a.hacknetNodes.length},purchaseNode:function(){return Object(k.e)()},getPurchaseNodeCost:function(){return Object(k.c)()},getNodeStats:function(e){var t=ee(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 ee(e).purchaseLevelUpgrade(t)},upgradeRam:function(e,t){return ee(e).purchaseRamUpgrade(t)},upgradeCore:function(e,t){return ee(e).purchaseCoreUpgrade(t)},getLevelUpgradeCost:function(e,t){return ee(e).calculateLevelUpgradeCost(t)},getRamUpgradeCost:function(e,t){return ee(e).calculateRamUpgradeCost(t)},getCoreUpgradeCost:function(e,t){return ee(e).calculateCoreUpgradeCost(t)}},sprintf:$,vsprintf:Y,scan:function(e=t.serverIp,i=!0){if(t.checkingRam)return z("scan",g.CONSTANTS.ScriptScanRamCost);n("scan",g.CONSTANTS.ScriptScanRamCost);var a=Object(A.e)(e);if(null==a)throw Object(j.d)(t,"Invalid IP or hostname passed into scan() command");for(var r=[],o=0;o<a.serversOnNetwork.length;o++){var s;null!=(s=i?a.getServerOnNetwork(o).hostname:a.getServerOnNetwork(o).ip)&&r.push(s)}return null==t.disableLogs.ALL&&null==t.disableLogs.scan&&t.scriptRef.log("scan() returned "+a.serversOnNetwork.length+" connections for "+a.hostname),r},hack:function(e){if(t.checkingRam)return z("hack",g.CONSTANTS.ScriptHackRamCost);if(n("hack",g.CONSTANTS.ScriptHackRamCost),void 0===e)throw Object(j.d)(t,"Hack() call has incorrect number of arguments. Takes 1 argument");var i=t.scriptRef.threads;(isNaN(i)||i<1)&&(i=1);var a=Object(A.e)(e);if(null==a)throw t.scriptRef.log("hack() error. Invalid IP or hostname passed in: "+e+". Stopping..."),Object(j.d)(t,"hack() error. Invalid IP or hostname passed in: "+e+". Stopping...");var r=Object(y.d)(a);if(0==a.hasAdminRights)throw t.scriptRef.log("Cannot hack this server ("+a.hostname+") because user does not have root access"),Object(j.d)(t,"Cannot hack this server ("+a.hostname+") because user does not have root access");if(a.requiredHackingSkill>S.a.hacking_skill)throw t.scriptRef.log("Cannot hack this server ("+a.hostname+") because user's hacking skill is not high enough"),Object(j.d)(t,"Cannot hack this server ("+a.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="+i+")"),Object(j.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(y.b)(a),n=Math.random(),r=Object(y.c)(a)*i,o=r/4;if(n<e){const e=Object(y.e)(a);let n=Math.ceil(1/e*(a.moneyAvailable/a.moneyMax));isNaN(n)&&(n=1e6);let s=Math.floor(a.moneyAvailable*e)*i;return s<=0&&(s=0,r=o),s>a.moneyAvailable&&(s=a.moneyAvailable),a.moneyAvailable-=s,a.moneyAvailable<0&&(a.moneyAvailable=0),S.a.gainMoney(s),t.scriptRef.onlineMoneyMade+=s,S.a.scriptProdSinceLastAug+=s,t.scriptRef.recordHack(a.ip,s,i),S.a.gainHackingExp(r),t.scriptRef.onlineExpGained+=r,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script SUCCESSFULLY hacked "+a.hostname+" for $"+Object(G.formatNumber)(s,2)+" and "+Object(G.formatNumber)(r,4)+" exp (t="+i+")"),a.fortify(g.CONSTANTS.ServerFortifyAmount*Math.min(i,n)),Promise.resolve(s)}return S.a.gainHackingExp(o),t.scriptRef.onlineExpGained+=o,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script FAILED to hack "+a.hostname+". Gained "+Object(G.formatNumber)(o,4)+" exp (t="+i+")"),Promise.resolve(0)})},hackAnalyzeThreads:function(e,i){if(t.checkingRam)return z("hackAnalyzeThreads",g.CONSTANTS.ScriptHackAnalyzeRamCost);n("hackAnalyzeThreads",g.CONSTANTS.ScriptHackAnalyzeRamCost);const a=X(e,"hackAnalyzeThreads");if(isNaN(i))throw Object(j.d)(t,`Invalid growth argument passed into hackAnalyzeThreads: ${i}. Must be numeric`);if(i<0||i>a.moneyAvailable)return-1;const r=Object(y.e)(a);return i/Math.floor(a.moneyAvailable*r)},hackAnalyzePercent:function(e){if(t.checkingRam)return z("hackAnalyzePercent",g.CONSTANTS.ScriptHackAnalyzeRamCost);n("hackAnalyzePercent",g.CONSTANTS.ScriptHackAnalyzeRamCost);const i=X(e,"hackAnalyzePercent");return 100*Object(y.e)(i)},hackChance:function(e){if(t.checkingRam)return z("hackChance",g.CONSTANTS.ScriptHackAnalyzeRamCost);n("hackChance",g.CONSTANTS.ScriptHackAnalyzeRamCost);const i=X(e,"hackChance");return Object(y.b)(i)},sleep:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(j.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(j.e)(e,t).then(function(){return Promise.resolve(!0)})},grow:function(e){if(t.checkingRam)return z("grow",g.CONSTANTS.ScriptGrowRamCost);n("grow",g.CONSTANTS.ScriptGrowRamCost);var i=t.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===e)throw Object(j.d)(t,"grow() call has incorrect number of arguments. Takes 1 argument");var a=Object(A.e)(e);if(null==a)throw t.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot grow(). Invalid IP or hostname passed in: "+e);if(0==a.hasAdminRights)throw t.scriptRef.log("Cannot grow this server ("+a.hostname+") because user does not have root access"),Object(j.d)(t,"Cannot grow this server ("+a.hostname+") because user does not have root access");var r=Object(y.a)(a);return null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Executing grow() on server "+a.hostname+" in "+Object(G.formatNumber)(r,3)+" seconds (t="+i+")"),Object(j.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=a.moneyAvailable<=0?1:a.moneyAvailable;a.moneyAvailable+=1*i;var n=Object(A.k)(a,450*i);const r=a.moneyAvailable;t.scriptRef.recordGrow(a.ip,i);var o=Object(y.c)(a)*i;return 1==n&&(o=0),null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Available money on "+a.hostname+" grown by "+Object(G.formatNumber)(r/e*100-100,6)+"%. Gained "+Object(G.formatNumber)(o,4)+" hacking exp (t="+i+")"),t.scriptRef.onlineExpGained+=o,S.a.gainHackingExp(o),Promise.resolve(r/e)})},growthAnalyze:function(e,i){if(t.checkingRam)return z("growthAnalyze",g.CONSTANTS.ScriptGrowthAnalyzeRamCost);n("growthAnalyze",g.CONSTANTS.ScriptGrowthAnalyzeRamCost);const a=X(e,"growthAnalyze");if(isNaN(i))throw Object(j.d)(t,`Invalid growth argument passed into growthAnalyze: ${i}. Must be numeric`);return Object(A.h)(a,Number(i))},weaken:function(e){if(t.checkingRam)return z("weaken",g.CONSTANTS.ScriptWeakenRamCost);n("weaken",g.CONSTANTS.ScriptWeakenRamCost);var i=t.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===e)throw Object(j.d)(t,"weaken() call has incorrect number of arguments. Takes 1 argument");var a=Object(A.e)(e);if(null==a)throw t.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot weaken(). Invalid IP or hostname passed in: "+e);if(0==a.hasAdminRights)throw t.scriptRef.log("Cannot weaken this server ("+a.hostname+") because user does not have root access"),Object(j.d)(t,"Cannot weaken this server ("+a.hostname+") because user does not have root access");var r=Object(y.f)(a);return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Executing weaken() on server "+a.hostname+" in "+Object(G.formatNumber)(r,3)+" seconds (t="+i+")"),Object(j.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);a.weaken(g.CONSTANTS.ServerWeakenAmount*i),t.scriptRef.recordWeaken(a.ip,i);var e=Object(y.c)(a)*i;return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Server security level on "+a.hostname+" weakened to "+a.hackDifficulty+". Gained "+Object(G.formatNumber)(e,4)+" hacking exp (t="+i+")"),t.scriptRef.onlineExpGained+=e,S.a.gainHackingExp(e),Promise.resolve(g.CONSTANTS.ServerWeakenAmount*i)})},print:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(j.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(j.d)(t,"tprint() call has incorrect number of arguments. Takes 1 argument");e.toString();Object(N.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===ie[e])throw Object(j.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===ie[e])throw Object(j.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===ie[e])throw Object(j.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 i=Object(A.e)(n);if(null==i)throw t.log(`getScriptLogs() failed. Invalid IP or hostname passed in: ${n}`),Object(j.d)(t,`getScriptLogs() failed. Invalid IP or hostname passed in: ${n}`);let a=[];for(let e=2;e<arguments.length;++e)a.push(arguments[e]);const r=Object(P.d)(e,a,i);return null==r?(t.scriptRef.log(`getScriptLogs() failed. No such script ${e} on ${i.hostname} with args: ${Object(U.arrayToString)(a)}`),""):r.logs.slice()}return t.scriptRef.logs.slice()},nuke:function(e){if(t.checkingRam)return z("nuke",g.CONSTANTS.ScriptPortProgramRamCost);if(n("nuke",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(j.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot call nuke(). Invalid IP or hostname passed in: "+e);if(!S.a.hasProgram(M.Programs.NukeProgram.name))throw Object(j.d)(t,"You do not have the NUKE.exe virus!");if(i.openPortCount<i.numOpenPortsRequired)throw Object(j.d)(t,"Not enough ports opened to use NUKE.exe virus");return i.hasAdminRights?null==t.disableLogs.ALL&&null==t.disableLogs.nuke&&t.scriptRef.log("Already have root access to "+i.hostname):(i.hasAdminRights=!0,null==t.disableLogs.ALL&&null==t.disableLogs.nuke&&t.scriptRef.log("Executed NUKE.exe virus on "+i.hostname+" to gain root access")),!0},brutessh:function(e){if(t.checkingRam)return z("brutessh",g.CONSTANTS.ScriptPortProgramRamCost);if(n("brutessh",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(j.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("Cannot call brutessh(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot call brutessh(). Invalid IP or hostname passed in: "+e);if(!S.a.hasProgram(M.Programs.BruteSSHProgram.name))throw t.scriptRef.log("You do not have the BruteSSH.exe program!"),Object(j.d)(t,"You do not have the BruteSSH.exe program!");return i.sshPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.brutessh&&t.scriptRef.log("SSH Port (22) already opened on "+i.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.brutessh&&t.scriptRef.log("Executed BruteSSH.exe on "+i.hostname+" to open SSH port (22)"),i.sshPortOpen=!0,++i.openPortCount),!0},ftpcrack:function(e){if(t.checkingRam)return z("ftpcrack",g.CONSTANTS.ScriptPortProgramRamCost);if(n("ftpcrack",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(j.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("Cannot call ftpcrack(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot call ftpcrack(). Invalid IP or hostname passed in: "+e);if(!S.a.hasProgram(M.Programs.FTPCrackProgram.name))throw Object(j.d)(t,"You do not have the FTPCrack.exe program!");return i.ftpPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.ftpcrack&&t.scriptRef.log("FTP Port (21) already opened on "+i.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.ftpcrack&&t.scriptRef.log("Executed FTPCrack.exe on "+i.hostname+" to open FTP port (21)"),i.ftpPortOpen=!0,++i.openPortCount),!0},relaysmtp:function(e){if(t.checkingRam)return z("relaysmtp",g.CONSTANTS.ScriptPortProgramRamCost);if(n("relaysmtp",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(j.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("Cannot call relaysmtp(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot call relaysmtp(). Invalid IP or hostname passed in: "+e);if(!S.a.hasProgram(M.Programs.RelaySMTPProgram.name))throw Object(j.d)(t,"You do not have the relaySMTP.exe program!");return i.smtpPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.relaysmtp&&t.scriptRef.log("SMTP Port (25) already opened on "+i.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.relaysmtp&&t.scriptRef.log("Executed relaySMTP.exe on "+i.hostname+" to open SMTP port (25)"),i.smtpPortOpen=!0,++i.openPortCount),!0},httpworm:function(e){if(t.checkingRam)return z("httpworm",g.CONSTANTS.ScriptPortProgramRamCost);if(n("httpworm",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(j.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("Cannot call httpworm(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot call httpworm(). Invalid IP or hostname passed in: "+e);if(!S.a.hasProgram(M.Programs.HTTPWormProgram.name))throw Object(j.d)(t,"You do not have the HTTPWorm.exe program!");return i.httpPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.httpworm&&t.scriptRef.log("HTTP Port (80) already opened on "+i.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.httpworm&&t.scriptRef.log("Executed HTTPWorm.exe on "+i.hostname+" to open HTTP port (80)"),i.httpPortOpen=!0,++i.openPortCount),!0},sqlinject:function(e){if(t.checkingRam)return z("sqlinject",g.CONSTANTS.ScriptPortProgramRamCost);if(n("sqlinject",g.CONSTANTS.ScriptPortProgramRamCost),void 0===e)throw Object(j.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("Cannot call sqlinject(). Invalid IP or hostname passed in: "+e),Object(j.d)(t,"Cannot call sqlinject(). Invalid IP or hostname passed in: "+e);if(!S.a.hasProgram(M.Programs.SQLInjectProgram.name))throw Object(j.d)(t,"You do not have the SQLInject.exe program!");return i.sqlPortOpen?null==t.disableLogs.ALL&&null==t.disableLogs.sqlinject&&t.scriptRef.log("SQL Port (1433) already opened on "+i.hostname):(null==t.disableLogs.ALL&&null==t.disableLogs.sqlinject&&t.scriptRef.log("Executed SQLInject.exe on "+i.hostname+" to open SQL port (1433)"),i.sqlPortOpen=!0,++i.openPortCount),!0},run:function(e,i=1){if(t.checkingRam)return z("run",g.CONSTANTS.ScriptRunRamCost);if(n("run",g.CONSTANTS.ScriptRunRamCost),void 0===e)throw Object(j.d)(t,"run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(i)||i<0)throw Object(j.d)(t,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var a=[],r=2;r<arguments.length;++r)a.push(arguments[r]);var o=Object(A.e)(t.serverIp);if(null==o)throw Object(j.d)(t,"Could not find server. This is a bug in the game. Report to game dev");return Object(j.f)(o,e,a,t,i)},exec:function(e,i,a=1){if(t.checkingRam)return z("exec",g.CONSTANTS.ScriptExecRamCost);if(n("exec",g.CONSTANTS.ScriptExecRamCost),void 0===e||void 0===i)throw Object(j.d)(t,"exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(a)||a<0)throw Object(j.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(A.e)(i);if(null==s)throw Object(j.d)(t,"Invalid hostname/ip passed into exec() command: "+i);return Object(j.f)(s,e,r,t,a)},spawn:function(e,i){if(t.checkingRam)return z("spawn",g.CONSTANTS.ScriptSpawnRamCost);if(n("spawn",g.CONSTANTS.ScriptSpawnRamCost),null==e||null==i)throw Object(j.d)(t,"Invalid scriptname or numThreads argument passed to spawn()");setTimeout(()=>{if(void 0===e)throw Object(j.d)(t,"spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");if(isNaN(i)||i<0)throw Object(j.d)(t,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var n=[],a=2;a<arguments.length;++a)n.push(arguments[a]);var r=Object(A.e)(t.serverIp);if(null==r)throw Object(j.d)(t,"Could not find server. This is a bug in the game. Report to game dev");return Object(j.f)(r,e,n,t,i)},2e4),null==t.disableLogs.ALL&&null==t.disableLogs.spawn&&t.scriptRef.log("spawn() will execute "+e+" in 20 seconds"),re(t).exit()},kill:function(e,i){if(t.checkingRam)return z("kill",g.CONSTANTS.ScriptKillRamCost);if(n("kill",g.CONSTANTS.ScriptKillRamCost),void 0===e||void 0===i)throw Object(j.d)(t,"kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");var a=Object(A.e)(i);if(null==a)throw t.scriptRef.log("kill() failed. Invalid IP or hostname passed in: "+i),Object(j.d)(t,"kill() failed. Invalid IP or hostname passed in: "+i);for(var r=[],o=2;o<arguments.length;++o)r.push(arguments[o]);var s=Object(P.d)(e,r,a);return null==s?(t.scriptRef.log("kill() failed. No such script "+e+" on "+a.hostname+" with args: "+Object(U.arrayToString)(r)),!1):Object(B.d)(s,a.ip)?(null==t.disableLogs.ALL&&null==t.disableLogs.kill&&t.scriptRef.log("Killing "+e+" on "+a.hostname+" with args: "+Object(U.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 "+a.hostname+" with args: "+Object(U.arrayToString)(r)),!1)},killall:function(e=t.serverIp){if(t.checkingRam)return z("killall",g.CONSTANTS.ScriptKillRamCost);if(n("killall",g.CONSTANTS.ScriptKillRamCost),void 0===e)throw Object(j.d)(t,"killall() call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("killall() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"killall() failed. Invalid IP or hostname passed in: "+e);for(var a=i.runningScripts.length>0,r=i.runningScripts.length-1;r>=0;--r)Object(B.d)(i.runningScripts[r],i.ip);return null==t.disableLogs.ALL&&null==t.disableLogs.killall&&t.scriptRef.log("killall(): Killing all scripts on "+i.hostname+". May take a few minutes for the scripts to die"),a},exit:function(){if(t.checkingRam)return 0;var e=Object(A.e)(t.serverIp);if(null==e)throw Object(j.d)(t,"Error getting Server for this script in exit(). This is a bug please contact game dev");Object(B.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,i,a){if(t.checkingRam)return z("scp",g.CONSTANTS.ScriptScpRamCost);if(n("scp",g.CONSTANTS.ScriptScpRamCost),2!==arguments.length&&3!==arguments.length)throw Object(j.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){re(t).scp(e,i,a)&&(r=!0)}),r}if(!e.endsWith(".lit")&&!Object(P.f)(e)&&!e.endsWith("txt"))throw Object(j.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!=a){if(void 0===e||void 0===i||void 0===a)throw Object(j.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(A.e)(a)))throw Object(j.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${a}`);if(null==(s=Object(A.e)(i)))throw Object(j.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${i}`)}else{if(null==i)throw Object(j.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(void 0===e||void 0===i)throw Object(j.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(A.e)(i)))throw Object(j.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${i}`);if(null==(s=Object(A.e)(t.serverIp)))throw Object(j.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 C.a)&&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 I.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 P.c;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,i){if(t.checkingRam)return z("ls",g.CONSTANTS.ScriptScanRamCost);if(n("ls",g.CONSTANTS.ScriptScanRamCost),void 0===e)throw Object(j.d)(t,"ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");var a=Object(A.e)(e);if(null==a)throw t.scriptRef.log("ls() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"ls() failed. Invalid IP or hostname passed in: "+e);var r=!1;arguments.length>=2&&(r=i.toString());for(var o=[],s=0;s<a.programs.length;s++)r?a.programs[s].includes(r)&&o.push(a.programs[s]):o.push(a.programs[s]);for(s=0;s<a.scripts.length;s++)r?a.scripts[s].filename.includes(r)&&o.push(a.scripts[s].filename):o.push(a.scripts[s].filename);for(s=0;s<a.messages.length;s++)r?a.messages[s]instanceof C.a?a.messages[s].filename.includes(r)&&o.push(a.messages[s].filename):a.messages[s].includes(r)&&o.push(a.messages[s]):a.messages[s]instanceof C.a?o.push(a.messages[s].filename):o.push(a.messages[s]);for(s=0;s<a.textFiles.length;s++)r?a.textFiles[s].fn.includes(r)&&o.push(a.textFiles[s].fn):o.push(a.textFiles[s].fn);for(s=0;s<a.contracts.length;++s)r?a.contracts[s].fn.includes(r)&&o.push(a.contracts[s].fn):o.push(a.contracts[s].fn);return o.sort(),o},ps:function(e=t.serverIp){if(t.checkingRam)return z("ps",g.CONSTANTS.ScriptScanRamCost);n("ps",g.CONSTANTS.ScriptScanRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("ps() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"ps() failed. Invalid IP or hostname passed in: "+e);const a=[];for(const e in i.runningScripts){const t=i.runningScripts[e];a.push({filename:t.filename,threads:t.threads,args:t.args.slice()})}return a},hasRootAccess:function(e){if(t.checkingRam)return z("hasRootAccess",g.CONSTANTS.ScriptHasRootAccessRamCost);if(n("hasRootAccess",g.CONSTANTS.ScriptHasRootAccessRamCost),void 0===e)throw Object(j.d)(t,"hasRootAccess() call has incorrect number of arguments. Takes 1 argument");var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("hasRootAccess() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"hasRootAccess() failed. Invalid IP or hostname passed in: "+e);return i.hasAdminRights},getIp:function(){if(t.checkingRam)return z("getIp",g.CONSTANTS.ScriptGetHostnameRamCost);n("getIp",g.CONSTANTS.ScriptGetHostnameRamCost);var e=Object(A.e)(t.serverIp);if(null==e)throw Object(j.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 z("getHostname",g.CONSTANTS.ScriptGetHostnameRamCost);n("getHostname",g.CONSTANTS.ScriptGetHostnameRamCost);var e=Object(A.e)(t.serverIp);if(null==e)throw Object(j.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?z("getHackingLevel",g.CONSTANTS.ScriptGetHackingLevelRamCost):(n("getHackingLevel",g.CONSTANTS.ScriptGetHackingLevelRamCost),S.a.updateSkillLevels(),null==t.disableLogs.ALL&&null==t.disableLogs.getHackingLevel&&t.scriptRef.log("getHackingLevel() returned "+S.a.hacking_skill),S.a.hacking_skill)},getHackingMultipliers:function(){return t.checkingRam?z("getHackingMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost):(n("getHackingMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost),{chance:S.a.hacking_chance_mult,speed:S.a.hacking_speed_mult,money:S.a.hacking_money_mult,growth:S.a.hacking_grow_mult})},getHacknetMultipliers:function(){return t.checkingRam?z("getHacknetMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost):(n("getHacknetMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost),{production:S.a.hacknet_node_money_mult,purchaseCost:S.a.hacknet_node_purchase_cost_mult,ramCost:S.a.hacknet_node_ram_cost_mult,coreCost:S.a.hacknet_node_core_cost_mult,levelCost:S.a.hacknet_node_level_cost_mult})},getBitNodeMultipliers:function(){if(t.checkingRam)return z("getBitNodeMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost);if(n("getBitNodeMultipliers",g.CONSTANTS.ScriptGetMultipliersRamCost),!J)throw Object(j.d)(t,"Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");return Object.assign({},l.BitNodeMultipliers)},getServerMoneyAvailable:function(e){if(t.checkingRam)return z("getServerMoneyAvailable",g.CONSTANTS.ScriptGetServerRamCost);n("getServerMoneyAvailable",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerMoneyAvailable() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"getServerMoneyAvailable() failed. Invalid IP or hostname passed in: "+e);return"home"==i.hostname?(null==t.disableLogs.ALL&&null==t.disableLogs.getServerMoneyAvailable&&t.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $"+Object(G.formatNumber)(S.a.money.toNumber(),2)),S.a.money.toNumber()):(null==t.disableLogs.ALL&&null==t.disableLogs.getServerMoneyAvailable&&t.scriptRef.log("getServerMoneyAvailable() returned "+Object(G.formatNumber)(i.moneyAvailable,2)+" for "+i.hostname),i.moneyAvailable)},getServerSecurityLevel:function(e){if(t.checkingRam)return z("getServerSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerSecurityLevel() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.hackDifficulty,3)+" for "+i.hostname),i.hackDifficulty},getServerBaseSecurityLevel:function(e){if(t.checkingRam)return z("getServerBaseSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerBaseSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.baseDifficulty,3)+" for "+i.hostname),i.baseDifficulty},getServerMinSecurityLevel:function(e){if(t.checkingRam)return z("getServerMinSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerMinSecurityLevel",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.minDifficulty,3)+" for "+i.hostname),i.minDifficulty},getServerRequiredHackingLevel:function(e){if(t.checkingRam)return z("getServerRequiredHackingLevel",g.CONSTANTS.ScriptGetServerRamCost);n("getServerRequiredHackingLevel",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.requiredHackingSkill,0)+" for "+i.hostname),i.requiredHackingSkill},getServerMaxMoney:function(e){if(t.checkingRam)return z("getServerMaxMoney",g.CONSTANTS.ScriptGetServerRamCost);n("getServerMaxMoney",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.moneyMax,0)+" for "+i.hostname),i.moneyMax},getServerGrowth:function(e){if(t.checkingRam)return z("getServerGrowth",g.CONSTANTS.ScriptGetServerRamCost);n("getServerGrowth",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.serverGrowth,0)+" for "+i.hostname),i.serverGrowth},getServerNumPortsRequired:function(e){if(t.checkingRam)return z("getServerNumPortsRequired",g.CONSTANTS.ScriptGetServerRamCost);n("getServerNumPortsRequired",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.numOpenPortsRequired,0)+" for "+i.hostname),i.numOpenPortsRequired},getServerRam:function(e){if(t.checkingRam)return z("getServerRam",g.CONSTANTS.ScriptGetServerRamCost);n("getServerRam",g.CONSTANTS.ScriptGetServerRamCost);var i=Object(A.e)(e);if(null==i)throw t.scriptRef.log("getServerRam() failed. Invalid IP or hostname passed in: "+e),Object(j.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(G.formatNumber)(i.maxRam,2)+"GB, "+Object(G.formatNumber)(i.ramUsed,2)+"GB]"),[i.maxRam,i.ramUsed]},serverExists:function(e){return t.checkingRam?z("serverExists",g.CONSTANTS.ScriptGetServerRamCost):(n("serverExists",g.CONSTANTS.ScriptGetServerRamCost),null!==Object(A.e)(e))},fileExists:function(e,i=t.serverIp){if(t.checkingRam)return z("fileExists",g.CONSTANTS.ScriptFileExistsRamCost);if(n("fileExists",g.CONSTANTS.ScriptFileExistsRamCost),void 0===e)throw Object(j.d)(t,"fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");var a=Object(A.e)(i);if(null==a)throw t.scriptRef.log("fileExists() failed. Invalid IP or hostname passed in: "+i),Object(j.d)(t,"fileExists() failed. Invalid IP or hostname passed in: "+i);for(var r=0;r<a.scripts.length;++r)if(e==a.scripts[r].filename)return!0;for(r=0;r<a.programs.length;++r)if(e.toLowerCase()==a.programs[r].toLowerCase())return!0;for(r=0;r<a.messages.length;++r)if(!(a.messages[r]instanceof C.a)&&e.toLowerCase()===a.messages[r])return!0;return null!=Object(I.getTextFile)(e,a)},isRunning:function(e,i){if(t.checkingRam)return z("isRunning",g.CONSTANTS.ScriptIsRunningRamCost);if(n("isRunning",g.CONSTANTS.ScriptIsRunningRamCost),void 0===e||void 0===i)throw Object(j.d)(t,"isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");var a=Object(A.e)(i);if(null==a)throw t.scriptRef.log("isRunning() failed. Invalid IP or hostname passed in: "+i),Object(j.d)(t,"isRunning() failed. Invalid IP or hostname passed in: "+i);for(var r=[],o=2;o<arguments.length;++o)r.push(arguments[o]);return null!=Object(P.d)(e,r,a)},getStockSymbols:function(){if(t.checkingRam)return z("getStockSymbols",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockSymbols",g.CONSTANTS.ScriptGetStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use getStockSymbols()");return Object.values(R.d)},getStockPrice:function(e){if(t.checkingRam)return z("getStockPrice",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockPrice",g.CONSTANTS.ScriptGetStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use getStockPrice()");var i=R.e[e];if(null==i)throw Object(j.d)(t,"Invalid stock symbol passed into getStockPrice()");return parseFloat(i.price.toFixed(3))},getStockPosition:function(e){if(t.checkingRam)return z("getStockPosition",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockPosition",g.CONSTANTS.ScriptGetStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use getStockPosition()");var i=R.e[e];if(null==i)throw Object(j.d)(t,"Invalid stock symbol passed into getStockPosition()");return[i.playerShares,i.playerAvgPx,i.playerShortShares,i.playerAvgShortPx]},getStockMaxShares:function(e){if(t.checkingRam)return z("getStockMaxShares",g.CONSTANTS.ScriptGetStockRamCost);if(n("getStockMaxShares",g.CONSTANTS.ScriptGetStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use getStockMaxShares()");const i=R.e[e];if(null==i)throw Object(j.d)(t,"Invalid stock symbol passed into getStockMaxShares()");return i.maxShares},buyStock:function(e,i){if(t.checkingRam)return z("buyStock",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("buyStock",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use buyStock()");var a=R.e[e];if(null==a)throw Object(j.d)(t,"Invalid stock symbol passed into buyStock()");if(i<0||isNaN(i))return t.scriptRef.log("ERROR: Invalid 'shares' argument passed to buyStock()"),0;if(0===(i=Math.round(i)))return 0;var r=a.price*i;if(S.a.money.lt(r+g.CONSTANTS.StockMarketCommission))return t.scriptRef.log("Not enough money to purchase "+Object(G.formatNumber)(i,0)+" shares of "+e+". Need $"+Object(G.formatNumber)(r+g.CONSTANTS.StockMarketCommission,2).toString()),0;if(i+a.playerShares+a.playerShortShares>a.maxShares)return t.scriptRef.log(`You cannot purchase this many shares. ${a.symbol} has a maximum of `+`${a.maxShares} shares.`),0;var o=a.playerShares*a.playerAvgPx;S.a.loseMoney(r+g.CONSTANTS.StockMarketCommission);var s=o+r;return a.playerShares+=i,a.playerAvgPx=s/a.playerShares,F.routing.isOn(F.Page.StockMarket)&&Object(R.r)(a),null==t.disableLogs.ALL&&null==t.disableLogs.buyStock&&t.scriptRef.log("Bought "+Object(G.formatNumber)(i,0)+" shares of "+a.symbol+" at $"+Object(G.formatNumber)(a.price,2)+" per share"),a.price},sellStock:function(e,i){if(t.checkingRam)return z("sellStock",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("sellStock",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use sellStock()");var a=R.e[e];if(null==a)throw Object(j.d)(t,"Invalid stock symbol passed into sellStock()");if(i<0||isNaN(i))return t.scriptRef.log("ERROR: Invalid 'shares' argument passed to sellStock()"),0;if((i=Math.round(i))>a.playerShares&&(i=a.playerShares),0===i)return 0;var r=a.price*i-g.CONSTANTS.StockMarketCommission;S.a.gainMoney(r);var o=(a.price-a.playerAvgPx)*i-g.CONSTANTS.StockMarketCommission;return isNaN(o)&&(o=0),t.scriptRef.onlineMoneyMade+=o,S.a.scriptProdSinceLastAug+=o,a.playerShares-=i,0==a.playerShares&&(a.playerAvgPx=0),F.routing.isOn(F.Page.StockMarket)&&Object(R.r)(a),null==t.disableLogs.ALL&&null==t.disableLogs.sellStock&&t.scriptRef.log("Sold "+Object(G.formatNumber)(i,0)+" shares of "+a.symbol+" at $"+Object(G.formatNumber)(a.price,2)+" per share. Gained $"+Object(G.formatNumber)(r,2)),a.price},shortStock(e,i){if(t.checkingRam)return z("shortStock",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("shortStock",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use shortStock()");if(8!==S.a.bitNodeN&&!(Z&&ne>=2))throw Object(j.d)(t,"ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var a=R.e[e];if(null==a)throw Object(j.d)(t,"ERROR: Invalid stock symbol passed into shortStock()");return Object(R.p)(a,i,t)?a.price:0},sellShort(e,i){if(t.checkingRam)return z("sellShort",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("sellShort",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use sellShort()");if(8!==S.a.bitNodeN&&!(Z&&ne>=2))throw Object(j.d)(t,"ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var a=R.e[e];if(null==a)throw Object(j.d)(t,"ERROR: Invalid stock symbol passed into sellShort()");return Object(R.n)(a,i,t)?a.price:0},placeOrder(e,i,a,r,o){if(t.checkingRam)return z("placeOrder",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("placeOrder",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use placeOrder()");if(8!==S.a.bitNodeN&&!(Z&&ne>=3))throw Object(j.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=R.e[e];if(null==c)throw Object(j.d)(t,"ERROR: Invalid stock symbol passed into placeOrder()");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=R.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=R.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=R.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(j.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=R.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=R.b.Long;else{if(!o.includes("s"))throw Object(j.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=R.b.Short}return Object(R.l)(c,i,a,s,l,t)},cancelOrder(e,i,a,r,o){if(t.checkingRam)return z("cancelOrder",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("cancelOrder",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use cancelOrder()");if(8!==S.a.bitNodeN&&!(Z&&ne>=3))throw Object(j.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=R.e[e];if(null==c)throw Object(j.d)(t,"ERROR: Invalid stock symbol passed into cancelOrder()");if(isNaN(i)||isNaN(a))throw Object(j.d)(t,"ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=R.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=R.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=R.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(j.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=R.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=R.b.Long;else{if(!o.includes("s"))throw Object(j.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=R.b.Short}var u={stock:c,shares:i,price:a,type:s,pos:l};return Object(R.f)(u,t)},getOrders:function(){if(t.checkingRam)return z("getOrders",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("getOrders",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use getOrders()");if(8!==S.a.bitNodeN&&!(Z&&ne>=3))throw Object(j.d)(t,"ERROR: Cannot use getOrders(). You must either be in BitNode-8 or have Level 3 of Source-File 8");const e={},i=R.c.Orders;for(let t in i){const n=i[t];if(n.constructor===Array&&n.length>0){e[t]=[];for(let i=0;i<n.length;++i)e[t].push({shares:n[i].shares,price:n[i].price,type:n[i].type,position:n[i].pos})}}return e},getStockVolatility:function(e){if(t.checkingRam)return z("getStockVolatility",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("getStockVolatility",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.has4SDataTixApi)throw Object(j.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockVolatility()");var i=R.e[e];if(null==i)throw Object(j.d)(t,"ERROR: Invalid stock symbol passed into getStockVolatility()");return i.mv/100},getStockForecast:function(e){if(t.checkingRam)return z("getStockForecast",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("getStockForecast",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.has4SDataTixApi)throw Object(j.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockForecast()");var i=R.e[e];if(null==i)throw Object(j.d)(t,"ERROR: Invalid stock symbol passed into getStockForecast()");var a=50;return i.b?a+=i.otlkMag:a-=i.otlkMag,a/100},purchase4SMarketData:function(){if(t.checkingRam)return z("purchase4SMarketData",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("purchase4SMarketData",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use purchase4SMarketData()");return S.a.has4SData?(t.shouldLog("purchase4SMarketData")&&t.log("Already purchased 4S Market Data"),!0):S.a.money.lt(g.CONSTANTS.MarketData4SCost)?(t.shouldLog("purchase4SMarketData")&&t.log("Failed to purchase 4S Market Data - Not enough money"),!1):(S.a.has4SData=!0,S.a.loseMoney(g.CONSTANTS.MarketData4SCost),t.shouldLog("purchase4SMarketData")&&t.log("Purchased 4S Market Data"),!0)},purchase4SMarketDataTixApi:function(){if(t.checkingRam)return z("purchase4SMarketDataTixApi",g.CONSTANTS.ScriptBuySellStockRamCost);if(n("purchase4SMarketDataTixApi",g.CONSTANTS.ScriptBuySellStockRamCost),!S.a.hasTixApiAccess)throw Object(j.d)(t,"You don't have TIX API Access! Cannot use purchase4SMarketDataTixApi()");return S.a.has4SDataTixApi?(t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Already purchased 4S Market Data TIX API"),!0):S.a.money.lt(g.CONSTANTS.MarketDataTixApi4SCost)?(t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Failed to purchase 4S Market Data TIX API - Not enough money"),!1):(S.a.has4SDataTixApi=!0,S.a.loseMoney(g.CONSTANTS.MarketDataTixApi4SCost),t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Purchased 4S Market Data TIX API"),!0)},getPurchasedServerLimit:function(){return t.checkingRam?z("getPurchasedServerLimit",g.CONSTANTS.ScriptGetPurchasedServerLimit):(n("getPurchasedServerLimit",g.CONSTANTS.ScriptGetPurchasedServerLimit),Object(w.b)())},getPurchasedServerMaxRam:function(){return t.checkingRam?z("getPurchasedServerMaxRam",g.CONSTANTS.ScriptGetPurchasedServerMaxRam):(n("getPurchasedServerMaxRam",g.CONSTANTS.ScriptGetPurchasedServerMaxRam),Object(w.c)())},getPurchasedServerCost:function(e){if(t.checkingRam)return z("getPurchasedServerCost",g.CONSTANTS.ScriptGetPurchaseServerRamCost);n("getPurchasedServerCost",g.CONSTANTS.ScriptGetPurchaseServerRamCost);const i=Object(w.a)(e);return i===1/0?(t.scriptRef.log("ERROR: 'getPurchasedServerCost()' failed due to an invalid 'ram' argument"),1/0):i},purchaseServer:function(e,i){if(t.checkingRam)return z("purchaseServer",g.CONSTANTS.ScriptPurchaseServerRamCost);n("purchaseServer",g.CONSTANTS.ScriptPurchaseServerRamCost);var a=String(e);if(""==(a=a.replace(/\s+/g,"")))return t.log("ERROR: Passed empty string for hostname argument of purchaseServer()"),"";if(S.a.purchasedServers.length>=Object(w.b)())return t.log(`ERROR: You have reached the maximum limit of ${Object(w.b)()} servers. You cannot purchase any more.`),"";const r=Object(w.a)(i);if(r===1/0)return t.log("ERROR: 'purchaseServer()' failed due to an invalid 'ram' argument"),1/0;if(S.a.money.lt(r))return t.log("ERROR: Not enough money to purchase server. Need $"+Object(G.formatNumber)(r,2)),"";var o=new A.d({ip:Object(H.a)(),hostname:a,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:i});Object(A.a)(o),S.a.purchasedServers.push(o.ip);var s=S.a.getHomeComputer();return s.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(s.ip),S.a.loseMoney(r),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseServer&&t.scriptRef.log("Purchased new server with hostname "+o.hostname+" for $"+Object(G.formatNumber)(r,2)),o.hostname},deleteServer:function(e){if(t.checkingRam)return z("deleteServer",g.CONSTANTS.ScriptPurchaseServerRamCost);n("deleteServer",g.CONSTANTS.ScriptPurchaseServerRamCost);var i=String(e);i=i.replace(/\s\s+/g,"");var a=Object(A.c)(i);if(null==a)return t.scriptRef.log("ERROR: Could not find server with hostname "+i+". deleteServer() failed"),!1;if(!a.purchasedByPlayer||"home"===a.hostname)return t.scriptRef.log("ERROR: Server "+a.hostname+" is not a purchased server. Cannot be deleted. deleteServer() failed"),!1;var r=a.ip;if(a.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(a.runningScripts.length>0)return t.scriptRef.log("ERROR: Cannot delete server "+a.hostname+" because it still has scripts running."),!1;for(var o=!1,s=0;s<S.a.purchasedServers.length;++s)if(r==S.a.purchasedServers[s]){o=!0,S.a.purchasedServers.splice(s,1);break}if(!o)return t.scriptRef.log("ERROR: Could not identify server "+a.hostname+"as a purchased server. This is likely a bug please contact game dev"),!1;delete A.b[r],o=!1;var l=S.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 "+i),!0;return t.scriptRef.log("ERROR: Could not find server "+a.hostname+"as a purchased server. This is likely a bug please contact game dev"),!1},getPurchasedServers:function(e=!0){if(t.checkingRam)return z("getPurchasedServers",g.CONSTANTS.ScriptPurchaseServerRamCost);n("getPurchasedServers",g.CONSTANTS.ScriptPurchaseServerRamCost);var i=[];return S.a.purchasedServers.forEach(function(n){if(e){var a=Object(A.e)(n);if(null==a)throw Object(j.d)(t,"ERROR: Could not find server in getPurchasedServers(). This is a bug please report to game dev");i.push(a.hostname)}else i.push(n)}),i},write:function(e,i="",a="a"){if(t.checkingRam)return z("write",g.CONSTANTS.ScriptReadWriteRamCost);if(n("write",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e)){if(Object(K.isString)(e)){var r=e,o=t.getServer();if(null==o)throw Object(j.d)(t,"Error getting Server for this script in write(). This is a bug please contact game dev");if(Object(P.f)(r)){let e=t.getScriptOnServer(r);if(null==e)return e=new P.c(r,i,o.ip),o.scripts.push(e),!0;"w"===a?e.code=i:e.code+=i,e.updateRamUsage()}else{let e=Object(I.getTextFile)(r,o);if(null==e)return e=Object(I.createTextFile)(r,i,o),!0;"w"===a?e.write(i):e.append(i)}return!0}throw Object(j.d)(t,"Invalid argument passed in for write: "+e)}if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(j.d)(t,"ERROR: Trying to write to invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=B.a[e-1])||!(e instanceof W.a))throw Object(j.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.write(i)},tryWrite:function(e,i=""){if(t.checkingRam)return z("tryWrite",g.CONSTANTS.ScriptReadWriteRamCost);if(n("tryWrite",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(j.d)(t,"Invalid argument passed in for tryWrite: "+e);if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(j.d)(t,"ERROR: tryWrite() called on invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=B.a[e-1])||!(e instanceof W.a))throw Object(j.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.tryWrite(i)},read:function(e){if(t.checkingRam)return z("read",g.CONSTANTS.ScriptReadWriteRamCost);if(n("read",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e)){if(Object(K.isString)(e)){let n=e,i=Object(A.e)(t.serverIp);if(null==i)throw Object(j.d)(t,"Error getting Server for this script in read(). This is a bug please contact game dev");if(Object(P.f)(n)){let e=t.getScriptOnServer(n);return null==e?"":e.code}{let e=Object(I.getTextFile)(n,i);return null!==e?e.text:""}}throw Object(j.d)(t,"Invalid argument passed in for read(): "+e)}if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(j.d)(t,"ERROR: Trying to read from invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=B.a[e-1])||!(e instanceof W.a))throw Object(j.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 z("peek",g.CONSTANTS.ScriptReadWriteRamCost);if(n("peek",g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(j.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(j.d)(t,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+g.CONSTANTS.NumNetscriptPorts);if(null==(e=B.a[e-1])||!(e instanceof W.a))throw Object(j.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 z("clear",g.CONSTANTS.ScriptReadWriteRamCost);if(n("clear",g.CONSTANTS.ScriptReadWriteRamCost),!isNaN(e)){if((e=Math.round(e))<1||e>g.CONSTANTS.NumNetscriptPorts)throw Object(j.d)(t,"ERROR: Trying to clear invalid port: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid");if(null==(e=B.a[e-1])||!(e instanceof W.a))throw Object(j.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.clear()}if(!Object(K.isString)(e))throw Object(j.d)(t,"Invalid argument passed in for clear(): "+e);var i=e,a=Object(A.e)(t.serverIp);if(null==a)throw Object(j.d)(t,"Error getting Server for this script in clear(). This is a bug please contact game dev");var r=Object(I.getTextFile)(i,a);return null!=r&&r.write(""),0},getPortHandle:function(e){if(t.checkingRam)return z("getPortHandle",10*g.CONSTANTS.ScriptReadWriteRamCost);if(n("getPortHandle",10*g.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(j.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(j.d)(t,"ERROR: getPortHandle() called with invalid port number: "+e+". Only ports 1-"+g.CONSTANTS.NumNetscriptPorts+" are valid");if(null==(e=B.a[e-1])||!(e instanceof W.a))throw Object(j.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e},rm:function(e,i){if(t.checkingRam)return z("rm",g.CONSTANTS.ScriptReadWriteRamCost);n("rm",g.CONSTANTS.ScriptReadWriteRamCost),null!=i&&""!==i||(i=t.serverIp);var a=Object(A.e)(i);if(null==a)throw Object(j.d)(t,`Invalid server specified for rm(): ${i}`);if(e.includes(".exe")){for(var r=0;r<a.programs.length;++r)if(a.programs[r]===e)return a.programs.splice(r,1),!0}else if(Object(P.f)(e)){for(r=0;r<a.scripts.length;++r)if(a.scripts[r].filename===e){for(var o=0;o<a.runningScripts.length;++o)if(a.runningScripts[o].filename===e)return t.scriptRef.log("Cannot delete a script that is currently running!"),!1;return a.scripts.splice(r,1),!0}}else if(e.endsWith(".lit"))for(r=0;r<a.messages.length;++r){var s=a.messages[r];if(!(s instanceof C.a)&&Object(K.isString)(s)&&s===e)return a.messages.splice(r,1),!0}else if(e.endsWith(".txt")){for(r=0;r<a.textFiles.length;++r)if(a.textFiles[r].fn===e)return a.textFiles.splice(r,1),!0}else if(e.endsWith(".cct"))for(r=0;r<a.contracts.length;++r)if(a.contracts[r].fn===e)return a.contracts.splice(r,1),!0;return!1},scriptRunning:function(e,i){if(t.checkingRam)return z("scriptRunning",g.CONSTANTS.ScriptArbScriptRamCost);n("scriptRunning",g.CONSTANTS.ScriptArbScriptRamCost);var a=Object(A.e)(i);if(null==a)throw t.scriptRef.log("scriptRunning() failed. Invalid IP or hostname passed in: "+i),Object(j.d)(t,"scriptRunning() failed. Invalid IP or hostname passed in: "+i);for(var r=0;r<a.runningScripts.length;++r)if(a.runningScripts[r].filename==e)return!0;return!1},scriptKill:function(e,i){if(t.checkingRam)return z("scriptKill",g.CONSTANTS.ScriptArbScriptRamCost);n("scriptKill",g.CONSTANTS.ScriptArbScriptRamCost);var a=Object(A.e)(i);if(null==a)throw t.scriptRef.log("scriptKill() failed. Invalid IP or hostname passed in: "+i),Object(j.d)(t,"scriptKill() failed. Invalid IP or hostname passed in: "+i);for(var r=!1,o=0;o<a.runningScripts.length;++o)a.runningScripts[o].filename==e&&(Object(B.d)(a.runningScripts[o],a.ip),r=!0);return r},getScriptName:function(){return t.checkingRam?0:t.name},getScriptRam:function(e,i=t.serverIp){if(t.checkingRam)return z("getScriptRam",g.CONSTANTS.ScriptGetScriptRamCost);n("getScriptRam",g.CONSTANTS.ScriptGetScriptRamCost);var a=Object(A.e)(i);if(null==a)throw t.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: "+i),Object(j.d)(t,"getScriptRam() failed. Invalid IP or hostname passed in: "+i);for(var r=0;r<a.scripts.length;++r)if(a.scripts[r].filename==e)return a.scripts[r].ramUsage;return 0},getHackTime:function(e,i,a){if(t.checkingRam)return z("getHackTime",g.CONSTANTS.ScriptGetHackTimeRamCost);n("getHackTime",g.CONSTANTS.ScriptGetHackTimeRamCost);var r=Object(A.e)(e);if(null==r)throw t.scriptRef.log("getHackTime() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"getHackTime() failed. Invalid IP or hostname passed in: "+e);return Object(y.d)(r,i,a)},getGrowTime:function(e,i,a){if(t.checkingRam)return z("getGrowTime",g.CONSTANTS.ScriptGetHackTimeRamCost);n("getGrowTime",g.CONSTANTS.ScriptGetHackTimeRamCost);var r=Object(A.e)(e);if(null==r)throw t.scriptRef.log("getGrowTime() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"getGrowTime() failed. Invalid IP or hostname passed in: "+e);return Object(y.a)(r,i,a)},getWeakenTime:function(e,i,a){if(t.checkingRam)return z("getWeakenTime",g.CONSTANTS.ScriptGetHackTimeRamCost);n("getWeakenTime",g.CONSTANTS.ScriptGetHackTimeRamCost);var r=Object(A.e)(e);if(null==r)throw t.scriptRef.log("getWeakenTime() failed. Invalid IP or hostname passed in: "+e),Object(j.d)(t,"getWeakenTime() failed. Invalid IP or hostname passed in: "+e);return Object(y.f)(r,i,a)},getScriptIncome:function(e,a){if(t.checkingRam)return z("getScriptIncome",g.CONSTANTS.ScriptGetScriptRamCost);if(n("getScriptIncome",g.CONSTANTS.ScriptGetScriptRamCost),0===arguments.length){var r=[];return r.push(Object(i.c)()),r.push(S.a.scriptProdSinceLastAug/(S.a.playtimeSinceLastAug/1e3)),r}var o=Object(A.e)(a);if(null==o)throw t.scriptRef.log("getScriptIncome() failed. Invalid IP or hostnamed passed in: "+a),Object(j.d)(t,"getScriptIncome() failed. Invalid IP or hostnamed passed in: "+a);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(P.d)(e,s,o);return null==c?(t.scriptRef.log("getScriptIncome() failed. No such script "+e+" on "+o.hostname+" with args: "+Object(U.arrayToString)(s)),-1):c.onlineMoneyMade/c.onlineRunningTime},getScriptExpGain:function(e,i){if(t.checkingRam)return z("getScriptExpGain",g.CONSTANTS.ScriptGetScriptRamCost);if(n("getScriptExpGain",g.CONSTANTS.ScriptGetScriptRamCost),0===arguments.length){for(var a=0,r=0;r<B.h.length;++r)a+=B.h[r].scriptRef.onlineExpGained/B.h[r].scriptRef.onlineRunningTime;return a}var o=Object(A.e)(i);if(null==o)throw t.scriptRef.log("getScriptExpGain() failed. Invalid IP or hostnamed passed in: "+i),Object(j.d)(t,"getScriptExpGain() failed. Invalid IP or hostnamed passed in: "+i);var s=[];for(r=2;r<arguments.length;++r)s.push(arguments[r]);var l=Object(P.d)(e,s,o);return null==l?(t.scriptRef.log("getScriptExpGain() failed. No such script "+e+" on "+o.hostname+" with args: "+Object(U.arrayToString)(s)),-1):l.onlineExpGained/l.onlineRunningTime},getTimeSinceLastAug:function(){return t.checkingRam?z("getTimeSinceLastAug",g.CONSTANTS.ScriptGetHackTimeRamCost):(n("getTimeSinceLastAug",g.CONSTANTS.ScriptGetHackTimeRamCost),S.a.playtimeSinceLastAug)},prompt:function(e){if(t.checkingRam)return 0;if(q.yesNoBoxOpen)return t.scriptRef.log("ERROR: confirm() failed because a pop-up dialog box is already open"),!1;Object(K.isString)(e)||(e=String(e));var n=Object(q.yesNoBoxGetYesButton)(),i=Object(q.yesNoBoxGetNoButton)();return n.innerHTML="Yes",i.innerHTML="No",new Promise(function(t,a){n.addEventListener("click",()=>{Object(q.yesNoBoxClose)(),t(!0)}),i.addEventListener("click",()=>{Object(q.yesNoBoxClose)(),t(!1)}),Object(q.yesNoBoxCreate)(e)})},wget:async function(n,i,a=t.serverIp){if(t.checkingRam)return 0;if(!Object(P.f)(i)&&!i.endsWith(".txt"))return workerSript.log(`ERROR: wget() failed because of an invalid target file: ${i}. Target file must be a script or text file`),Promise.resolve(!1);var r=X(a,"wget");return new Promise(function(o,s){e.get(n,function(e){let n;return(n=Object(P.f)(i)?r.writeToScriptFile(i,e):r.writeToTextFile(i,e)).success?n.overwritten?(t.log(`wget() successfully retrieved content and overwrote ${i} on ${a}`),o(!0)):(t.log(`wget successfully retrieved content to new file ${i} on ${a}`),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?z("getFavorToDonate",g.CONSTANTS.ScriptGetFavorToDonate):(n("getFavorToDonate",g.CONSTANTS.ScriptGetFavorToDonate),Math.floor(g.CONSTANTS.BaseFavorToDonate*l.BitNodeMultipliers.RepToDonateToFaction))},universityCourse:function(e,i){var a=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==S.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("universityCourse",a);if(n("universityCourse",a),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!T.c){if(S.a.isWorking){var r=S.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.universityCourse&&t.scriptRef.log(r)}var o,s,l;switch(e.toLowerCase()){case O.Locations.AevumSummitUniversity.toLowerCase():if(S.a.city!=O.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"),!1;S.a.location=O.Locations.AevumSummitUniversity,o=4,s=3;break;case O.Locations.Sector12RothmanUniversity.toLowerCase():if(S.a.city!=O.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"),!1;S.a.location=O.Locations.Sector12RothmanUniversity,o=3,s=2;break;case O.Locations.VolhavenZBInstituteOfTechnology.toLowerCase():if(S.a.city!=O.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"),!1;S.a.location=O.Locations.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.scriptRef.log("Invalid university name: "+e+". universityCourse() failed"),!1}switch(i.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: "+i+". universityCourse() failed"),!1}return S.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,i){var a=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==S.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("gymWorkout",a);if(n("gymWorkout",a),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!T.c){if(S.a.isWorking){var r=S.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log(r)}var o,s;switch(e.toLowerCase()){case O.Locations.AevumCrushFitnessGym.toLowerCase():if(S.a.city!=O.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"),!1;S.a.location=O.Locations.AevumCrushFitnessGym,o=3,s=2;break;case O.Locations.AevumSnapFitnessGym.toLowerCase():if(S.a.city!=O.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"),!1;S.a.location=O.Locations.AevumSnapFitnessGym,o=10,s=5;break;case O.Locations.Sector12IronGym.toLowerCase():if(S.a.city!=O.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"),!1;S.a.location=O.Locations.Sector12IronGym,o=1,s=1;break;case O.Locations.Sector12PowerhouseGym.toLowerCase():if(S.a.city!=O.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"),!1;S.a.location=O.Locations.Sector12PowerhouseGym,o=20,s=10;break;case O.Locations.VolhavenMilleniumFitnessGym.toLowerCase():if(S.a.city!=O.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"),!1;S.a.location=O.Locations.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.scriptRef.log("Invalid gym name: "+e+". gymWorkout() failed"),!1}switch(i.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():S.a.startClass(o,s,g.CONSTANTS.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():S.a.startClass(o,s,g.CONSTANTS.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():S.a.startClass(o,s,g.CONSTANTS.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():S.a.startClass(o,s,g.CONSTANTS.ClassGymAgility);break;default:return t.scriptRef.log("Invalid stat: "+i+". gymWorkout() failed"),!1}return null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log("Started training "+i+" at "+e),!0}t.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.")},travelToCity(e){var i=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("travelToCity",i);if(n("travelToCity",i),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");switch(e){case O.Locations.Aevum:case O.Locations.Chongqing:case O.Locations.Sector12:case O.Locations.NewTokyo:case O.Locations.Ishima:case O.Locations.Volhaven:if(S.a.money.lt(g.CONSTANTS.TravelCost))throw t.scriptRef.log("ERROR: not enough money to travel with travelToCity()."),Object(j.d)(t,"ERROR: not enough money to travel with travelToCity().");return S.a.loseMoney(g.CONSTANTS.TravelCost),S.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!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("purchaseTor",e);if(n("purchaseTor",e),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null!=x.a["Darkweb Server"])return t.scriptRef.log("You already have a TOR router! purchaseTor() failed"),!1;if(S.a.money.lt(g.CONSTANTS.TorRouterCost))return t.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"),!1;S.a.loseMoney(g.CONSTANTS.TorRouterCost);var i=new A.d({ip:Object(H.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(A.a)(i),x.a.addIp("Darkweb Server",i.ip);const a=document.getElementById("location-purchase-tor");return a.setAttribute("class","a-link-button-bought"),a.innerHTML="TOR Router - Purchased",S.a.getHomeComputer().serversOnNetwork.push(i.ip),i.serversOnNetwork.push(S.a.getHomeComputer().ip),S.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 i=g.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("purchaseProgram",i);if(n("purchaseProgram",i),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null==x.a["Darkweb Server"])return t.scriptRef.log("ERROR: You do not have the TOR router. purchaseProgram() failed."),!1;e=e.toLowerCase();let a=null;for(const t in _.DarkWebItems){const n=_.DarkWebItems[t];n.program.toLowerCase()==e&&(a=n)}return null==a?(t.scriptRef.log("ERROR: Invalid program name passed into purchaseProgram()."),!1):S.a.money.lt(a.price)?(t.scriptRef.log("Not enough money to purchase "+a.program),!1):S.a.hasProgram(a.program)?(t.scriptRef.log("You already have the "+a.program+" program"),!0):(S.a.loseMoney(a.price),S.a.getHomeComputer().programs.push(a.program),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseProgram&&t.scriptRef.log("You have purchased the "+a.program+" program. The new program can be found on your home computer."),!0)},getStats:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getStats",e);if(n("getStats",e),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{hacking:S.a.hacking_skill,strength:S.a.strength,defense:S.a.defense,dexterity:S.a.dexterity,agility:S.a.agility,charisma:S.a.charisma,intelligence:S.a.intelligence}},getCharacterInformation:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getCharacterInformation",e);if(n("getCharacterInformation",e),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{bitnode:S.a.bitNodeN,city:S.a.city,factions:S.a.factions.slice(),jobs:Object.keys(S.a.jobs),jobTitles:Object.values(S.a.jobs),mult:{agility:S.a.agility_mult,agilityExp:S.a.agility_exp_mult,companyRep:S.a.company_rep_mult,crimeMoney:S.a.crime_money_mult,crimeSuccess:S.a.crime_success_mult,defense:S.a.defense_mult,defenseExp:S.a.defense_exp_mult,dexterity:S.a.dexterity_mult,dexterityExp:S.a.dexterity_exp_mult,factionRep:S.a.faction_rep_mult,hacking:S.a.hacking_mult,hackingExp:S.a.hacking_exp_mult,strength:S.a.strength_mult,strengthExp:S.a.strength_exp_mult,workMoney:S.a.work_money_mult},timeWorked:S.a.timeWorked,tor:x.a.hasOwnProperty("Darkweb Server"),workHackExpGain:S.a.workHackExpGained,workStrExpGain:S.a.workStrExpGained,workDefExpGain:S.a.workDefExpGained,workDexExpGain:S.a.workDexExpGained,workAgiExpGain:S.a.workAgiExpGained,workChaExpGain:S.a.workChaExpGained,workRepGain:S.a.workRepGained,workMoneyGain:S.a.workMoneyGained}},isBusy:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("isBusy",e);if(n("isBusy",e),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return S.a.isWorking},stopAction:function(){var e=g.CONSTANTS.ScriptSingularityFn1RamCost/2;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("stopAction",e);if(n("stopAction",e),4!=S.a.bitNodeN&&!(V&&te>=1))throw Object(j.d)(t,"Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(S.a.isWorking){var i=S.a.singularityStopWork();return null==t.disableLogs.ALL&&null==t.disableLogs.stopAction&&t.scriptRef.log(i),!0}return!1},upgradeHomeRam:function(){var e=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("upgradeHomeRam",e);if(n("upgradeHomeRam",e),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");const i=S.a.getHomeComputer();if(i.maxRam>=g.CONSTANTS.HomeComputerMaxRam)return t.log("ERROR: upgradeHomeRam() failed because your home computer is at max RAM"),!1;const a=S.a.getUpgradeHomeRamCost();return S.a.money.lt(a)?(t.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"),!1):(i.maxRam*=2,S.a.loseMoney(a),S.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 "+i.maxRam+"GB of RAM."),!0)},getUpgradeHomeRamCost:function(){var e=g.CONSTANTS.ScriptSingularityFn2RamCost/2;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getUpgradeHomeRamCost",e);if(n("getUpgradeHomeRamCost",e),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return S.a.getUpgradeHomeRamCost()},workForCompany:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("workForCompany",i);if(n("workForCompany",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(null==e&&(e=S.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(S.a.jobs).includes(e))return t.scriptRef.log(`ERROR: workForCompany() failed because you do not have a job at ${e}`),!1;if(T.c)return t.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission."),!1;const a=S.a.jobs[e],r=d.CompanyPositions[a];if(""===a||!(r instanceof h.CompanyPosition))return t.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"),!1;if(S.a.isWorking){var o=S.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.scriptRef.log(o)}return r.isPartTimeJob()?S.a.startWorkPartTime(e):S.a.startWork(e),null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.log(`Began working at ${S.a.companyName} as a ${a}`),!0},applyToCompany:function(e,i){var a,r=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(r*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("applyToCompany",r);if(n("applyToCompany",r),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.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(S.a.location=e,i.toLowerCase()){case"software":a=S.a.applyForSoftwareJob(!0);break;case"software consultant":a=S.a.applyForSoftwareConsultantJob(!0);break;case"it":a=S.a.applyForItJob(!0);break;case"security engineer":a=S.a.applyForSecurityEngineerJob(!0);break;case"network engineer":a=S.a.applyForNetworkEngineerJob(!0);break;case"business":a=S.a.applyForBusinessJob(!0);break;case"business consultant":a=S.a.applyForBusinessConsultantJob(!0);break;case"security":a=S.a.applyForSecurityJob(!0);break;case"agent":a=S.a.applyForAgentJob(!0);break;case"employee":a=S.a.applyForEmployeeJob(!0);break;case"part-time employee":a=S.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":a=S.a.applyForWaiterJob(!0);break;case"part-time waiter":a=S.a.applyForPartTimeWaiterJob(!0);break;default:return t.scriptRef.log("ERROR: Invalid job passed into applyToCompany: "+i+". applyToCompany() failed"),!1}return Object(K.isString)(a)?(t.scriptRef.log(a),!1):(a?null==t.disableLogs.ALL&&null==t.disableLogs.applyToCompany&&t.log(`You were offered a new job at ${e} as a ${S.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 ${i} field.`),a)},getCompanyRep:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost/2;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getCompanyRep",i);if(n("getCompanyRep",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var a=m.Companies[e];return null!=a&&a instanceof p.Company?a.playerReputation:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyRep(): "+e),-1)},getCompanyFavor:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getCompanyFavor",i);if(n("getCompanyFavor",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var a=m.Companies[e];return null!=a&&a instanceof p.Company?a.favor:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavor(): "+e),-1)},getCompanyFavorGain:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getCompanyFavorGain",i);if(n("getCompanyFavorGain",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run getCompanyFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var a=m.Companies[e];return null!=a&&a instanceof p.Company?a.getFavorGain()[0]:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavorGain(): "+e),-1)},checkFactionInvitations:function(){var e=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("checkFactionInvitations",e);if(n("checkFactionInvitations",e),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return S.a.factionInvitations.slice()},joinFaction:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("joinFaction",i);if(n("joinFaction",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(E.factionExists)(e))return t.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."),!1;if(!S.a.factionInvitations.includes(e))return t.scriptRef.log("ERROR: Cannot join "+e+" Faction because you have not been invited. joinFaction() failed"),!1;var a=E.Factions[e];Object(v.c)(a);for(var r=0;r<S.a.factionInvitations.length;++r)(S.a.factionInvitations[r]==e||E.Factions[S.a.factionInvitations[r]].isBanned)&&(S.a.factionInvitations.splice(r,1),r--);return S.a.gainIntelligenceExp(g.CONSTANTS.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.joinFaction&&t.scriptRef.log("Joined the "+e+" faction."),!0},workForFaction:function(e,i){var a=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("workForFaction",a);if(n("workForFaction",a),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(S.a.inGang()&&void 0!==f.a[e])t.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");else{if(!T.c){if(!Object(E.factionExists)(e))return t.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."),!1;if(!S.a.factions.includes(e))return t.scriptRef.log("ERROR: workForFaction() failed because you are not a member of "+e),!1;if(S.a.isWorking){var r=S.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForFaction&&t.scriptRef.log(r)}var o=E.Factions[e];switch(i.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","BitRunners","The Black Hand","NiteSec","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Netburners","Tian Di Hui","CyberSec"].includes(o.name)?(S.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)?(S.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)?(S.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(): "+i)}return!0}t.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.")}},getFactionRep:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getFactionRep",i);if(n("getFactionRep",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(E.factionExists)(e)?E.Factions[e].playerReputation:(t.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."),-1)},getFactionFavor:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getFactionFavor",i);if(n("getFactionFavor",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(E.factionExists)(e)?E.Factions[e].favor:(t.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist."),-1)},getFactionFavorGain:function(e){var i=g.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getFactionFavorGain",i);if(n("getFactionFavorGain",i),4!=S.a.bitNodeN&&!(V&&te>=2))throw Object(j.d)(t,"Cannot run getFactionFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(E.factionExists)(e)?E.Factions[e].getFavorGain()[0]:(t.scriptRef.log("ERROR: Faction specified in getFactionFavorGain() does not exist."),-1)},donateToFaction:function(e,i){var a=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(a*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("donateToFaction",a);if(n("donateToFaction",a),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run donateToFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(E.factionExists)(e))return t.log(`ERROR: Faction specified in donateToFaction() does not exist: ${e}`),!1;if("number"!=typeof i||i<=0)return t.log(`ERROR: Invalid donation amount specified in donateToFaction(): ${i}. Must be numeric and positive`),!1;if(S.a.money.lt(i))return t.log(`ERROR: You do not have enough money to donate $${i} to ${e}`),!1;var r=Math.round(g.CONSTANTS.BaseFavorToDonate*l.BitNodeMultipliers.RepToDonateToFaction);if(E.Factions[e].favor<r)return t.log(`ERROR: You do not have enough favor to donate to this faction. Have ${E.Factions[e].favor}, need ${r}`),!1;var o=i/g.CONSTANTS.DonateMoneyToRepDivisor*S.a.faction_rep_mult;return E.Factions[e].playerReputation+=o,S.a.loseMoney(i),t.shouldLog("donateToFaction")&&t.log(`$${i} donated to ${e} for ${o} reputation`),!0},createProgram:function(e){var i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("createProgram",i);if(n("createProgram",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(T.c)return void t.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");if(S.a.isWorking){var a=S.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.createProgram&&t.scriptRef.log(a)}e=e.toLowerCase();let r=null;for(const t in M.Programs)M.Programs[t].name.toLowerCase()==e&&(r=M.Programs[t]);return null==r?(t.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: "+e),!1):S.a.hasProgram(r.name)?(t.scriptRef.log("ERROR: createProgram() failed because you already have the "+r.name+" program"),!1):r.create.req(S.a)?(S.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 i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("commitCrime",i);if(n("commitCrime",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(T.c)return void t.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");if(S.a.isWorking){var a=S.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log(a)}switch(S.a.city){case O.Locations.Aevum:S.a.location=O.Locations.AevumSlums;break;case O.Locations.Chongqing:S.a.location=O.Locations.ChongqingSlums;break;case O.Locations.Sector12:S.a.location=O.Locations.Sector12Slums;break;case O.Locations.NewTokyo:S.a.location=O.Locations.NewTokyoSlums;break;case O.Locations.Ishima:S.a.location=O.Locations.IshimaSlums;break;case O.Locations.Volhaven:S.a.location=O.Locations.VolhavenSlums;break;default:console.log("Invalid Player.city value")}const r=Object(c.b)(e.toLowerCase());if(null==r)throw Object(j.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(S.a,1,{workerscript:t})},getCrimeChance:function(e){var i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getCrimeChance",i);if(n("getCrimeChance",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");const a=Object(c.b)(e.toLowerCase());if(null==a)throw Object(j.d)(t,"Invalid crime passed into getCrimeChance(): "+a);return a.successRate()},getOwnedAugmentations:function(e=!1){var i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getOwnedAugmentations",i);if(n("getOwnedAugmentations",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");for(var a=[],r=0;r<S.a.augmentations.length;++r)a.push(S.a.augmentations[r].name);if(e)for(r=0;r<S.a.queuedAugmentations.length;++r)a.push(S.a.queuedAugmentations[r].name);return a},getOwnedSourceFiles:function(){let e=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(e*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getOwnedSourceFiles",e);if(n("getOwnedSourceFiles",e),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run getOwnedSourceFiles(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");let i=[];for(let e=0;e<S.a.sourceFiles.length;++e)i.push({n:S.a.sourceFiles[e].n,lvl:S.a.sourceFiles[e].lvl});return i},getAugmentationsFromFaction:function(e){var i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getAugmentationsFromFaction",i);if(n("getAugmentationsFromFaction",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(E.factionExists)(e))return t.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): "+e),[];for(var a=E.Factions[e],r=[],o=0;o<a.augmentations.length;++o)r.push(a.augmentations[o]);return r},getAugmentationPrereq:function(e){var i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getAugmentationPrereq",i);if(n("getAugmentationPrereq",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.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 i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("getAugmentationCost",i);if(n("getAugmentationCost",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.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 a=r.Augmentations[e];return[a.baseRepRequirement,a.baseCost]},purchaseAugmentation:function(e,i){var o=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(o*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("purchaseAugmentation",o);if(n("purchaseAugmentation",o),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");var l=E.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(i))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because the faction "+e+" does not contain the "+i+" augmentation"),!1;var c=r.Augmentations[i];if(null==c||!(c instanceof a.Augmentation))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid augmentation name: "+i),!1;var u=!1;if(c.name===s.AugmentationNames.NeuroFluxGovernor&&(u=!0),!u){for(var p=0;p<S.a.queuedAugmentations.length;++p)if(S.a.queuedAugmentations[p].name===c.name)return t.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have "+i),!1;for(p=0;p<S.a.augmentations.length;++p)if(S.a.augmentations[p].name===c.name)return t.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have "+i),!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(v.e)(c,l,!0);return t.scriptRef.log(m),!(!Object(K.isString)(m)||!m.startsWith("You purchased"))&&(S.a.gainIntelligenceExp(g.CONSTANTS.IntelligenceSingFnBaseExpGain),!0)},installAugmentations:function(e){var i=g.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==S.a.bitNodeN&&(i*=g.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return z("installAugmentations",i);if(n("installAugmentations",i),4!=S.a.bitNodeN&&!(V&&te>=3))throw Object(j.d)(t,"Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return 0===S.a.queuedAugmentations.length?(t.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"),!1):(S.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 z("getMemberNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getMemberNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4),D.a(t,"getMemberNames");try{const e=[];for(const t of S.a.gang.members)e.push(t.name);return e}catch(e){throw Object(j.d)(t,D.b("getMemberNames",e))}},getGangInformation:function(){if(t.checkingRam)return z("getGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"getGangInformation");try{return{faction:S.a.gang.facName,isHacking:S.a.gang.isHackingGang,moneyGainRate:S.a.gang.moneyGainRate,power:S.a.gang.getPower(),respect:S.a.gang.respect,respectGainRate:S.a.gang.respectGainRate,territory:S.a.gang.getTerritory(),territoryClashChance:S.a.gang.territoryClashChance,territoryWarfareEngaged:S.a.gang.territoryWarfareEngaged,wantedLevel:S.a.gang.wanted,wantedLevelGainRate:S.a.gang.wantedGainRate}}catch(e){throw Object(j.d)(t,D.b("getGangInformation",e))}},getOtherGangInformation:function(){if(t.checkingRam)return z("getOtherGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getOtherGangInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"getOtherGangInformation");try{return Object.assign(f.a)}catch(e){throw Object(j.d)(t,D.b("getOtherGangInformation",e))}},getMemberInformation:function(e){if(t.checkingRam)return z("getMemberInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getMemberInformation",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"getMemberInformation");try{for(const t of S.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(j.d)(t,D.b("getMemberInformation",e))}},canRecruitMember:function(){if(t.checkingRam)return z("canRecruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("canRecruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/4),D.a(t,"canRecruitMember");try{return S.a.gang.canRecruitMember()}catch(e){throw Object(j.d)(t,D.b("canRecruitMember",e))}},recruitMember:function(e){if(t.checkingRam)return z("recruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("recruitMember",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"recruitMember");try{const n=S.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(j.d)(t,D.b("recruitMember",e))}},getTaskNames:function(){if(t.checkingRam)return z("getTaskNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getTaskNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4),D.a(t,"getTaskNames");try{const e=S.a.gang.getAllTaskNames();return e.unshift("Unassigned"),e}catch(e){throw Object(j.d)(t,D.b("getTaskNames",e))}},setMemberTask:function(e,i){if(t.checkingRam)return z("setMemberTask",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("setMemberTask",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"setMemberTask");try{for(const n of S.a.gang.members)if(n.name===e){const a=n.assignToTask(i);return t.shouldLog("setMemberTask")&&(a?t.log(`Successfully assigned Gang Member ${e} to ${i} task`):t.log(`Failed to assign Gang Member ${e} to ${i} task. ${e} is now Unassigned`)),a}return t.log(`Invalid argument passed to gang.setMemberTask(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(j.d)(t,D.b("setMemberTask",e))}},getEquipmentNames:function(){if(t.checkingRam)return z("getEquipmentNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getEquipmentNames",g.CONSTANTS.ScriptGangApiBaseRamCost/4),D.a(t,"getEquipmentNames");try{return S.a.gang.getAllUpgradeNames()}catch(e){throw Object(j.d)(t,D.b("getEquipmentNames",e))}},getEquipmentCost:function(e){if(t.checkingRam)return z("getEquipmentCost",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getEquipmentCost",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"getEquipmentCost");try{return S.a.gang.getUpgradeCost(e)}catch(e){throw Object(j.d)(t,D.b("getEquipmentCost",e))}},getEquipmentType:function(e){if(t.checkingRam)return z("getEquipmentType",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getEquipmentType",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"getEquipmentType");try{return S.a.gang.getUpgradeType(e)}catch(e){throw Object(j.d)(t,D.b("getEquipmentType",e))}},purchaseEquipment:function(e,i){if(t.checkingRam)return z("purchaseEquipment",g.CONSTANTS.ScriptGangApiBaseRamCost);n("purchaseEquipment",g.CONSTANTS.ScriptGangApiBaseRamCost),D.a(t,"purchaseEquipment");try{for(const n of S.a.gang.members)if(n.name===e){const a=n.buyUpgrade(i,S.a,S.a.gang);return t.shouldLog("purchaseEquipment")&&(a?t.log(`Purchased ${i} for Gang member ${e}`):t.log(`Failed to purchase ${i} for Gang member ${e}`)),a}return t.log(`Invalid argument passed to gang.purchaseEquipment(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(j.d)(t,D.b("purchaseEquipment",e))}},ascendMember:function(e){if(t.checkingRam)return z("ascendMember",g.CONSTANTS.ScriptGangApiBaseRamCost);n("ascendMember",g.CONSTANTS.ScriptGangApiBaseRamCost),D.a(t,"ascendMember");try{for(const n of S.a.gang.members)if(n.name===e)return S.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(j.d)(t,D.b("ascendMember",e))}},setTerritoryWarfare:function(e){if(t.checkingRam)return z("setTerritoryWarfare",g.CONSTANTS.ScriptGangApiBaseRamCost/2);n("setTerritoryWarfare",g.CONSTANTS.ScriptGangApiBaseRamCost/2),D.a(t,"setTerritoryWarfare");try{e?(S.a.gang.territoryWarfareEngaged=!0,t.shouldLog("setTerritoryWarfare")&&t.log("Engaging in Gang Territory Warfare")):(S.a.gang.territoryWarfareEngaged=!1,t.shouldLog("setTerritoryWarfare")&&t.log("Disengaging in Gang Territory Warfare"))}catch(e){throw Object(j.d)(t,D.b("setTerritoryWarfare",e))}},getChanceToWinClash:function(e){if(t.checkingRam)return z("getChanceToWinClash",g.CONSTANTS.ScriptGangApiBaseRamCost);n("getChanceToWinClash",g.CONSTANTS.ScriptGangApiBaseRamCost),D.a(t,"getChanceToWinClash");try{if(null==f.a[e])return t.log(`Invalid gang specified in gang.getChanceToWinClash() : ${e}`),0;const n=f.a[S.a.gang.facName].power;return n/(f.a[e].power+n)}catch(e){throw Object(j.d)(t,D.b("getChanceToWinClash",e))}},getBonusTime:function(){if(t.checkingRam)return 0;D.a(t,"getBonusTime");try{return Math.round(S.a.gang.storedCycles/5)}catch(e){throw Object(j.d)(t,D.b("getBonusTime",e))}}},bladeburner:{getContractNames:function(){if(t.checkingRam)return z("getContractNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getContractNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.getContractNamesNetscriptFn();throw Object(j.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 z("getOperationNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getOperationNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.getOperationNamesNetscriptFn();throw Object(j.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 z("getBlackOpNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getBlackOpNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.getBlackOpNamesNetscriptFn();throw Object(j.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")},getGeneralActionNames:function(){if(t.checkingRam)return z("getGeneralActionNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getGeneralActionNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.getGeneralActionNamesNetscriptFn();throw Object(j.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 z("getSkillNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getSkillNames",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.getSkillNamesNetscriptFn();throw Object(j.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="",i=""){if(t.checkingRam)return z("startAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("startAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.startActionNetscriptFn(e,i,t)}catch(e){throw Object(j.d)(t,"Bladeburner.startAction() failed with exception: "+e)}throw Object(j.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 z("stopBladeburnerAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2);if(n("stopBladeburnerAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.resetAction();throw Object(j.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 z("getCurrentAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/4);if(n("getCurrentAction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost/4),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.getTypeAndNameFromActionId(S.a.bladeburner.action);throw Object(j.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="",i=""){if(t.checkingRam)return z("getActionTime",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionTime",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getActionTimeNetscriptFn(e,i,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getActionTime() failed with exception: "+e)}throw Object(j.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="",i=""){if(t.checkingRam)return z("getActionEstimatedSuccessChance",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionEstimatedSuccessChance",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(e,i,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getActionEstimatedSuccessChance() failed with exception: "+e)}throw Object(j.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="",i="",a){if(t.checkingRam)return z("getActionRepGain",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionRepGain",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(L.a)(t,"getActionRepGain");try{var r=Object(L.b)("getActionAutolevel",e,i);const n=S.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(r),-1;const s=S.a.bladeburner.getActionObject(n);return null==s?(t.log(r),-1):(o=null==a||isNaN(a)?Math.pow(s.rewardFac,s.level-1):Math.pow(s.rewardFac,a-1),s.rankGain*o*l.BitNodeMultipliers.BladeburnerRank);var o}catch(e){throw Object(j.d)(t,Object(L.c)("getActionAutolevel",e))}},getActionCountRemaining:function(e="",i=""){if(t.checkingRam)return z("getActionCountRemaining",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionCountRemaining",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getActionCountRemainingNetscriptFn(e,i,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getActionCountRemaining() failed with exception: "+e)}throw Object(j.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="",i=""){if(t.checkingRam)return z("getActionMaxLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionMaxLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(L.a)(t,"getActionMaxLevel");try{var a=Object(L.b)("getActionMaxLevel",e,i);const n=S.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(a),-1;const r=S.a.bladeburner.getActionObject(n);return null==r?(t.log(a),-1):r.maxLevel}catch(e){throw Object(j.d)(t,Object(L.c)("getActionMaxLevel",e))}},getActionCurrentLevel:function(e="",i=""){if(t.checkingRam)return z("getActionCurrentLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionCurrentLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(L.a)(t,"getActionCurrentLevel");try{var a=Object(L.b)("getActionCurrentLevel",e,i);const n=S.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(a),-1;const r=S.a.bladeburner.getActionObject(n);return null==r?(t.log(a),-1):r.level}catch(e){throw Object(j.d)(t,Object(L.c)("getActionCurrentLevel",e))}},getActionAutolevel:function(e="",i=""){if(t.checkingRam)return z("getActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(L.a)(t,"getActionAutolevel");try{var a=Object(L.b)("getActionAutolevel",e,i);const n=S.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(a),!1;const r=S.a.bladeburner.getActionObject(n);return null==r?(t.log(a),!1):r.autoLevel}catch(e){throw Object(j.d)(t,Object(L.c)("getActionAutolevel",e))}},setActionAutolevel:function(e="",i="",a=!0){if(t.checkingRam)return z("setActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("setActionAutolevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(L.a)(t,"setActionAutolevel");try{var r=Object(L.b)("setActionAutolevel",e,i);const n=S.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return void t.log(r);const o=S.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);o.autoLevel=a}catch(e){throw Object(j.d)(t,Object(L.c)("setActionAutolevel",e))}},setActionLevel:function(e="",i="",a=1){if(t.checkingRam)return z("setActionLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("setActionLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(L.a)(t,"setActionLevel");try{var r=Object(L.b)("setActionLevel",e,i);const n=S.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return void t.log(r);const o=S.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);if(a>o.maxLevel)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level exceeds max level for given action.`);if(a<1)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level is below 1.`);o.level=a}catch(e){throw Object(j.d)(t,Object(L.c)("setActionLevel",e))}},getRank:function(){if(t.checkingRam)return z("getRank",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getRank",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.rank;throw Object(j.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 z("getSkillPoints",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillPoints",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.skillPoints;throw Object(j.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 z("getSkillLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillLevel",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getSkillLevel() failed with exception: "+e)}throw Object(j.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 z("getSkillUpgradeCost",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillUpgradeCost",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getSkillUpgradeCost() failed with exception: "+e)}throw Object(j.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 z("upgradeSkill",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("upgradeSkill",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw Object(j.d)(t,"Bladeburner.upgradeSkill() failed with exception: "+e)}throw Object(j.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="",i=""){if(t.checkingRam)return z("getTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getTeamSizeNetscriptFn(e,i,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getTeamSize() failed with exception: "+e)}throw Object(j.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="",i="",a){if(t.checkingRam)return z("setTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("setTeamSize",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.setTeamSizeNetscriptFn(e,i,a,t)}catch(e){throw Object(j.d)(t,"Bladeburner.setTeamSize() failed with exception: "+e)}throw Object(j.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 z("getCityEstimatedPopulation",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedPopulation",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getCityEstimatedPopulationNetscriptFn(e,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getCityEstimatedPopulation() failed with exception: "+e)}throw Object(j.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 z("getCityEstimatedCommunities",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedCommunities",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getCityEstimatedCommunitiesNetscriptFn(e,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getCityEstimatedCommunities() failed with exception: "+e)}throw Object(j.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 z("getCityChaos",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityChaos",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.getCityChaosNetscriptFn(e,t)}catch(e){throw Object(j.d)(t,"Bladeburner.getCityChaos() failed with exception: "+e)}throw Object(j.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 z("getCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.city}catch(e){throw Object(j.d)(t,"Bladeburner.getCity() failed with exception: "+e)}throw Object(j.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 z("switchCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("switchCity",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))try{return S.a.bladeburner.switchCityNetscriptFn(e,t)}catch(e){throw Object(j.d)(t,"Bladeburner.switchCity() failed with exception: "+e)}throw Object(j.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 z("getStamina",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getStamina",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return[S.a.bladeburner.stamina,S.a.bladeburner.maxStamina];throw Object(j.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 z("joinBladeburnerFaction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerFaction",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),S.a.bladeburner instanceof u.a&&(7===S.a.bitNodeN||Q))return S.a.bladeburner.joinBladeburnerFactionNetscriptFn(t);throw Object(j.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 z("joinBladeburnerDivision",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerDivision",g.CONSTANTS.ScriptBladeburnerApiBaseRamCost),7===S.a.bitNodeN||Q)return S.a.bladeburner instanceof u.a||(S.a.strength>=100&&S.a.defense>=100&&S.a.dexterity>=100&&S.a.agility>=100?(S.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(j.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===S.a.bitNodeN||Q)return Math.round(S.a.bladeburner.storedCycles/5);throw Object(j.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,i,a=t.serverIp){if(t.checkingRam)return z("attempt",g.CONSTANTS.ScriptCodingContractBaseRamCost);n("attempt",g.CONSTANTS.ScriptCodingContractBaseRamCost);const r=ae(i,a);if(null==r)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${i} on server ${a}`),!1;e=String(e);const o=X(a,"codingcontract.attempt()");if(r.isSolution(e)){const e=S.a.gainCodingContractReward(r.reward,r.getDifficulty());return t.log(`Successfully completed Coding Contract ${i}. Reward: ${e}`),o.removeContract(i),!0}return++r.tries,r.tries>=r.getMaxNumTries()?(t.log(`Coding Contract ${i} failed. Contract is now self-destructing`),o.removeContract(i)):t.log(`Coding Contract ${i} failed. ${r.getMaxNumTries()-r.tries} attempts remaining`),!1},getContractType:function(e,i=t.serverIp){if(t.checkingRam)return z("getContractType",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getContractType",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);let a=ae(e,i);return null==a?(t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${i}`),null):a.getType()},getData:function(e,i=t.serverIp){if(t.checkingRam)return z("getData",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getData",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);let a=ae(e,i);if(null==a)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${i}`),null;let r=a.getData();return r.constructor===Array?r.slice():r},getDescription:function(e,i=t.serverIp){if(t.checkingRam)return z("getDescription",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getDescription",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);var a=ae(e,i);return null==a?(t.log(`ERROR: codingcontract.getDescription() failed because it could find the specified contract ${e} on server ${i}`),""):a.getDescription()},getNumTriesRemaining:function(e,i=t.serverIp){if(t.checkingRam)return z("getNumTriesRemaining",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getNumTriesRemaining",g.CONSTANTS.ScriptCodingContractBaseRamCost/2);var a=ae(e,i);return null==a?(t.log(`ERROR: codingcontract.getNumTriesRemaining() failed because it could find the specified contract ${e} on server ${i}`),-1):a.getMaxNumTries()-a.tries}}}}}).call(this,n(72))},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(a,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?a(e.value):new n(function(t){t(e.value)}).then(o,s)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const a=n(15),r=n(2),o=n(40),s=n(23),l=n(250);class c{constructor(e,t,n,i,a,r){this.name=e,this.desc=t,this.generate=n,this.solver=i,this.difficulty=a,this.numTries=r}}t.CodingContractType=c,t.CodingContractTypes={};for(const e of l.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new c(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var u;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"}(u=t.CodingContractResult||(t.CodingContractResult={}));class p{constructor(e="",n="Find Largest Prime Factor",i=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=i}static fromJSON(e){return a.Generic_fromJSON(p,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 i(this,void 0,void 0,function*(){return new Promise((e,n)=>{const i=t.CodingContractTypes[this.type],a=`coding-contract-prompt-popup-${this.fn}`,l=r.createElement("p",{innerText:["You are attempting to solve a Coding Contract. You have",`${this.getMaxNumTries()-this.tries} tries remaining,`,"after which the contract will self-destruct.\n\n",`${i.desc(this.data)}`].join(" ")});let c,p;c=r.createElement("input",{onkeydown:e=>{13===e.keyCode&&""!==c.value&&(e.preventDefault(),p.click())},placeholder:"Enter Solution here"}),p=r.createElement("a",{class:"a-link-button",clickListener:()=>{const t=c.value;this.isSolution(t)?e(u.Success):e(u.Failure),s.removeElementById(a)},innerText:"Solve"});const m=r.createElement("a",{class:"a-link-button",clickListener:()=>{e(u.Cancelled),s.removeElementById(a)},innerText:"Cancel"}),h=r.createElement("br");o.createPopup(a,[l,h,h,c,p,m]),c.focus()})})}toJSON(){return a.Generic_toJSON("CodingContract",this)}}t.CodingContract=p,a.Reviver.constructors.CodingContract=p},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),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 i=n(8);let a={},r={};function o(e){a=""===e?{}:JSON.parse(e)}function s(e){r=""===e?{}:JSON.parse(e)}function l(){for(var e in a)a.hasOwnProperty(e)&&Object(i.post)("alias "+e+"="+a[e]);for(var e in r)r.hasOwnProperty(e)&&Object(i.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 a&&delete a[e];r[e]=t}(n[1],n[2]):function(e,t){e in r&&delete r[e];a[e]=t}(n[1],n[2]),!0)}function u(e){return r.hasOwnProperty(e)?r[e]:null}function p(e){return a.hasOwnProperty(e)?(delete a[e],!0):!!r.hasOwnProperty(e)&&(delete r[e],!0)}function m(e){var t,n=e.split(" ");if(n.length>0){if(null!=(r=(t=n[0],a.hasOwnProperty(t)?a[t]:null)))n[0]=r;else null!=(r=u(n[0]))&&(n[0]=r);for(var i=0;i<n.length;++i){var r;null!=(r=u(n[i]))&&(n[i]=r)}}return n.join(" ")}},,function(e,t,n){"use strict";n.d(t,"b",function(){return O}),n.d(t,"c",function(){return C}),n.d(t,"a",function(){return T}),n.d(t,"d",function(){return R}),n.d(t,"e",function(){return w});var i=n(14),a=n(89),r=n(6),o=n(10),s=n(1),l=n(11),c=n(62),u=n(16),p=(n(133),n(106),n(64)),m=n(0),h=n(45),d=n(19),g=n(13),_=n(4),y=n(9),f=n(160),b=n(27),E=n(2),v=(n(15),n(3)),k=n(22);function O(e){d.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,m.a.factionInvitations.push(e.name),g.routing.isOn(g.Page.Factions)&&l.Engine.loadFactionsContent()):Object(f.a)(e)}function C(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 T(e){var t=u.Factions[e];if(null==t)throw new Error("Invalid factionName passed into displayFactionContent: "+e);var n=t.getInfo();Object(b.removeChildrenFromElement)(l.Engine.Display.factionContent);var i=[];i.push(Object(E.createElement)("h1",{innerText:e})),i.push(Object(E.createElement)("pre",{innerHTML:"<i>"+n.infoText+"</i>"})),i.push(Object(E.createElement)("p",{innerText:"---------------"}));var a=t.getFavorGain();2!=a.length&&(a=0),a=a[0],i.push(Object(E.createElement)("p",{innerText:"Reputation: "+Object(v.formatNumber)(t.playerReputation,4),tooltip:"You will earn "+Object(v.formatNumber)(a,0)+" faction favor upon resetting after installing an Augmentation"})),i.push(Object(E.createElement)("p",{innerText:"---------------"})),i.push(Object(E.createElement)("p",{innerText:"Faction Favor: "+Object(v.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"})),i.push(Object(E.createElement)("p",{innerText:"---------------"})),i.push(Object(E.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!"})),i.push(Object(E.createElement)("br"));var r=Object(E.createElement)("div",{id:"faction-hack-mission-div",class:"faction-work-div"}),c=Object(E.createElement)("div",{class:"faction-work-div-wrapper"});r.appendChild(c),c.appendChild(Object(E.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(E.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+)"})),i.push(r);var h=Object(E.createElement)("div",{id:"faction-hack-div",class:"faction-work-div"}),d=Object(E.createElement)("div",{class:"faction-work-div-wrapper"});h.appendChild(d),d.appendChild(Object(E.createElement)("a",{class:"a-link-button",innerText:"Hacking Contracts",clickListener:()=>(m.a.startFactionHackWork(t),!1)})),d.appendChild(Object(E.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."})),i.push(h);var g=Object(E.createElement)("div",{id:"faction-fieldwork-div",class:"faction-work-div"}),f=Object(E.createElement)("div",{class:"faction-work-div-wrapper"});g.appendChild(f),f.appendChild(Object(E.createElement)("a",{class:"a-link-button",innerText:"Field Work",clickListener:()=>(m.a.startFactionFieldWork(t),!1)})),f.appendChild(Object(E.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."})),i.push(g);var O=Object(E.createElement)("div",{id:"faction-securitywork-div",class:"faction-work-div"}),C=Object(E.createElement)("div",{class:"faction-work-div-wrapper"});O.appendChild(C),C.appendChild(Object(E.createElement)("a",{class:"a-link-button",innerText:"Security Work",clickListener:()=>(m.a.startFactionSecurityWork(t),!1)})),C.appendChild(Object(E.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."})),i.push(O);var M=Object(E.createElement)("div",{id:"faction-donate-div",class:"faction-work-div"}),P=Object(E.createElement)("div",{class:"faction-work-div-wrapper"});M.appendChild(P);var A=Object(E.createElement)("p",{innerText:"This donation will result in 0.000 reputation gain"}),w=Object(E.createElement)("input",{placeholder:"Donation amount",inputListener:()=>{let e=0;if(""!==w.value&&(e=parseFloat(w.value)),isNaN(e))A.innerText="Invalid donate amount entered!";else{var t=e/s.CONSTANTS.DonateMoneyToRepDivisor*m.a.faction_rep_mult;A.innerText="This donation will result in "+Object(v.formatNumber)(t,3)+" reputation gain"}}});if(P.appendChild(Object(E.createElement)("a",{class:"a-link-button",innerText:"Donate Money",clickListener:()=>{var n=parseFloat(w.value);if(isNaN(n)||n<0)Object(y.dialogBoxCreate)("Invalid amount entered!");else if(m.a.money.lt(n))Object(y.dialogBoxCreate)("You cannot afford to donate this much money!");else{m.a.loseMoney(n);var i=n/s.CONSTANTS.DonateMoneyToRepDivisor*m.a.faction_rep_mult;t.playerReputation+=i,Object(y.dialogBoxCreate)("You just donated "+_.numeralWrapper.format(n,"$0.000a")+" to "+t.name+" to gain "+Object(v.formatNumber)(i,3)+" reputation"),T(e)}}})),P.appendChild(w),P.appendChild(A),i.push(M),i.push(Object(E.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>"})),i.push(Object(E.createElement)("a",{class:"a-link-button",innerText:"Purchase Augmentations",clickListener:()=>(l.Engine.hideAllContent(),l.Engine.Display.factionAugmentationsContent.style.display="block",S(e),!1)})),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(!t.isMember)throw new Error("Not a member of this faction, cannot display faction information");M.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",g.style.display=n.offerFieldWork?"inline":"none",O.style.display=n.offerSecurityWork?"inline":"none";for(N=0;N<i.length;++N)l.Engine.Display.factionContent.appendChild(i[N])}else{r.style.display="none",h.style.display="none",g.style.display="none",O.style.display="none",M.style.display="none";var x=Object(E.createElement)("div",{id:"faction-gang-div",class:"faction-work-div",display:"inline"}),R=Object(E.createElement)("div",{class:"faction-work-div-wrapper"});x.appendChild(R),R.appendChild(Object(E.createElement)("a",{class:"a-link-button",innerText:"Manage Gang",clickListener:()=>{if(m.a.inGang())l.Engine.loadGangContent();else{let i=!1;"NiteSec"!==e&&"The Black Hand"!==e||(i=!0);var t=Object(k.yesNoBoxGetYesButton)(),n=Object(k.yesNoBoxGetNoButton)();t.innerHTML="Create Gang",n.innerHTML="Cancel",t.addEventListener("click",()=>{m.a.startGang(e,i),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),l.Engine.loadGangContent(),Object(k.yesNoBoxClose)()}),n.addEventListener("click",()=>{Object(k.yesNoBoxClose)()});let a="";a=i?"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(k.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>"+a+"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.")}}})),R.appendChild(Object(E.createElement)("p",{innerText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation."})),i.splice(7,1,x),m.a.inGang()&&m.a.gang.facName!=e&&(x.style.display="none");for(var N=0;N<i.length;++N)l.Engine.Display.factionContent.appendChild(i[N])}}function S(e){var t=u.Factions[e];if(null==t)throw new Error("Could not find faction "+e+" in displayFactionAugmentations");Object(b.removeChildrenFromElement)(l.Engine.Display.factionAugmentationsContent);var n=[];n.push(Object(E.createElement)("a",{innerText:"Back",class:"a-link-button",clickListener:()=>(l.Engine.loadFactionContent(),T(e),!1)})),n.push(Object(E.createElement)("h1",{innerText:"Faction Augmentations"})),n.push(Object(E.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(E.createElement)("br")),n.push(Object(E.createElement)("br"));var a=Object(E.createElement)("ul");const r=Object(E.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=i.Augmentations[e],a=i.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseCost-a.baseCost}),Object(b.removeChildrenFromElement)(a),M(a,e,t)}}),o=Object(E.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=i.Augmentations[e],a=i.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-a.baseRepRequirement}),Object(b.removeChildrenFromElement)(a),M(a,e,t)}}),s=Object(E.createElement)("a",{innerText:"Sort by Default Order",class:"a-link-button",clickListener:()=>{d.Settings.PurchaseAugmentationsOrder=h.PurchaseAugmentationsOrderSetting.Default,Object(b.removeChildrenFromElement)(a),M(a,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(a);for(var c=0;c<n.length;++c)l.Engine.Display.factionAugmentationsContent.appendChild(n[c])}function M(e,t,n){const a=n.getInfo();for(var o=0;o<t.length;++o)!function(){var s=i.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(E.createElement)("li"),p=Object(E.createElement)("span",{display:"inline-block",margin:"4px",padding:"4px"}),h=Object(E.createElement)("div",{tooltip:s.info}),g=Object(E.createElement)("a",{innerText:s.name,display:"inline",clickListener:()=>(d.Settings.SuppressBuyAugmentationConfirmation?w(s,n):P(s,n),!1)});s.name==r.AugmentationNames.NeuroFluxGovernor&&(g.innerText+=" - Level "+x());var y=Object(E.createElement)("p",{display:"inline"}),f=s.baseRepRequirement*a.augmentationRepRequirementMult;A(s)?s.name!=r.AugmentationNames.NeuroFluxGovernor&&(s.owned||l)?(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="ALREADY OWNED"):n.playerReputation>=f?(g.setAttribute("class","a-link-button"),y.innerHTML="UNLOCKED - "+_.numeralWrapper.format(s.baseCost*a.augmentationPriceMult,"$0.000a")):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+Object(v.formatNumber)(f,1)+" faction reputation) - "+_.numeralWrapper.format(s.baseCost*a.augmentationPriceMult,"$0.000a"),y.style.color="red"):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+s.prereqs.join(",")+" as prerequisite(s))",y.style.color="red"),h.appendChild(g),p.appendChild(h),p.appendChild(y),u.appendChild(p),e.appendChild(u)}()}function P(e,t){const n=t.getInfo();var i=Object(k.yesNoBoxGetYesButton)(),a=Object(k.yesNoBoxGetNoButton)();i.innerHTML="Purchase",a.innerHTML="Cancel",i.addEventListener("click",function(){w(e,t)}),a.addEventListener("click",function(){Object(k.yesNoBoxClose)()}),Object(k.yesNoBoxCreate)("<h2>"+e.name+"</h2><br>"+e.info+"<br><br><br>Would you like to purchase the "+e.name+" Augmentation for $"+Object(v.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function A(e){var t=!0;if(e.prereqs&&e.prereqs.length>0)for(var n=0;n<e.prereqs.length;++n){var a=i.Augmentations[e.prereqs[n]];if(null!=a){if(!1===a.owned){t=!1;for(var r=0;r<m.a.queuedAugmentations.length;++r)if(m.a.queuedAugmentations[r].name===a.name){t=!0;break}}}else console.log("ERROR: Invalid prereq Augmentation: "+e.prereqs[n])}return t}function w(e,t,n=!1){const l=t.getInfo();if(A(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(y.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(y.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 a.PlayerOwnedAugmentation(e.name);if(e.name==r.AugmentationNames.NeuroFluxGovernor&&(c.level=x()),m.a.queuedAugmentations.push(c),m.a.loseMoney(e.baseCost*l.augmentationPriceMult),e.name==r.AugmentationNames.NeuroFluxGovernor){var u=x();--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 i.Augmentations)i.Augmentations.hasOwnProperty(g)&&(i.Augmentations[g].baseCost*=s.CONSTANTS.MultipleAugMultiplier);if(n)return"You purchased "+e.name;d.Settings.SuppressBuyAugmentationConfirmation||Object(y.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."),S(t.name)}else Object(y.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(y.dialogBoxCreate)(_)}Object(k.yesNoBoxClose)()}function x(){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 R(e){var t=e/600*m.a.faction_rep_mult;for(var n in u.Factions)if(u.Factions.hasOwnProperty(n)){var i=u.Factions[n];i.isMember&&(i.playerReputation+=t*o.BitNodeMultipliers.FactionPassiveRepGain)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return u}),n.d(t,"d",function(){return l}),n.d(t,"c",function(){return p});var i=n(54),a=n(9),r={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},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!=r[e])switch(e){case"ENABLE_BASH_HOTKEYS":case"ENABLE_TIMESTAMPS":case"WRAP_INPUT":t="1"===(t=t.toLowerCase())||"true"===t||"y"===t,r[e]=t;break;case"MAIN_MENU_STYLE":t=n(t);s.includes(t)?r[e]=t:Object(a.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)?r[e]=t:Object(a.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 r)if(r.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===r[t]?"1":!1===r[t]?"0":'"'+String(r[t])+'"'}\n\n`}return e}function p(e){let t=JSON.parse(e);for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);m(),h()}function m(){null!=r.THEME_HIGHLIGHT_COLOR&&null!=r.THEME_FONT_COLOR&&null!=r.THEME_BACKGROUND_COLOR&&null!=r.THEME_PROMPT_COLOR?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.THEME_HIGHLIGHT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.THEME_FONT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.THEME_BACKGROUND_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.THEME_PROMPT_COLOR)&&(document.body.style.setProperty("--my-highlight-color",r.THEME_HIGHLIGHT_COLOR),document.body.style.setProperty("--my-font-color",r.THEME_FONT_COLOR),document.body.style.setProperty("--my-background-color",r.THEME_BACKGROUND_COLOR),document.body.style.setProperty("--my-prompt-color",r.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"),a=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"),a.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic")}function s(e){t.classList.add(e),n.classList.add(e),i.classList.add(e),a.classList.add(e)}if("default"===r.MAIN_MENU_STYLE)o(),e.classList.remove("classic"),e.classList.remove("compact"),s("mainmenu-accordion-header");else if("classic"===r.MAIN_MENU_STYLE)o(),e.classList.remove("compact"),e.classList.add("classic"),s("mainmenu-accordion-header-classic");else{if("compact"!==r.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(),a.click(),a.click()}},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 i=n(10),a=n(0);n(12);function r(e){const t=(100-e.hackDifficulty)/100,n=1.75*a.a.hacking_skill+.2*a.a.intelligence,i=(n-e.requiredHackingSkill)/n*t*a.a.hacking_chance_mult;return i>1?1:i<0?0:i}function o(e){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);var t=3;return(t+=e.baseDifficulty*a.a.hacking_exp_mult*.3)*i.BitNodeMultipliers.HackExpGain}function s(e){const t=(100-e.hackDifficulty)/100*((a.a.hacking_skill-(e.requiredHackingSkill-1))/a.a.hacking_skill)*a.a.hacking_money_mult/240;return t<0?0:t>1?1:t*i.BitNodeMultipliers.ScriptHackMoney}function l(e,t,n){const i=e.requiredHackingSkill*e.hackDifficulty;null==t&&(t=a.a.hacking_skill),null==n&&(n=a.a.intelligence);var r=2.5*i+500;return 5*(r/=t+50+.1*n)/a.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){!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",i={5:n,6:n+" const class extends export import super"},a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA--zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",r="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍--_",o=new RegExp("["+a+"]"),s=new RegExp("["+a+r+"]");a=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,i=0;i<t.length;i+=2){if((n+=t[i])>e)return!1;if((n+=t[i+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},y={};function f(e,t){return void 0===t&&(t={}),t.keyword=e,y[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:f("break"),_case:f("case",g),_catch:f("catch"),_continue:f("continue"),_debugger:f("debugger"),_default:f("default",g),_do:f("do",{isLoop:!0,beforeExpr:!0}),_else:f("else",g),_finally:f("finally"),_for:f("for",{isLoop:!0}),_function:f("function",_),_if:f("if"),_return:f("return",g),_switch:f("switch"),_throw:f("throw",g),_try:f("try"),_var:f("var"),_const:f("const"),_while:f("while",{isLoop:!0}),_with:f("with"),_new:f("new",{beforeExpr:!0,startsExpr:!0}),_this:f("this",_),_super:f("super",_),_class:f("class"),_extends:f("extends",g),_export:f("export"),_import:f("import"),_null:f("null",_),_true:f("true",_),_false:f("false",_),_in:f("in",{beforeExpr:!0,binop:7}),_instanceof:f("instanceof",{beforeExpr:!0,binop:7}),_typeof:f("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:f("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:f("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,v=new RegExp(E.source,"g");function k(e){return 10===e||13===e||8232===e||8233===e}var O=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,T=Object.prototype,S=T.hasOwnProperty,M=T.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,i=0;;){v.lastIndex=i;var a=v.exec(e);if(!(a&&a.index<t))return new w(n,t-i);++n,i=a.index+a[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 i=t.onToken;t.onToken=function(e){return i.push(e)}}return A(t.onComment)&&(t.onComment=function(e,t){return function(n,i,a,r,o,s){var l={type:n?"Block":"Line",value:i,start:a,end:r};e.locations&&(l.loc=new x(this,o,s)),e.ranges&&(l.range=[a,r]),t.push(l)}}(t,t.onComment)),t}var L={};function D(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}var B=function(e,n,a){this.options=e=I(e),this.sourceFile=e.sourceFile,this.keywords=D(i[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),a?(this.pos=a,this.lineStart=this.input.lastIndexOf("\n",a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E).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 j=B.prototype,W=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;j.strictDirective=function(e){for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=W.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},j.eat=function(e){return this.type===e&&(this.next(),!0)},j.isContextual=function(e){return this.type===b.name&&this.value===e},j.eatContextual=function(e){return this.value===e&&this.eat(b.name)},j.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},j.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},j.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},j.semicolon=function(){this.eat(b.semi)||this.insertSemicolon()||this.unexpected()},j.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},j.expect=function(e){this.eat(e)||this.unexpected()},j.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var F=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};j.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")}},j.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")},j.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")},j.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;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(p(n,!0)){for(var i=t+1;m(this.input.charCodeAt(i),!0);)++i;var a=this.input.slice(t,i);if(!this.isKeyword(a))return!0}return!1},U.isAsyncFunction=function(){if(this.type!==b.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length;return!(E.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 i,a=this.type,r=this.startNode();switch(this.isLet()&&(a=b._var,i="let"),a){case b._break:case b._continue:return this.parseBreakContinueStatement(r,a.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 i=i||this.value,e||"var"==i||this.unexpected(),this.parseVarStatement(r,i);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'")),a===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 a===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 i=0;i<this.labels.length;++i){var a=this.labels[i];if(null==e.label||a.name===e.label.name){if(null!=a.kind&&(n||"loop"===a.kind))break;if(e.label&&n)break}}return i===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(),i=t?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),!(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==i&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var a=new F,r=this.parseExpression(!0,a);return this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(r),this.checkLVal(r),this.checkPatternErrors(a,!0),this.parseForIn(e,r)):(this.checkExpressionErrors(a,!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 i=this.type===b._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?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(),E.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 i=0;i<this.labels.length;++i)this.labels[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var a=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=a}return this.labels.push({name:t,kind:a,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 i=this.startNode();if(this.parseVarId(i,n),this.eat(b.eq)?i.init=this.parseMaybeAssign(t):"const"!==n||this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==i.id.type||t&&(this.type===b._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"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,i){this.initFunction(e),this.options.ecmaVersion>=6&&!i&&(e.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&&(e.id="nullableID"===t&&this.type!=b.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var a=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=a,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(),i=!1;for(n.body=[],this.expect(b.braceL);!this.eat(b.braceR);)if(!this.eat(b.semi)){var a=this.startNode(),r=this.eat(b.star),o=!1,s=this.type===b.name&&"static"===this.value;this.parsePropertyName(a),a.static=s&&this.type!==b.parenL,a.static&&(r&&this.unexpected(),r=this.eat(b.star),this.parsePropertyName(a)),this.options.ecmaVersion>=8&&!r&&!a.computed&&"Identifier"===a.key.type&&"async"===a.key.name&&this.type!==b.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(a)),a.kind="method";var l=!1;if(!a.computed){var c=a.key;r||o||"Identifier"!==c.type||this.type===b.parenL||"get"!==c.name&&"set"!==c.name||(l=!0,a.kind=c.name,c=this.parsePropertyName(a)),!a.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(i&&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"),a.kind="constructor",i=!0)}if(this.parseClassMethod(n,a,r,o),l){var u="get"===a.kind?0:1;if(a.value.params.length!==u){var p=a.value.start;"get"===a.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"setter should have exactly one param")}else"set"===a.kind&&"RestElement"===a.value.params[0].type&&this.raiseRecoverable(a.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,i){t.value=this.parseMethod(n,i),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 i=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,n)}else if(this.type===b._class){var a=this.startNode();e.declaration=this.parseClass(a,"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 i=0;i<t.properties.length;++i)this.checkPatternExport(e,t.properties[i].value);else if("ArrayPattern"==n)for(var a=0;a<t.elements.length;++a){var r=t.elements[a];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 i=this.startNode();i.local=this.parseIdent(!0),i.exported=this.eatContextual("as")?this.parseIdent(!0):i.local,this.checkExport(e,i.exported.name,i.exported.start),t.push(this.finishNode(i,"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 i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLVal(i.local,"let"),e.push(this.finishNode(i,"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 a=this.startNode();a.imported=this.parseIdent(!0),this.eatContextual("as")?a.local=this.parseIdent():(a.local=a.imported,this.isKeyword(a.local.name)&&this.unexpected(a.local.start),this.reservedWordsStrict.test(a.local.name)&&this.raiseRecoverable(a.local.start,"The keyword '"+a.local.name+"' is reserved")),this.checkLVal(a.local,"let"),e.push(this.finishNode(a,"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 i=e.properties[n];"init"!==i.kind&&this.raise(i.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(i.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 i=e[n-1];if(i&&"RestElement"==i.type)--n;else if(i&&"SpreadElement"==i.type){i.type="RestElement";var a=i.argument;this.toAssignable(a,t),"Identifier"!==a.type&&"MemberExpression"!==a.type&&"ArrayPattern"!==a.type&&this.unexpected(a.start),--n}t&&i&&"RestElement"===i.type&&"Identifier"!==i.argument.type&&this.unexpected(i.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,i){for(var a=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(b.comma),t&&this.type===b.comma)a.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===b.ellipsis){var o=this.parseRest(i);this.parseBindingListItem(o),a.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),a.push(s)}return a},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 i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"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 i=0;i<e.properties.length;i++)this.checkLVal(e.properties[i].value,t,n);break;case"ArrayPattern":for(var a=0;a<e.elements.length;a++){var r=e.elements[a];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,i=e.key;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===a&&(t.proto&&this.raiseRecoverable(i.start,"Redefinition of __proto__ property"),t.proto=!0);else{var r=t[n="$"+n];r?("init"===a?this.strict&&r.init||r.get||r.set:r.init||r[a])&&this.raiseRecoverable(i.start,"Redefinition of property"):r=t[n]={init:!1,get:!1,set:!1},r[a]=!0}}},$.parseExpression=function(e,t){var n=this.start,i=this.startLoc,a=this.parseMaybeAssign(e,t);if(this.type===b.comma){var r=this.startNodeAt(n,i);for(r.expressions=[a];this.eat(b.comma);)r.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(r,"SequenceExpression")}return a},$.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var i=!1,a=-1,r=-1;t?(a=t.parenthesizedAssign,r=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new F,i=!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),i||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 i&&this.checkExpressionErrors(t,!0),a>-1&&(t.parenthesizedAssign=a),r>-1&&(t.trailingComma=r),l},$.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,a=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return a;if(this.eat(b.question)){var r=this.startNodeAt(n,i);return r.test=a,r.consequent=this.parseMaybeAssign(),this.expect(b.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return a},$.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,a=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?a:a.start==n&&"ArrowFunctionExpression"===a.type?a:this.parseExprOp(a,n,i,-1,e)},$.parseExprOp=function(e,t,n,i,a){var r=this.type.binop;if(null!=r&&(!a||this.type!==b._in)&&r>i){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,a),p=this.buildBinary(t,n,e,u,s,o);return this.parseExprOp(p,t,n,i,a)}return e},$.buildBinary=function(e,t,n,i,a,r){var o=this.startNodeAt(e,t);return o.left=n,o.operator=a,o.right=i,this.finishNode(o,r?"LogicalExpression":"BinaryExpression")},$.parseMaybeUnary=function(e,t){var n,i=this.start,a=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(i,a);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(i,a,n,this.parseMaybeUnary(null,!1),"**",!1):n},$.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,i=this.parseExprAtom(e),a="ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||a)return i;var r=this.parseSubscripts(i,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,i){for(var a,r=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((a=this.eat(b.bracketL))||this.eat(b.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=a?this.parseExpression():this.parseIdent(!0),o.computed=!!a,a&&this.expect(b.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!i&&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 i=this.type===b._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,i);case b.name:var a=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(a,r),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(a,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(a,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,i=this.startLoc,a=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),a&&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,i,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 y=this.startNodeAt(n,i);return y.expression=t,this.finishNode(y,"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,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,i,!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(),i=!0,a={};for(n.properties=[],this.next();!this.eat(b.braceR);){if(i)i=!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,a),n.properties.push(this.finishNode(c,"Property"))}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},$.parsePropertyValue=function(e,t,n,i,a,r,o){if((n||i)&&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,i);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||i||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(a,r,e.key):this.type===b.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(a,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(),i=this.inGenerator,a=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=i,this.inAsync=a,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(n,"FunctionExpression")},$.parseArrowExpression=function(e,t,n){var i=this.inGenerator,a=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=i,this.inAsync=a,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},$.parseFunctionBody=function(e,t){var n=t&&this.type!==b.braceL,i=this.strict,a=!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);i&&!r||(a=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=[],a&&(this.strict=!0),this.checkParams(e,!i&&!a&&!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=i},$.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={},i=0;i<e.params.length;i++)this.checkLVal(e.params[i],"var",t?null:n)},$.parseExprList=function(e,t,n,i){for(var a=[],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(i),i&&this.type===b.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):o=this.parseMaybeAssign(!1,i),a.push(o)}return a},$.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 i=new SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i},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 i=0;i<t.length;i++){var a=t[i];for(var r in a)P(a,r)&&(e[r]=a[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,i){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=i),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,i){return Z.call(this,e,t,n,i)};var ee=function(e,t,n,i,a){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!a},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?E.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 ie=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])},ae=B.prototype,re="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);function oe(e,t,n,i){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&i.raise(n,"Error parsing regular expression: "+e.message),e}}ae.next=function(){this.options.onToken&&this.options.onToken(new ie(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ae.getToken=function(){return this.next(),new ie(this)},"undefined"!=typeof Symbol&&(ae[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===b.eof,value:t}}}}),ae.curContext=function(){return this.context[this.context.length-1]},ae.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())},ae.readToken=function(e){return p(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ae.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},ae.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(v.lastIndex=n;(e=v.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,i),n,this.pos,t,this.curPosition())},ae.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.pos,i=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())},ae.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&&O.test(String.fromCharCode(e))))break e;++this.pos}}},ae.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)},ae.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))},ae.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)},ae.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=42===e?b.star:b.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,i=b.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(b.assign,n+1):this.finishOp(i,n)},ae.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)},ae.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(b.assign,2):this.finishOp(b.bitwiseXOR,1)},ae.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)&&E.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)},ae.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))},ae.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)},ae.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)+"'")},ae.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)))}ae.readRegexp=function(){for(var e,t,n=this,i=this.pos;;){n.pos>=n.input.length&&n.raise(i,"Unterminated regular expression");var a=n.input.charAt(n.pos);if(E.test(a)&&n.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===a)t=!0;else if("]"===a&&t)t=!1;else if("/"===a&&!t)break;e="\\"===a}++n.pos}var r=this.input.slice(i,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(i,"Invalid regular expression flag"),o.indexOf("u")>=0&&(se?l="u":(s=(s=s.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,a){return(t=Number("0x"+t))>1114111&&n.raise(i+a+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,i,this),u=oe(r,o)),this.finishToken(b.regexp,{pattern:r,flags:o,value:u})},ae.readInt=function(e,t){for(var n=this.pos,i=0,a=0,r=null==t?1/0:t;a<r;++a){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,i=i*e+o}return this.pos===n||null!=t&&this.pos-n!==t?null:i},ae.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)},ae.readNumber=function(e){var t=this.pos,n=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var a=this.input.charCodeAt(this.pos);46!==a||i||(++this.pos,this.readInt(10),n=!0,a=this.input.charCodeAt(this.pos)),69!==a&&101!==a||i||(43!==(a=this.input.charCodeAt(++this.pos))&&45!==a||++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):i&&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)},ae.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},ae.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(k(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(b.string,t)},ae.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}},ae.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],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=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(i)}return String.fromCharCode(t)}},ae.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},ae.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if(m(a,i))this.pos+=a<=65535?1:2;else{if(92!==a)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,i)||this.raise(r,"Invalid Unicode escape"),e+=le(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},ae.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=y[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 i=new B(n,e,t);return i.nextToken(),i.parseExpression()},e.tokenizer=function(e,t){return new B(t,e)},e.addLooseExports=function(t,n,i){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=i},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=y,e.TokContext=ee,e.tokContexts=te,e.isIdentifierChar=m,e.isIdentifierStart=p,e.Token=ie,e.isNewLine=k,e.lineBreak=E,e.lineBreakG=v,e.nonASCIIwhitespace=O,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2);t.createOptionElement=function(e,t=""){let n=t;return""===n&&(n=e),i.createElement("option",{text:e,value:n})}},function(e,t,n){"use strict";n.d(t,"a",function(){return p}),n.d(t,"b",function(){return m}),n.d(t,"c",function(){return h}),n.d(t,"e",function(){return d}),n.d(t,"d",function(){return g});var i=n(10),a=n(1),r=n(0),o=n(12),s=n(9),l=n(70),c=n(22),u=n(134);function p(e){const t=Math.round(e);return isNaN(t)||!Object(u.isPowerOfTwo)(t)?1/0:t>h()?1/0:t*a.CONSTANTS.BaseCostFor1GBOfRamServer*i.BitNodeMultipliers.PurchasedServerCost}function m(){return Math.round(a.CONSTANTS.PurchasedServerLimit*i.BitNodeMultipliers.PurchasedServerLimit)}function h(){return Math.round(a.CONSTANTS.PurchasedServerMaxRam*i.BitNodeMultipliers.PurchasedServerMaxRam)}function d(e){const t=p(e);if(r.a.money.lt(t))Object(s.dialogBoxCreate)("You don't have enough money to purchase this server!");else if(r.a.purchasedServers.length>=m())Object(s.dialogBoxCreate)("You have reached the maximum limit of "+m()+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");else{var n=Object(c.yesNoTxtInpBoxGetInput)();if(""!=n){var i=new o.d({ip:Object(l.a)(),hostname:n,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:e});Object(o.a)(i),r.a.purchasedServers.push(i.ip);var a=r.a.getHomeComputer();a.serversOnNetwork.push(i.ip),i.serversOnNetwork.push(a.ip),r.a.loseMoney(t),Object(s.dialogBoxCreate)("Server successfully purchased with hostname "+n)}else Object(s.dialogBoxCreate)("You must enter a hostname for your new server!")}}function g(e){if(r.a.money.lt(e))return void Object(s.dialogBoxCreate)("You do not have enough money to purchase additional RAM for your home computer");const t=r.a.getHomeComputer();t.maxRam>=a.CONSTANTS.HomeComputerMaxRam?Object(s.dialogBoxCreate)("You cannot upgrade your home computer RAM because it is at its maximum possible value"):(t.maxRam*=2,r.a.loseMoney(e),Object(s.dialogBoxCreate)("Purchased additional RAM for home computer! It now has "+t.maxRam+"GB of RAM."))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return C}),n.d(t,"d",function(){return T}),n.d(t,"c",function(){return S}),n.d(t,"b",function(){return M});var i=n(159),a=n(158),r=n(11),o=n(62),s=n(16),l=n(51),c=n(4),u=n(9),p=n(15),m=n(29),h=n(86),d=n(2),g=n(40),_=n(13),y=n(3),f=n(42),b=n(17),E=n(27),v=n(66),k=n(23);e(document).keydown(function(e){if(_.routing.isOn(_.Page.Gang)&&e.altKey){if(null!=j.gangMemberFilter&&j.gangMemberFilter===document.activeElement)return;e.keyCode===m.KEY[1]?"block"===j.gangTerritorySubpage.style.display&&j.managementButton.click():e.keyCode===m.KEY[2]&&"block"===j.gangManagementSubpage.style.display&&j.territoryButton.click()}}),e(document).mousedown(function(t){j.gangMemberUpgradeBoxOpened&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(v.removeElement)(j.gangMemberUpgradeBox),j.gangMemberUpgradeBox=null,j.gangMemberUpgradeBoxContent=null,j.gangMemberUpgradeBoxOpened=!1,j.gangMemberUpgradeBoxElements=null)});let O=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"],C={"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 T(){C={"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){C=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,i=!1,a={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=i,this.baseRespect=a.baseRespect?a.baseRespect:0,this.baseWanted=a.baseWanted?a.baseWanted:0,this.baseMoney=a.baseMoney?a.baseMoney:0,this.hackWeight=a.hackWeight?a.hackWeight:0,this.strWeight=a.strWeight?a.strWeight:0,this.defWeight=a.defWeight?a.defWeight:0,this.dexWeight=a.dexWeight?a.dexWeight:0,this.agiWeight=a.agiWeight?a.agiWeight:0,this.chaWeight=a.chaWeight?a.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=a.difficulty?a.difficulty:1,this.territory=a.territory?a.territory:{money:1,respect:1,wanted:1}}M.prototype.getPower=function(){return C[this.facName].power},M.prototype.getTerritory=function(){return C[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 i=Math.min(this.storedCycles,5*n);try{this.processGains(i,t),this.processExperienceGains(i),this.processTerritoryAndPowerGains(i),this.storedCycles-=i}catch(e){Object(f.exceptionAlert)(`Exception caught when processing Gang: ${e}`)}},M.prototype.processGains=function(e=1,t){for(var n=0,i=0,a=0,r=0;r<this.members.length;++r)i+=this.members[r].calculateRespectGain(this),a+=this.members[r].calculateWantedLevelGain(this),n+=this.members[r].calculateMoneyGain(this);if(this.respectGainRate=i,this.wantedGainRate=a,this.moneyGainRate=n,"number"==typeof i){const n=i*e;this.respect+=n;const a=s.Factions[this.facName];if(a instanceof o.Faction){var l=1+a.favor/100;a.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 a)if(1===this.wanted&&a<0);else{const t=this.wanted;let n=t+a*e;a<=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):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 C)if(C.hasOwnProperty(e))if(e==t)C[e].power+=this.calculatePower();else{const t=Math.random();if(t<.5){const t=.005*C[e].power;C[e].power+=Math.min(.85,t)}else{const n=.75*t*C[e].territory;C[e].power+=n}}this.territoryWarfareEngaged?this.territoryClashChance=1:this.territoryClashChance>0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));for(var n=0;n<O.length;++n){const e=O.filter(e=>e!==n),i=Object(b.getRandomInt)(0,e.length-1),a=O[n],r=e[i];if(!(a!==t&&r!==t||Math.random()<this.territoryClashChance))continue;const o=C[a].power,s=o/(o+C[r].power);if(Math.random()<s){if(C[r].territory<=0)return;C[a].territory+=1e-4,C[r].territory-=1e-4,a===t?this.clash(!0):r===t?this.clash(!1):C[r].power*=1/1.01}else{if(C[a].territory<=0)return;C[a].territory-=1e-4,C[r].territory+=1e-4,a===t?this.clash(!1):r===t?this.clash(!0):C[a].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||(C[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 i=t/Math.pow(n.def,.6);Math.random()<i&&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(f.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(B)},M.prototype.getUpgradeCost=function(e){return null==B[e]?1/0:B[e].getCost(this)},M.prototype.getUpgradeType=function(e){const t=B[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 i=Math.pow(100*C[e.facName].territory,t.territory.respect)/100;if(isNaN(i)||i<=0)return 0;var a=e.getWantedPenalty();return 11*t.baseRespect*n*i*a},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 i=Math.pow(100*C[e.facName].territory,t.territory.wanted)/100;return isNaN(i)||i<=0?0:t.baseWanted<0?.5*t.baseWanted*n*i:7*t.baseWanted/Math.pow(3*n*i,.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 i=Math.pow(100*C[e.facName].territory,t.territory.money)/100;if(isNaN(i)||i<=0)return 0;var a=e.getWantedPenalty();return 5*t.baseMoney*n*i*a},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,i=e.def,a=e.dex,r=e.agi,o=e.cha;this.hack_asc_mult+=t,this.str_asc_mult+=n,this.def_asc_mult+=i,this.dex_asc_mult+=a,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){B[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:i,dex:a,agi:r,cha:o}},P.prototype.getAscensionResults=function(){let e=1,t=1,n=1,i=1,a=1,r=1;for(let o=0;o<this.upgrades.length;++o){let s=B[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&&(i*=s.mults.dex),null!=s.mults.agi&&(a*=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,i-1),agi:.15*Math.max(0,a-1),cha:.15*Math.max(0,r-1)}},P.prototype.buyUpgrade=function(e,t,n){if("string"==typeof e&&(e=B[e]),!(e instanceof D))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)&&j.gangMemberUpgradeBoxOpened){var i=j.gangMemberUpgradeBoxFilter.value.toString();n.createGangMemberUpgradeBox(t,i)}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={};var x,R,N,I,L;function D(e="",t=0,n="w",i={}){this.name=e,this.cost=t,this.type=n,this.mults=i,this.createDescription()}i.gangMemberTasksMetadata.forEach(e=>{x=e.name,R=e.desc,N=e.isHacking,I=e.isCombat,L=e.params,w[x]=new A(x,R,N,I,L)}),D.prototype.getCost=function(e){const t=e.getDiscount();return this.cost/t},D.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>")},D.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)},D.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberUpgrade",this)},D.fromJSON=function(e){return Object(p.Generic_fromJSON)(D,e.data)},p.Reviver.constructors.GangMemberUpgrade=D;const B={};a.gangMemberUpgradesMetadata.forEach(e=>{!function(e,t,n,i){B[e]=new D(e,t,n,i)}(e.name,e.cost,e.upgType,e.mults)}),M.prototype.createGangMemberUpgradeBox=function(e,t=""){const n="gang-member-upgrade-popup-box";if(j.gangMemberUpgradeBoxOpened){if(null==j.gangMemberUpgradeBoxElements||null==j.gangMemberUpgradeBox||null==j.gangMemberUpgradeBoxContent)return void console.error("Refreshing Gang member upgrade box throws error because required elements are null");for(var i=2;i<j.gangMemberUpgradeBoxElements.length;++i)Object(v.removeElement)(j.gangMemberUpgradeBoxElements[i]);j.gangMemberUpgradeBoxElements=[j.gangMemberUpgradeBoxFilter,j.gangMemberUpgradeBoxDiscount];var a=j.gangMemberUpgradeBoxFilter.value.toString();for(i=0;i<this.members.length;++i)if(this.members[i].name.indexOf(a)>-1||this.members[i].task.indexOf(a)>-1){var r=this.members[i].createGangMemberUpgradePanel(this,e);j.gangMemberUpgradeBoxContent.appendChild(r),j.gangMemberUpgradeBoxElements.push(r)}}else{j.gangMemberUpgradeBoxFilter=Object(d.createElement)("input",{type:"text",placeholder:"Filter gang members",value:t,onkeyup:()=>{var t=j.gangMemberUpgradeBoxFilter.value.toString();this.createGangMemberUpgradeBox(e,t)}}),j.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."}),j.gangMemberUpgradeBoxElements=[j.gangMemberUpgradeBoxFilter,j.gangMemberUpgradeBoxDiscount];for(a=j.gangMemberUpgradeBoxFilter.value.toString(),i=0;i<this.members.length;++i)(this.members[i].name.indexOf(a)>-1||this.members[i].task.indexOf(a)>-1)&&j.gangMemberUpgradeBoxElements.push(this.members[i].createGangMemberUpgradePanel(this,e));j.gangMemberUpgradeBox=Object(g.createPopup)(n,j.gangMemberUpgradeBoxElements),j.gangMemberUpgradeBoxContent=document.getElementById(n+"-content"),j.gangMemberUpgradeBoxOpened=!0}},P.prototype.createGangMemberUpgradePanel=function(e,t){var n=Object(d.createElement)("div",{border:"1px solid white"}),i=Object(d.createElement)("h1",{innerText:this.name+" ("+this.task+")"});n.appendChild(i);var a=Object(d.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+this.hack+" (x"+Object(y.formatNumber)(this.hack_mult*this.hack_asc_mult,2)+")\nStr: "+this.str+" (x"+Object(y.formatNumber)(this.str_mult*this.str_asc_mult,2)+")\nDef: "+this.def+" (x"+Object(y.formatNumber)(this.def_mult*this.def_asc_mult,2)+")\nDex: "+this.dex+" (x"+Object(y.formatNumber)(this.dex_mult*this.dex_asc_mult,2)+")\nAgi: "+this.agi+" (x"+Object(y.formatNumber)(this.agi_mult*this.agi_asc_mult,2)+")\nCha: "+this.cha+" (x"+Object(y.formatNumber)(this.cha_mult*this.cha_asc_mult,2)+")\n"});const r=[];function o(e){const t=B[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(a),n.appendChild(s),n.appendChild(Object(d.createElement)("br",{}));const l=[],u=[],p=[],m=[],h=[];for(let n in B)if(B.hasOwnProperty(n)){let i=B[n];if(t.money.lt(i.getCost(e)))continue;if(this.upgrades.includes(n)||this.augmentations.includes(n))continue;switch(i.type){case"w":l.push(i);break;case"a":u.push(i);break;case"v":p.push(i);break;case"r":m.push(i);break;case"g":h.push(i);break;default:console.error(`ERROR: Invalid Gang Member Upgrade Type: ${i.type}`)}}const g=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),_=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),f=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),b=Object(d.createElement)("div",{width:"20%",display:"inline-block"}),E=Object(d.createElement)("div",{width:"20%",display:"inline-block"});g.appendChild(Object(d.createElement)("h2",{innerText:"Weapons"})),_.appendChild(Object(d.createElement)("h2",{innerText:"Armor"})),f.appendChild(Object(d.createElement)("h2",{innerText:"Vehicles"})),b.appendChild(Object(d.createElement)("h2",{innerText:"Rootkits"})),E.appendChild(Object(d.createElement)("h2",{innerText:"Augmentations"}));const v=[l,u,p,m,h],k=[g,_,f,b,E];for(let n=0;n<v.length;++n){let i=v[n],a=k[n];for(let r=0;r<i.length;++r){!function(n,i,a,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:()=>(a.buyUpgrade(n,t,e),!1)};r>=3?s.tooltipleft=n.desc:s.tooltip=n.desc,i.appendChild(Object(d.createElement)("a",s))}(i[r],a,this,n,e)}}return n.appendChild(g),n.appendChild(_),n.appendChild(f),n.appendChild(b),n.appendChild(E),n};const j={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(!j.gangContentCreated||null==j.gangContainer){j.gangContentCreated=!0,j.gangContainer=Object(d.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var t=this.facName;this.members,this.wanted,this.respect;j.gangContainer.appendChild(Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(r.Engine.loadFactionContent(),Object(l.a)(t),!1)})),j.managementButton=Object(d.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (Alt+1)",clickListener:()=>(j.gangManagementSubpage.style.display="block",j.gangTerritorySubpage.style.display="none",j.managementButton.classList.toggle("a-link-button-inactive"),j.managementButton.classList.toggle("a-link-button"),j.territoryButton.classList.toggle("a-link-button-inactive"),j.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),j.territoryButton=Object(d.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (Alt+2)",clickListener:()=>(j.gangManagementSubpage.style.display="none",j.gangTerritorySubpage.style.display="block",j.managementButton.classList.toggle("a-link-button-inactive"),j.managementButton.classList.toggle("a-link-button"),j.territoryButton.classList.toggle("a-link-button-inactive"),j.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),j.gangContainer.appendChild(j.managementButton),j.gangContainer.appendChild(j.territoryButton),j.gangManagementSubpage=Object(d.createElement)("div",{display:"block",id:"gang-management-subpage"});var n="";n=this.isHackingGang?"Ethical Hacking":"Vigilante Justice",j.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"}),j.gangManagementSubpage.appendChild(j.gangDesc),j.gangInfo=Object(d.createElement)("p",{id:"gang-info",width:"70%"}),j.gangManagementSubpage.appendChild(j.gangInfo),j.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:"}),i=Object(d.createElement)("br"),a=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=a.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,i,a,t,r])}}),j.gangManagementSubpage.appendChild(j.gangRecruitMemberButton),j.gangRecruitRequirementText=Object(d.createElement)("p",{color:"red",id:"gang-recruit-requirement-text",margin:"10px"}),j.gangManagementSubpage.appendChild(j.gangRecruitRequirementText),j.gangManagementSubpage.appendChild(Object(d.createElement)("br",{})),j.gangExpandAllButton=Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=j.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")||n.click()}return!1}}),j.gangCollapseAllButton=Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Collapse All",clickListener:()=>{for(var e=j.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")&&n.click()}return!1}}),j.gangMemberFilter=Object(d.createElement)("input",{type:"text",placeholder:"Filter gang members",margin:"5px",padding:"5px",onkeyup:()=>{this.displayGangMemberList()}}),j.gangManageEquipmentButton=Object(d.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{this.createGangMemberUpgradeBox(e)}}),j.gangManagementSubpage.appendChild(j.gangExpandAllButton),j.gangManagementSubpage.appendChild(j.gangCollapseAllButton),j.gangManagementSubpage.appendChild(j.gangMemberFilter),j.gangManagementSubpage.appendChild(j.gangManageEquipmentButton),j.gangMemberList=Object(d.createElement)("ul",{id:"gang-member-list"}),this.displayGangMemberList(),j.gangManagementSubpage.appendChild(j.gangMemberList),j.gangTerritorySubpage=Object(d.createElement)("div",{id:"gang-territory-subpage",display:"none"}),j.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>"}),j.gangTerritorySubpage.appendChild(j.gangTerritoryDescText),j.gangTerritoryWarfareCheckbox=Object(d.createElement)("input",{display:"inline-block",id:"gang-management-territory-warfare-checkbox",changeListener:()=>{this.territoryWarfareEngaged=j.gangTerritoryWarfareCheckbox.checked},margin:"2px",type:"checkbox"}),j.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,j.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%"}),j.gangTerritorySubpage.appendChild(j.gangTerritoryWarfareCheckbox),j.gangTerritorySubpage.appendChild(j.gangTerritoryWarfareCheckboxLabel),j.gangTerritorySubpage.appendChild(Object(d.createElement)("br")),j.gangTerritoryWarfareClashChance=Object(d.createElement)("p",{display:"inline-block"}),j.gangTerritorySubpage.appendChild(j.gangTerritoryWarfareClashChance),j.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.")}})),j.gangTerritoryDeathNotifyCheckbox=Object(d.createElement)("input",{display:"inline-block",id:"gang-management-notify-member-death-checkbox",changeListener:()=>{this.notifyMemberDeath=j.gangTerritoryDeathNotifyCheckbox.checked},margin:"2px",type:"checkbox"}),j.gangTerritoryDeathNotifyCheckbox.checked=this.notifyMemberDeath,j.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."}),j.gangTerritorySubpage.appendChild(Object(d.createElement)("br")),j.gangTerritorySubpage.appendChild(j.gangTerritoryDeathNotifyCheckbox),j.gangTerritorySubpage.appendChild(j.gangTerritoryDeathNotifyCheckboxLabel),j.gangTerritorySubpage.appendChild(Object(d.createElement)("br"));var i=Object(d.createElement)("fieldset",{display:"block",margin:"6px",width:"50%"});j.gangTerritoryInfoText=Object(d.createElement)("p"),i.appendChild(j.gangTerritoryInfoText),j.gangTerritorySubpage.appendChild(i),j.gangContainer.appendChild(j.gangTerritorySubpage),j.gangContainer.appendChild(j.gangManagementSubpage),document.getElementById("entire-game-container").appendChild(j.gangContainer)}j.gangContainer.style.display="block",this.updateGangContent()},M.prototype.displayGangMemberList=function(){Object(E.removeChildrenFromElement)(j.gangMemberList),j.gangMemberPanels={};const e=this.members,t=j.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(j.gangContentCreated)if(j.gangMemberUpgradeBoxOpened&&(j.gangMemberUpgradeBoxDiscount.childNodes[0].nodeValue="Discount: -"+c.numeralWrapper.format(1-1/this.getDiscount(),"0.00%")),"block"===j.gangTerritorySubpage.style.display){j.gangTerritoryWarfareClashChance.innerText=`Territory Clash Chance: ${c.numeralWrapper.format(this.territoryClashChance,"0.000%")}`,j.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,j.gangTerritoryInfoText.innerHTML="";const e=C[this.facName].power;for(const t in C)if(C.hasOwnProperty(t)){const n=C[t];let i,a=100*n.territory;if(i=a<=0?Object(y.formatNumber)(0,2):a>=100?Object(y.formatNumber)(100,2):Object(y.formatNumber)(a,2),t===this.facName){let e=`<b><u>${t}</u></b><br>Power: ${Object(y.formatNumber)(n.power,6)}<br>`;e+=`Territory: ${i}%<br><br>`,j.gangTerritoryInfoText.innerHTML+=e}else{const a=e/(n.power+e);let r=`<u>${t}</u><br>Power: ${Object(y.formatNumber)(n.power,6)}<br>`;r+=`Territory: ${i}%<br>`,r+=`Chance to win clash with this gang: ${c.numeralWrapper.format(a,"0.000%")}<br><br>`,j.gangTerritoryInfoText.innerHTML+=r}}}else{if(j.gangInfo instanceof Element){var e,t=s.Factions[this.facName];e=t instanceof o.Faction?t.playerReputation:"ERROR",Object(E.removeChildrenFromElement)(j.gangInfo),j.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:"Respect: "+Object(y.formatNumber)(this.respect,6)+" ("+Object(y.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."})),j.gangInfo.appendChild(Object(d.createElement)("br")),j.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+Object(y.formatNumber)(this.wanted,6)+" ("+Object(y.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."})),j.gangInfo.appendChild(Object(d.createElement)("br"));var n=this.getWantedPenalty();n=100*(1-n),j.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:`Wanted Level Penalty: -${Object(y.formatNumber)(n,2)}%`,tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),j.gangInfo.appendChild(Object(d.createElement)("br")),j.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:`Money gain rate: ${c.numeralWrapper.format(5*this.moneyGainRate,"$0.000a")} / sec`})),j.gangInfo.appendChild(Object(d.createElement)("br"));var i=100*C[this.facName].territory;let a;a=i<=0?Object(y.formatNumber)(0,2):i>=100?Object(y.formatNumber)(100,2):Object(y.formatNumber)(i,2),j.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:`Territory: ${Object(y.formatNumber)(a,3)}%`,tooltip:"The percentage of total territory your Gang controls"})),j.gangInfo.appendChild(Object(d.createElement)("br")),j.gangInfo.appendChild(Object(d.createElement)("p",{display:"inline-block",innerText:"Faction reputation: "+Object(y.formatNumber)(e,3)})),j.gangInfo.appendChild(Object(d.createElement)("br"));const l=1e3/r.Engine._idleSpeed;j.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"})),j.gangInfo.appendChild(Object(d.createElement)("br"))}else console.error("gang-info DOM element DNE");const a=this.members.length,l=this.getRespectNeededToRecruitMember(),u=j.gangRecruitMemberButton;a>=30?(u.className="a-link-button-inactive",j.gangRecruitRequirementText.style.display="inline-block",j.gangRecruitRequirementText.innerHTML="You have reached the maximum amount of gang members"):this.canRecruitMember()?(u.className="a-link-button",j.gangRecruitRequirementText.style.display="none"):(u.className="a-link-button-inactive",j.gangRecruitRequirementText.style.display="inline-block",j.gangRecruitRequirementText.innerHTML=`${Object(y.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(!j.gangContentCreated)return;const t=e.name;j.gangMemberPanels[t]={};var n=Object(h.createAccordionElement)({id:t+"gang-member",hdrText:t});const i=n[0],a=(n[1],n[2]);j.gangMemberPanels[t].panel=a;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>")});j.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(),i=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")}),a=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,[i,a,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",{id:t+"gang-member-task-selector"});let y=this.getAllTaskNames();y.unshift("---");for(var f=0;f<y.length;++f){var b=document.createElement("option");b.text=y[f],_.add(b)}if(_.addEventListener("change",()=>{var t=_.options[_.selectedIndex].text;e.assignToTask(t),this.setGangMemberTaskDescription(e,t),this.updateGangContent()}),w.hasOwnProperty(e.task)){var E=e.task,v=0;for(let e=0;e<y.length;++e)if(E===y[e]){v=e;break}_.selectedIndex=v}var O=Object(d.createElement)("p",{id:t+"gang-member-gain-info"});m.appendChild(_),m.appendChild(O);var C=Object(d.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task-desc"}),T=Object(d.createElement)("p",{display:"inline",id:t+"gang-member-task-description"});C.appendChild(T),a.appendChild(r),a.appendChild(m),a.appendChild(C),j.gangMemberList.appendChild(i),this.setGangMemberTaskDescription(e,E),this.updateGangMemberDisplayElement(e)},M.prototype.updateGangMemberDisplayElement=function(e){if(!j.gangContentCreated)return;var t=e.name,n=document.getElementById(t+"gang-member-stats-text");n&&(n.innerText=[`Hacking: ${Object(y.formatNumber)(e.hack,0)} (${c.numeralWrapper.format(e.hack_exp,"(0.00a)")} exp)`,`Strength: ${Object(y.formatNumber)(e.str,0)} (${c.numeralWrapper.format(e.str_exp,"(0.00a)")} exp)`,`Defense: ${Object(y.formatNumber)(e.def,0)} (${c.numeralWrapper.format(e.def_exp,"(0.00a)")} exp)`,`Dexterity: ${Object(y.formatNumber)(e.dex,0)} (${c.numeralWrapper.format(e.dex_exp,"(0.00a)")} exp)`,`Agility: ${Object(y.formatNumber)(e.agi,0)} (${c.numeralWrapper.format(e.agi_exp,"(0.00a)")} exp)`,`Charisma: ${Object(y.formatNumber)(e.cha,0)} (${c.numeralWrapper.format(e.cha_exp,"(0.00a)")} exp)`].join("\n"));const i=j.gangMemberPanels[t];if(i){const t=i.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 a=document.getElementById(t+"gang-member-gain-info");a&&(a.innerHTML=[`Money: $ ${Object(y.formatNumber)(5*e.calculateMoneyGain(this),2)} / sec`,`Respect: ${Object(y.formatNumber)(5*e.calculateRespectGain(this),6)} / sec`,`Wanted Level: ${Object(y.formatNumber)(5*e.calculateWantedLevelGain(this),6)} / sec`,`Total Respect Earned: ${Object(y.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 i=0;for(let e=0;e<t.length;++e)if(n===t[e]){i=e;break}r.selectedIndex=i}}},M.prototype.setGangMemberTaskDescription=function(e,t){const n=e.name,i=document.getElementById(n+"gang-member-task-description");if(i){var a=w[t];null==a&&(a=w.Unassigned);var r=a.desc;i.innerHTML=r}},M.prototype.clearUI=function(){j.gangContainer instanceof Element&&Object(v.removeElement)(j.gangContainer);for(const e in j)j[e]=null;j.gangContentCreated=!1,j.gangMemberUpgradeBoxOpened=!1,j.gangMemberPanels={}}}).call(this,n(72))},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__(49),_CodingContracts__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(48),_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__(28),_Programs_Programs__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(140),_DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(80),_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__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(52),_Hacking__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(53),_HelpText__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(120),_HelpText__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_HelpText__WEBPACK_IMPORTED_MODULE_9__),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(38),_Literature__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(96),_Message__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(46),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(30),_Player__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(0),_RedPill__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(67),_Script__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(33),_Server__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(12),_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(19),_Settings_Settings__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__),_SpecialServerIps__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(37),_TextFile__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(73),_TextFile__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_20__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(3),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(13),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(4),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(29),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__),_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(74),_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_25__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(44),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_26__),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(63),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_27__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(101),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__),_utils_LogBox__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(91),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(22),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(8),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__),autosize__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(179),autosize__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_32__),jszip__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(178),jszip__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_33__),file_saver__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(177),file_saver__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_34__);function postNetburnerText(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bitburner v"+_Constants__WEBPACK_IMPORTED_MODULE_2__.CONSTANTS.Version)}$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__.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_24__.KEY.ENTER){e.preventDefault();var n=t.value;if(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("<span class='prompt'>["+(_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().hostname+" ~]&gt;</span> "+n),n.length>0){Terminal.resetTerminalInput();const e=n.split(";");for(let t=0;t<e.length;t++)e[t].match(/^\s*$/)||Terminal.executeCommand(e[t])}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_6__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_6__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.UPARROW||_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.P&&e.ctrlKey){if(_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var i=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;(i<0||i>r)&&(Terminal.commandHistoryIndex=r),0!=i&&--Terminal.commandHistoryIndex;var a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a,setTimeout(function(){t.selectionStart=t.selectionEnd=1e4},0)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.DOWNARROW||_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.M&&e.ctrlKey){if(_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;i=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((i<0||i>r)&&(Terminal.commandHistoryIndex=r),i==r||i==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.TAB){if(e.preventDefault(),null==t)return;var o=t.value;if(""==o)return;const i=o.lastIndexOf(";");-1!==i&&(o=o.slice(i+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__WEBPACK_IMPORTED_MODULE_7__.a.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;function tabCompletion(e,t,n,i=0){if(n.constructor===Array&&Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__.containsAllStrings)(n)){if(""==t)for(var a=n.length-1;a>=0;--a)n[a].toLowerCase().startsWith(e.toLowerCase())||n.splice(a,1);else for(a=n.length-1;a>=0;--a)n[a].toLowerCase().startsWith(t.toLowerCase())||n.splice(a,1);var r="";if(0!=n.length)if(1==n.length){r=""==t?n[0]+" ":e+" "+n[0];const i=document.getElementById("terminal-input-text-box"),a=i.value.lastIndexOf(";");i.value=-1===a?r:i.value.slice(0,a+1)+" "+r,document.getElementById("terminal-input-text-box").focus()}else{var o=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__.longestCommonStart)(n),s="";for(a=0;a<n.length;++a)s+=n[a],s+=" ";""==t?o==e?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("> "+e),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(s)):(document.getElementById("terminal-input-text-box").value=o,document.getElementById("terminal-input-text-box").focus()):o==t?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("> "+e+" "+t),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(s)):(document.getElementById("terminal-input-text-box").value=e+" "+o,document.getElementById("terminal-input-text-box").focus())}}}function determineAllPossibilitiesForTabCompletion(e,t=0){var n=[];n=n.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_0__.b));var i=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer();if((e=e.toLowerCase()).startsWith("./")&&-1==t){for(var a=0;a<i.scripts.length;++a)n.push("./"+i.scripts[a].filename);var r=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getHomeComputer();for(a=0;a<r.programs.length;++a)n.push("./"+r.programs[a]);return n}if(-1==t)return["alias","analyze","cat","check","clear","cls","connect","download","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__WEBPACK_IMPORTED_MODULE_17__.b)_Server__WEBPACK_IMPORTED_MODULE_17__.b.hasOwnProperty(o)&&(n.push(_Server__WEBPACK_IMPORTED_MODULE_17__.b[o].ip),n.push(_Server__WEBPACK_IMPORTED_MODULE_17__.b[o].hostname));if(e.startsWith("scp ")&&0==t){for(a=0;a<i.scripts.length;++a)n.push(i.scripts[a].filename);for(a=0;a<i.messages.length;++a)i.messages[a]instanceof _Message__WEBPACK_IMPORTED_MODULE_12__.a||n.push(i.messages[a]);for(a=0;a<i.textFiles.length;++a)n.push(i.textFiles[a].fn)}if(e.startsWith("connect ")||e.startsWith("telnet ")){for(a=0;a<i.serversOnNetwork.length;++a){var s=_Server__WEBPACK_IMPORTED_MODULE_17__.b[i.serversOnNetwork[a]];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(a=0;a<i.scripts.length;++a)n.push(i.scripts[a].filename);return n}if(e.startsWith("nano ")){for(a=0;a<i.scripts.length;++a)n.push(i.scripts[a].filename);for(a=0;a<i.textFiles.length;++a)n.push(i.textFiles[a].fn);return n.push(".fconf"),n}if(e.startsWith("rm ")){for(let e=0;e<i.scripts.length;++e)n.push(i.scripts[e].filename);for(let e=0;e<i.programs.length;++e)n.push(i.programs[e]);for(let e=0;e<i.messages.length;++e)i.messages[e]instanceof _Message__WEBPACK_IMPORTED_MODULE_12__.a||!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_26__.isString)(i.messages[e])||!i.messages[e].endsWith(".lit")||n.push(i.messages[e]);for(let e=0;e<i.textFiles.length;++e)n.push(i.textFiles[e].fn);for(let e=0;e<i.contracts.length;++e)n.push(i.contracts[e].fn);return n}if(e.startsWith("run ")){for(let e=0;e<i.scripts.length;++e)n.push(i.scripts[e].filename);r=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getHomeComputer();for(let e=0;e<r.programs.length;++e)n.push(r.programs[e]);for(let e=0;e<i.contracts.length;++e)n.push(i.contracts[e].fn);return n}if(e.startsWith("cat ")){for(a=0;a<i.messages.length;++a)i.messages[a]instanceof _Message__WEBPACK_IMPORTED_MODULE_12__.a?n.push(i.messages[a].filename):n.push(i.messages[a]);for(a=0;a<i.textFiles.length;++a)n.push(i.textFiles[a].fn);return n}if(e.startsWith("download ")){for(a=0;a<i.textFiles.length;++a)n.push(i.textFiles[a].fn);for(a=0;a<i.scripts.length;++a)n.push(i.scripts[a].filename)}return n}$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.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_22__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_22__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_24__.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__WEBPACK_IMPORTED_MODULE_7__.a.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML="<div id='terminal-input-header' class='prompt'>["+_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().hostname+' ~]$ </div><textarea type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',autosize__WEBPACK_IMPORTED_MODULE_32___default()(document.getElementById("terminal-input-text-box"))):document.getElementById("terminal-input-td").innerHTML="<div id='terminal-input-header' class='prompt'>["+_Player__WEBPACK_IMPORTED_MODULE_14__.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,i=t.selectionStart,a=(t.selectionEnd,t.value);switch(e.toLowerCase()){case"backspace":i>0&&i<=n+1&&(t.value=a.substr(0,i-1)+a.substr(i));break;case"deletewordbefore":for(var r=i-1;r>0;--r)if(" "===a.charAt(r))return void(t.value=a.substr(0,r)+a.substr(i));break;case"deletewordafter":for(r=i+1;r<=text.length+1;++r)if(" "===a.charAt(r))return void(t.value=a.substr(0,i)+a.substr(r))}}catch(e){console.log("Exception in Terminal.modifyInput: "+e)}},moveTextCursor:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,i=t.selectionStart;t.selectionEnd;switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(n,n);break;case"prevchar":i>0&&t.setSelectionRange(i-1,i-1);break;case"prevword":for(var a=i-2;a>=0;--a)if(" "===t.value.charAt(a))return void t.setSelectionRange(a+1,a+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(i+1,i+1);break;case"nextword":for(a=i+1;a<=n;++a)if(" "===t.value.charAt(a))return void t.setSelectionRange(a,a);t.setSelectionRange(n,n);break;default:console.log("WARNING: Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.log("Exception in Terminal.moveTextCursor: "+e)}},startHack:function(){Terminal.hackFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.d)(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer())/4,Terminal.startAction()},startAnalyze:function(){Terminal.analyzeFlag=!0,Terminal.actionTime=1,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Analyzing system..."),Terminal.startAction()},startAction:function(){Terminal.actionStarted=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.hackProgressPost)("Time left:"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_14__.a.getCurrentServer(),n=Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.b)(t),i=Math.random();console.log("Hack success chance: "+n+", rand: "+i);var a=Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.c)(t),r=a/4;if(i<n){if(_SpecialServerIps__WEBPACK_IMPORTED_MODULE_19__.a[_SpecialServerIps__WEBPACK_IMPORTED_MODULE_19__.b.WorldDaemon]&&_SpecialServerIps__WEBPACK_IMPORTED_MODULE_19__.a[_SpecialServerIps__WEBPACK_IMPORTED_MODULE_19__.b.WorldDaemon]==t.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_14__.a.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_14__.a.bitNodeN=1),void Object(_RedPill__WEBPACK_IMPORTED_MODULE_15__.a)(_Player__WEBPACK_IMPORTED_MODULE_14__.a.bitNodeN);t.manuallyHacked=!0;var o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.e)(t);(o=Math.floor(t.moneyAvailable*o))<=0&&(o=0),t.moneyAvailable-=o,_Player__WEBPACK_IMPORTED_MODULE_14__.a.gainMoney(o),_Player__WEBPACK_IMPORTED_MODULE_14__.a.gainHackingExp(a),_Player__WEBPACK_IMPORTED_MODULE_14__.a.gainIntelligenceExp(a/_Constants__WEBPACK_IMPORTED_MODULE_2__.CONSTANTS.IntelligenceTerminalHackBaseExpGain),t.fortify(_Constants__WEBPACK_IMPORTED_MODULE_2__.CONSTANTS.ServerFortifyAmount),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Hack successful! Gained "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(o,"($0,0.00)")+" and "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(a,"0.0000")+" hacking EXP")}else _Player__WEBPACK_IMPORTED_MODULE_14__.a.gainHackingExp(r),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Failed to hack "+t.hostname+". Gained "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.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_14__.a.getCurrentServer();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(e.hostname+": "),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Organization name: "+e.organizationName);var t="";t=e.hasAdminRights?"YES":"NO",Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Root Access: "+t),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Required hacking skill: "+e.requiredHackingSkill),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Server security level: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(e.hackDifficulty,"0.000a")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Chance to hack: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.b)(e),"0.00%")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Time to hack: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.d)(e),"0.000")+" seconds"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Total money available on server: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(e.moneyAvailable,"$0,0.00")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Required number of open ports for NUKE: "+e.numOpenPortsRequired),e.sshPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("SSH port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("SSH port: Closed"),e.ftpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("FTP port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("FTP port: Closed"),e.smtpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("SMTP port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("SMTP port: Closed"),e.httpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("HTTP port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("HTTP port: Closed"),e.sqlPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("SQL port: Open"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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)},executeCommand:function(command){command=command.trim(),command=command.replace(/\s\s+/g," "),Terminal.commandHistory[Terminal.commandHistory.length-1]!=command&&(Terminal.commandHistory.push(command),Terminal.commandHistory.length>50&&Terminal.commandHistory.splice(0,1)),Terminal.commandHistoryIndex=Terminal.commandHistory.length,command=Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.h)(command),command.startsWith("./")&&(command="run "+command.slice(2));var commandArray=command.split(" ");if(commandArray.length>1&&(commandArray=[commandArray.shift(),commandArray.join(" ")]),0!=commandArray.length)if(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.a.isRunning){var foodnstuffServ=Object(_Server__WEBPACK_IMPORTED_MODULE_17__.c)("foodnstuff");if(null==foodnstuffServ)throw new Error("Could not get foodnstuff server");switch(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.a.currStep){case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalHelp:"help"==commandArray[0]?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(_HelpText__WEBPACK_IMPORTED_MODULE_9__.TerminalHelpText),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalLs:"ls"==commandArray[0]?(Terminal.executeListCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalScan:"scan"==commandArray[0]?(Terminal.executeScanCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalScanAnalyze1:1==commandArray.length&&"scan-analyze"==commandArray[0]?(Terminal.executeScanAnalyzeCommand(1),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalScanAnalyze2:2==commandArray.length&&"scan-analyze"==commandArray[0]&&"2"==commandArray[1]?(Terminal.executeScanAnalyzeCommand(2),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.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_31__.post)("Wrong command! Try again!");_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_14__.a.currentServer=foodnstuffServ.ip,_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Connected to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalAnalyze:if("analyze"==commandArray[0]){if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalNuke:2==commandArray.length&&"run"==commandArray[0]&&"NUKE.exe"==commandArray[1]?(foodnstuffServ.hasAdminRights=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("NUKE successful! Gained root access to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalManualHack:1==commandArray.length&&"hack"==commandArray[0]?(Terminal.startHack(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.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_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalFree:1==commandArray.length&&"free"==commandArray[0]&&(Terminal.executeFreeCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)());break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.TerminalRunScript:2==commandArray.length&&"run"==commandArray[0]&&"foodnstuff.script"==commandArray[1]?(Terminal.runScript("foodnstuff.script"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.d.ActiveScriptsToTerminal:if(2==commandArray.length&&"tail"==commandArray[0]&&"foodnstuff.script"==commandArray[1]){var runningScript=Object(_Script__WEBPACK_IMPORTED_MODULE_16__.d)("foodnstuff.script",[],_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer());if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_29__.a)(runningScript),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Bad command. Please follow the tutorial");break;default:return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var s=_Player__WEBPACK_IMPORTED_MODULE_14__.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)if(commandArray[1].startsWith("-g ")){var alias=commandArray[1].substring(3);if(Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.e)(alias,!0))return}else if(Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.e)(commandArray[1]))return;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)('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_31__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze();break;case"buy":_SpecialServerIps__WEBPACK_IMPORTED_MODULE_19__.a.hasOwnProperty("Darkweb Server")?Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_4__.b)(commandArray):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("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_31__.post)("Incorrect usage of cat command. Usage: cat [file]");var filename=commandArray[1];if(!filename.endsWith(".msg")&&!filename.endsWith(".lit")&&!filename.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: 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_11__.b)(s.messages[i]);if(filename.endsWith(".msg")&&s.messages[i].filename==filename)return void Object(_Message__WEBPACK_IMPORTED_MODULE_12__.f)(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_31__.post)("Error: No such file "+filename);break;case"check":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{for(var results=commandArray[1].split(" "),scriptName=results[0],args=[],i=1;i<results.length;++i)args.push(results[i]);if(0==Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(scriptName))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: tail can only be called on .script files (filename must end with .script)");var runningScript=Object(_Script__WEBPACK_IMPORTED_MODULE_16__.d)(scriptName,args,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: No such script exists");runningScript.displayLog()}break;case"clear":case"cls":if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("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_31__.post)("Incorrect usage of connect command. Usage: connect [ip/hostname]");for(var ip=commandArray[1],i=0;i<_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().serversOnNetwork.length;i++)if(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().getServerOnNetwork(i).ip==ip||_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().getServerOnNetwork(i).hostname==ip)return void Terminal.connectToServer(ip);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Host not found");break;case"download":if(2!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of download command. Usage: download [text file]");var fn=commandArray[1];if("*"===fn||"*.script"===fn||"*.txt"===fn){var zip=new jszip__WEBPACK_IMPORTED_MODULE_33__,filename;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)}switch(fn){case"*.script":filename="bitburnerScripts.zip";break;case"*.txt":filename="bitburnerTexts.zip";break;default:filename="bitburnerFiles.zip"}return void zip.generateAsync({type:"blob"}).then(function(e){file_saver__WEBPACK_IMPORTED_MODULE_34__.saveAs(e,filename)})}if(Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(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_20__.getTextFile)(fn,s);if(null!==txtFile)return txtFile.download()}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: "+fn+" does not exist");break;case"expr":if(commandArray.length<=1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of expr command. Usage: expr [math expression]");const expr=commandArray.slice(1).join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,"");let result;try{result=eval(sanitizedExpr)}catch(e){return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`Could not evaluate expression: ${sanitizedExpr}`)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(result);break;case"free":Terminal.executeFreeCommand(commandArray);break;case"hack":if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of hack command. Usage: hack");_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):0==_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("You do not have admin rights for this machine! Cannot hack"):_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_14__.a.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("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_31__.post)("Incorrect usage of help command. Usage: help");if(1==commandArray.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(_HelpText__WEBPACK_IMPORTED_MODULE_9__.TerminalHelpText);else{var cmd=commandArray[1],txt=_HelpText__WEBPACK_IMPORTED_MODULE_9__.HelpTexts[cmd];if(null==txt)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: No help topics match '"+cmd+"'");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(txt)}break;case"home":if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of home command. Usage: home");_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_14__.a.currentServer=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getHomeComputer().ip,_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Connected to home"),Terminal.resetTerminalInput();break;case"hostname":if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of hostname command. Usage: hostname");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().hostname);break;case"ifconfig":if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of ifconfig command. Usage: ifconfig");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().ip);break;case"kill":if(commandArray.length<2)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");for(var results=commandArray[1].split(" "),scriptName=results[0],args=[],i=1;i<results.length;++i)args.push(results[i]);var runningScript=Object(_Script__WEBPACK_IMPORTED_MODULE_16__.d)(scriptName,args,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("No such script is running. Nothing to kill");Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_13__.d)(runningScript,s.ip),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Killing "+scriptName+". May take up to a few minutes for the scripts to die...");break;case"killall":for(var i=s.runningScripts.length-1;i>=0;--i)Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_13__.d)(s.runningScripts[i],s.ip);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().cpuCores+" Core(s)");break;case"mem":if(2!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");var scriptName=commandArray[1],numThreads=1;if(-1!=scriptName.indexOf(" -t ")){var results=scriptName.split(" ");if(3!=results.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Invalid use of run command. Usage: mem [script] [-t] [number threads]");if(numThreads=Math.round(Number(results[2])),isNaN(numThreads)||numThreads<1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Invalid number of threads specified. Number of threads must be greater than 1");scriptName=results[0]}for(var currServ=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer(),i=0;i<currServ.scripts.length;++i)if(scriptName==currServ.scripts[i].filename){var scriptBaseRamUsage=currServ.scripts[i].ramUsage,ramUsage=scriptBaseRamUsage*numThreads;return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("This script requires "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(ramUsage,"0.00")+" GB of RAM to run for "+numThreads+" thread(s)")}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("ERR: No such script exists!");break;case"nano":if(2!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of nano command. Usage: nano [scriptname]");var filename=commandArray[1];if(".fconf"===filename){var text=Object(_Fconf__WEBPACK_IMPORTED_MODULE_7__.b)();return void _engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(filename,text)}if(Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(filename)){for(var i=0;i<s.scripts.length;i++)if(filename==s.scripts[i].filename)return void _engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(filename,s.scripts[i].code)}else{if(!filename.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");for(var i=0;i<s.textFiles.length;++i)if(filename===s.textFiles[i].fn)return void _engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(filename,s.textFiles[i].text)}_engine__WEBPACK_IMPORTED_MODULE_6__.Engine.loadScriptEditorContent(filename);break;case"ps":if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of ps command. Usage: ps");for(var i=0;i<s.runningScripts.length;i++){for(var rsObj=s.runningScripts[i],res=rsObj.filename,j=0;j<rsObj.args.length;++j)res+=" "+rsObj.args[j].toString();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(res)}break;case"rm":if(2!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect number of arguments. Usage: rm [program/script]");var delTarget=commandArray[1];if(delTarget.includes(".exe")){for(var i=0;i<s.programs.length;++i)if(s.programs[i]==delTarget)return void s.programs.splice(i,1)}else if(Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(delTarget)){for(var i=0;i<s.scripts.length;++i)if(s.scripts[i].filename==delTarget){for(var j=0;j<s.runningScripts.length;++j)if(s.runningScripts[j].filename==delTarget)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Cannot delete a script that is currently running!");return void s.scripts.splice(i,1)}}else if(delTarget.endsWith(".lit"))for(var i=0;i<s.messages.length;++i){var f=s.messages[i];if(!(f instanceof _Message__WEBPACK_IMPORTED_MODULE_12__.a)&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_26__.isString)(f)&&f===delTarget)return void s.messages.splice(i,1)}else if(delTarget.endsWith(".txt")){for(var i=0;i<s.textFiles.length;++i)if(s.textFiles[i].fn===delTarget)return void s.textFiles.splice(i,1)}else if(delTarget.endsWith(".cct"))for(var i=0;i<s.contracts.length;++i)if(s.contracts[i].fn===delTarget)return void s.contracts.splice(i,1);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: No such file exists");break;case"run":if(2!=commandArray.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("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_31__.post)('<iframe src="https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>',!1);executableName.includes(".script")||executableName.includes(".js")||executableName.includes(".ns")?Terminal.runScript(executableName):executableName.endsWith(".cct")?Terminal.runContract(executableName):Terminal.runProgram(executableName)}break;case"scan":Terminal.executeScanCommand(commandArray);break;case"scan-analyze":if(1==commandArray.length)Terminal.executeScanAnalyzeCommand(1);else if(2==commandArray.length){var all=!1,depth;if(commandArray[1].endsWith("-a")&&(all=!0,commandArray[1]=commandArray[1].replace("-a","")),depth=0===commandArray[1].length?1:Number(commandArray[1]),isNaN(depth)||depth<0)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(depth>3&&!_Player__WEBPACK_IMPORTED_MODULE_14__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV1.name)&&!_Player__WEBPACK_IMPORTED_MODULE_14__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(depth>5&&!_Player__WEBPACK_IMPORTED_MODULE_14__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(depth>10)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("You cannot scan-analyze with that high of a depth. Maximum depth is 10");Terminal.executeScanAnalyzeCommand(depth,all)}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");break;case"scp":if(2!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");var args=commandArray[1].split(" ");if(2!=args.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");var scriptname=args[0];if(!scriptname.endsWith(".lit")&&!Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(scriptname)&&!scriptname.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: scp only works for .script, .txt, and .lit files");var destServer=Object(_Server__WEBPACK_IMPORTED_MODULE_17__.e)(args[1]);if(null==destServer)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Invalid destination. "+args[1]+" not found");var ip=destServer.ip,currServ=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer();if(scriptname.endsWith(".lit")){for(var found=!1,i=0;i<currServ.messages.length;++i)if(!(currServ.messages[i]instanceof _Message__WEBPACK_IMPORTED_MODULE_12__.a)&&currServ.messages[i]==scriptname){found=!0;break}if(!found)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: no such file exists!");for(var i=0;i<destServer.messages.length;++i)if(destServer.messages[i]===scriptname)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(scriptname+" copied over to "+destServer.hostname);return destServer.messages.push(scriptname),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(scriptname+" copied over to "+destServer.hostname)}if(scriptname.endsWith(".txt")){for(var found=!1,txtFile,i=0;i<currServ.textFiles.length;++i)if(currServ.textFiles[i].fn===scriptname){found=!0,txtFile=currServ.textFiles[i];break}if(!found)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: no such file exists!");let e=destServer.writeToTextFile(txtFile.fn,txtFile.text);return e.success?e.overwritten?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwriten`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`${scriptname} overwritten on ${destServer.hostname}`)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`${scriptname} copied over to ${destServer.hostname}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: scp failed")}for(var sourceScript=null,i=0;i<currServ.scripts.length;++i)if(scriptname==currServ.scripts[i].filename){sourceScript=currServ.scripts[i];break}if(null==sourceScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("ERROR: scp() failed. No such script exists");let sRes=destServer.writeToScriptFile(scriptname,sourceScript.code);if(!sRes.success)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: scp failed");if(sRes.overwritten)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwritten`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`${scriptname} overwritten on ${destServer.hostname}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`${scriptname} copied over to ${destServer.hostname}`);break;case"sudov":if(1!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect number of arguments. Usage: sudov");_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("You have ROOT access to this machine"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("You do NOT have root access to this machine");break;case"tail":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...");else{for(var results=commandArray[1].split(" "),scriptName=results[0],args=[],i=1;i<results.length;++i)args.push(results[i]);if(0==Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(scriptName))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: tail can only be called on .script files (filename must end with .script)");var runningScript=Object(_Script__WEBPACK_IMPORTED_MODULE_16__.d)(scriptName,args,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Error: No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_29__.a)(runningScript)}break;case"theme":var args=commandArray[1]?commandArray[1].split(" "):[];if(1!=args.length&&3!=args.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect number of arguments."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("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_31__.post)("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__WEBPACK_IMPORTED_MODULE_7__.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.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_31__.post)("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__WEBPACK_IMPORTED_MODULE_7__.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf__WEBPACK_IMPORTED_MODULE_7__.a.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_31__.post)("Incorrect usage of top command. Usage: top");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Script Threads RAM Usage");for(var currRunningScripts=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().runningScripts,i=0;i<currRunningScripts.length;i++){var script=currRunningScripts[i],numSpacesScript=32-script.filename.length;numSpacesScript<0&&(numSpacesScript=0);var spacesScript=Array(numSpacesScript+1).join(" "),numSpacesThread=16-(script.threads+"").length,spacesThread=Array(numSpacesThread+1).join(" ");ramUsage=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(script.scriptRef.ramUsage*script.threads,"0.00")+" GB";var entry=[script.filename,spacesScript,script.threads,spacesThread,ramUsage];Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(entry.join(""))}break;case"unalias":if(2!=commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)('Incorrect usage of unalias name. Usage: unalias "[alias]"');if(commandArray[1].startsWith('"')&&commandArray[1].endsWith('"')){var alias=commandArray[1].slice(1,-1);Object(_Alias__WEBPACK_IMPORTED_MODULE_0__.g)(alias)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Removed alias "+alias):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("No such alias exists")}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)('Incorrect usage of unalias name. Usage: unalias "[alias]"');break;case"wget":if(2!==commandArray.length)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of wget command. Usage: wget [url] [target file]");var args=commandArray[1].split(" ");if(2!==args.length)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of wget command. Usage: wget [url] [target file]");let url=args[0],target=args[1];if(!Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(target)&&!target.endsWith(".txt"))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("wget failed: Invalid target file. Target file must be script or text file");$.get(url,function(e){let t;return(t=Object(_Script__WEBPACK_IMPORTED_MODULE_16__.f)(target)?s.writeToScriptFile(target,e):s.writeToTextFile(target,e)).success?t.overwritten?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`wget successfully retrieved content and overwrote ${target}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`wget successfully retrieved content to new file ${target}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("wget failed")},"text").fail(function(e){return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("wget failed: "+JSON.stringify(e))});break;default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Command not found")}}},connectToServer:function(e){console.log("Connect to server called");var t=Object(_Server__WEBPACK_IMPORTED_MODULE_17__.e)(e);null!=t?(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_14__.a.currentServer=t.ip,_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Connected to "+t.hostname),"darkweb"==_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().hostname&&Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_4__.a)(),Terminal.resetTerminalInput()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Invalid server. Connection failed.")},executeListCommand:function(e){if(1==e.length||2==e.length){var t=null;if(2==e.length){if(!e[1].startsWith("| grep "))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of ls command. Usage: ls [| grep pattern]");var n=e[1].replace("| grep ","");" "!=n&&(t=n)}for(var i=[],a=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer(),r=0;r<a.programs.length;r++)t?a.programs[r].includes(t)&&i.push(a.programs[r]):i.push(a.programs[r]);for(r=0;r<a.scripts.length;r++)t?a.scripts[r].filename.includes(t)&&i.push(a.scripts[r].filename):i.push(a.scripts[r].filename);for(r=0;r<a.messages.length;r++)t?a.messages[r]instanceof _Message__WEBPACK_IMPORTED_MODULE_12__.a?a.messages[r].filename.includes(t)&&i.push(a.messages[r].filename):a.messages[r].includes(t)&&i.push(a.messages[r]):a.messages[r]instanceof _Message__WEBPACK_IMPORTED_MODULE_12__.a?i.push(a.messages[r].filename):i.push(a.messages[r]);for(r=0;r<a.textFiles.length;++r)t?a.textFiles[r].fn.includes(t)&&i.push(a.textFiles[r].fn):i.push(a.textFiles[r].fn);for(r=0;r<a.contracts.length;++r)t?a.contracts[r].fn.includes(t)&&i.push(a.contracts[r].fn):i.push(a.contracts[r].fn);i.sort();for(r=0;r<i.length;r++)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(i[r])}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of ls command. Usage: ls [| grep pattern]")},executeScanCommand:function(e){if(1==e.length){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Hostname IP Root Access");for(var t=0;t<_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().serversOnNetwork.length;t++){var n=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().getServerOnNetwork(t);if(null!=n){var i,a=21-(n=n.hostname).length,r=Array(a+1).join(" ");n+=r,n+=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().getServerOnNetwork(t).ip,i=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().getServerOnNetwork(t).hasAdminRights?"Y":"N",a=21-_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().getServerOnNetwork(t).ip.length,n+=r=Array(a+1).join(" "),n+=i,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(n)}}}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of netstat/scan command. Usage: netstat/scan")},executeScanAnalyzeCommand:function(e=1,t=!1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(" ");var n=new _Script__WEBPACK_IMPORTED_MODULE_16__.a,i=[],a=[0],r=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer();for(i.push(r);0!=i.length;){var o=i.pop(),s=a.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)i.push(o.getServerOnNetwork(l)),a.push(s+1);if(0!=s){var c=Array(4*(s-1)+1).join("-");_Player__WEBPACK_IMPORTED_MODULE_14__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.AutoLink.name)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("<strong>"+c+"> <a class='scan-analyze-link'>"+o.hostname+"</a></strong>",!1):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("<strong>"+c+">"+o.hostname+"</strong>");var u=c+"--",p="NO";o.hasAdminRights&&(p="YES"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(u+"Root Access: "+p+", Required hacking skill: "+o.requiredHackingSkill),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(u+"Number of open ports required to NUKE: "+o.numOpenPortsRequired),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(u+"RAM: "+o.maxRam),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(" ")}}}var m=document.getElementsByClassName("scan-analyze-link");for(l=0;l<m.length;++l)!function(){var e=m[l].innerHTML.toString();m[l].onclick=function(){Terminal.analyzeFlag||Terminal.hackFlag||Terminal.connectToServer(e)}}()},executeFreeCommand:function(e){1==e.length?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Total: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().maxRam,"0.00")+" GB"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Used: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().ramUsed,"0.00")+" GB"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Available: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().maxRam-_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().ramUsed,"0.00")+" GB")):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Incorrect usage of free command. Usage: free")},runProgram:function(e){var t=e.split(" "),n=" ";n=t.length>1?t[0]:e,_Player__WEBPACK_IMPORTED_MODULE_14__.a.hasProgram(n)?Terminal.executeProgram(e):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){var t=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer(),n=e.split(" ");n.length>1&&(e=n[0]);const i={};i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.NukeProgram.name]=(e=>{if(!e.hasAdminRights)return e.openPortCount>=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("NUKE successful! Gained root access to "+_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer().hostname)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("NUKE unsuccessful. Not enough ports have been opened");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("SSH Port (22) is already open!"):(e.sshPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const n=Object(_Server__WEBPACK_IMPORTED_MODULE_17__.e)(t[1]);null!=n?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(n.hostname+":"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Server base security level: "+n.baseDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Server current security level: "+n.hackDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Server growth rate: "+n.serverGrowth),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Netscript hack() execution time: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.d)(n),"0.0")+"s"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Netscript grow() execution time: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.a)(n),"0.0")+"s"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Netscript weaken() execution time: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(Object(_Hacking__WEBPACK_IMPORTED_MODULE_8__.f)(n),"0.0")+"s")):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Invalid server IP/hostname")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.AutoLink.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_14__.a.augmentations.length>=30&&_Player__WEBPACK_IMPORTED_MODULE_14__.a.money.gt(1e11)&&(_Player__WEBPACK_IMPORTED_MODULE_14__.a.hacking_skill>=2500||_Player__WEBPACK_IMPORTED_MODULE_14__.a.strength>=1500&&_Player__WEBPACK_IMPORTED_MODULE_14__.a.defense>=1500&&_Player__WEBPACK_IMPORTED_MODULE_14__.a.dexterity>=1500&&_Player__WEBPACK_IMPORTED_MODULE_14__.a.agility>=1500)))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Augmentations: "+_Player__WEBPACK_IMPORTED_MODULE_14__.a.augmentations.length+" / 30"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Money: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(_Player__WEBPACK_IMPORTED_MODULE_14__.a.money.toNumber(),"($0.000a)")+" / "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_23__.numeralWrapper.format(1e11,"($0.000a)")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("One path below must be fulfilled..."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("----------HACKING PATH----------"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Hacking skill: "+_Player__WEBPACK_IMPORTED_MODULE_14__.a.hacking_skill+" / 2500"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("----------COMBAT PATH----------"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Strength: "+_Player__WEBPACK_IMPORTED_MODULE_14__.a.strength+" / 1500"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Defense: "+_Player__WEBPACK_IMPORTED_MODULE_14__.a.defense+" / 1500"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Dexterity: "+_Player__WEBPACK_IMPORTED_MODULE_14__.a.dexterity+" / 1500"),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Agility: "+_Player__WEBPACK_IMPORTED_MODULE_14__.a.agility+" / 1500");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("We will contact you."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("-- Daedalus --")}),i[_Programs_Programs__WEBPACK_IMPORTED_MODULE_3__.Programs.BitFlume.name]=(()=>{const e=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30__.yesNoBoxGetYesButton)(),t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30__.yesNoBoxGetNoButton)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",function(){return console.log("yesBtn event listener"),Object(_RedPill__WEBPACK_IMPORTED_MODULE_15__.a)(_Player__WEBPACK_IMPORTED_MODULE_14__.a.bitNodeN,!0),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30__.yesNoBoxClose)()}),t.addEventListener("click",function(){return Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30__.yesNoBoxClose)()}),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_30__.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(e)?i[e](t,n):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Invalid executable. Cannot be run")},runScript:function(e){var t=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer(),n=1,i=[],a=e.split(" ");if(a.length<=0&&Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("This is a bug. Please contact developer"),e=a[0],a.length>1)if(a.length>=3&&"-t"==a[1]){if(n=Math.round(Number(a[2])),isNaN(n)||n<1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Invalid number of threads specified. Number of threads must be greater than 0");for(var r=3;r<a.length;++r){if((s=a[r]).startsWith("'")&&s.endsWith("'")||s.startsWith('"')&&s.endsWith('"'))i.push(s.slice(1,-1));else{var o=Number(s);isNaN(o)?i.push(s):i.push(o)}}}else for(r=1;r<a.length;++r){var s;if((s=a[r]).startsWith("'")&&s.endsWith("'")||s.startsWith('"')&&s.endsWith('"'))i.push(s.slice(1,-1));else{o=Number(s);isNaN(o)?i.push(s):i.push(o)}}if(null==Object(_Script__WEBPACK_IMPORTED_MODULE_16__.d)(e,i,t)){for(r=0;r<t.scripts.length;r++)if(t.scripts[r].filename==e){var l=t.scripts[r],c=l.ramUsage*n,u=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Need root access to run script");if(c>u)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("This machine does not have enough RAM to run this script with "+n+" threads. Script requires "+c+"GB of RAM");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Running script with "+n+" thread(s) and args: "+Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_27__.arrayToString)(i)+"."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("May take a few seconds to start up the process...");var p=new _Script__WEBPACK_IMPORTED_MODULE_16__.b(l,i);return p.threads=n,t.runningScripts.push(p),void Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_13__.c)(p,t)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("ERROR: No such script")}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("ERROR: There's already a Coding Contract in Progress");const t=_Player__WEBPACK_IMPORTED_MODULE_14__.a.getCurrentServer(),n=t.getContract(e);if(null==n)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("ERROR: No such contract");switch(Terminal.contractOpen=!0,await n.prompt()){case _CodingContracts__WEBPACK_IMPORTED_MODULE_1__.CodingContractResult.Success:var i=_Player__WEBPACK_IMPORTED_MODULE_14__.a.gainCodingContractReward(n.reward,n.getDifficulty());Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)(`Contract SUCCESS - ${i}`),t.removeContract(n);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_1__.CodingContractResult.Failure:++n.tries,n.tries>=n.getMaxNumTries()?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.post)("Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing"),t.removeContract(n)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_31__.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_31__.post)("Contract cancelled")}Terminal.contractOpen=!1,console.log(Terminal.contractOpen)}}}).call(this,__webpack_require__(72))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2);t.appendLineBreaks=function(e,t){for(let n=0;n<t;++n)e.appendChild(i.createElement("br"))}},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 i=n(0),a=n(35),r=n(7);function o(e,t,n){return`ERROR: bladeburner.${e}() failed due to an invalid action specified. `+`Type: ${t}, Name: ${n}. Note that for contracts and operations, the `+"name of the operation is case-sensitive."}function s(e,t){return`bladeburner.${e}() failed with exception: `+t}function l(e,t){const n=`${t}() failed because you do not`+" currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7";if(!(i.a.bladeburner instanceof a.a&&(7===i.a.bitNodeN||i.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 i=n(1),a=n(133),r=n(15);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=a.FactionInfos[this.name];if(null==e)throw new Error(`Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`);return e}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2===e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);var e=0,t=this.playerReputation+this.rolloverRep;let n=i.CONSTANTS.FactionReputationToFavorBase*Math.pow(i.CONSTANTS.FactionReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=i.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){return`[${e.join(", ")}]`}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return O}),n.d(t,"c",function(){return h}),n.d(t,"d",function(){return g}),n.d(t,"b",function(){return d});var i=n(1),a=n(11),r=n(51),o=n(0),s=n(9),l=n(21),c=n(74),u=n(3),p=n(17),m=n(44);n(300);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"},y="Attacking",f="Scanning",b="Weakening",E="Fortifying",v="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 O(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var n=0;n<8;++n)for(var a=0;a<8;++a)this.availablePositions.push([n,a]);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/i.CONSTANTS.HackingMissionRepToDiffConversion+1,console.log("difficulty: "+this.difficulty),this.reward=250+e/i.CONSTANTS.HackingMissionRepToRewardConversion}function C(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")},O.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 i=Math.min(8,Math.max(1,Math.round(this.difficulty/4))),a=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=i+a+r,l=7-Math.floor(s/8),u=Object(c.addOffset)(.8+this.difficulty/5,10);for(t=0;t<i;++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<a;++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()},O.prototype.createPageDom=function(){var e=document.getElementById("mission-container"),t=1+this.faction.favor/100,n=this.reward*o.a.faction_rep_mult*t,a=document.createElement("p");a.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.",a.style.display="block",a.classList.add("hack-mission-header-element"),a.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)(i.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 O=document.createElement("span");O.classList.add("tooltiptexthigh"),O.innerText="Lowers the targeted node's attack. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[2].appendChild(O),this.actionButtons[3].innerText="Fortify(f)";var C=document.createElement("span");C.classList.add("tooltiptexthigh"),C.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(C),this.actionButtons[4].innerText="Overflow(r)";var T=document.createElement("span");T.classList.add("tooltiptexthigh"),T.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(T),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(y,!1),this.selectedNode.forEach(function(e){e.action=y})):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(f,!1),this.selectedNode.forEach(function(e){e.action=f}))}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(E,!1),this.selectedNode.forEach(function(e){e.action=E})):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(v,!1),this.selectedNode.forEach(function(e){e.action=v}))}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=E}):console.log("ERR: Pressing Action button without selected node")});var A=document.createElement("p");e.appendChild(a),e.appendChild(r),e.appendChild(l),e.appendChild(c),e.appendChild(p),e.appendChild(m),e.appendChild(h),e.appendChild(A)},O.prototype.setActionButtonsInactive=function(){for(var e=0;e<this.actionButtons.length;++e)this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive")},O.prototype.setActionButtonsActive=function(e=null){for(var t=0;t<this.actionButtons.length;++t)this.actionButtons[t].classList.add("a-link-button"),this.actionButtons[t].classList.remove("a-link-button-inactive");if(e)switch(e){case _.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")}},O.prototype.setActionButton=function(e,t=!0){if(Object(m.isString)(e))switch(e){case y:e=0;break;case f:e=1;break;case b:e=2;break;case E:e=3;break;case v:default:e=4}t?(this.actionButtons[e].classList.remove("a-link-button-inactive"),this.actionButtons[e].classList.add("a-link-button")):(this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive"))},O.prototype.calculateAttacks=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].atk;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].atk;this.playerAtk=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(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)},O.prototype.calculateDefenses=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].def;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].def;this.playerDef=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(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)},O.prototype.removeAvailablePosition=function(e,t){for(var n=0;n<this.availablePositions.length;++n)if(this.availablePositions[n][0]===e&&this.availablePositions[n][1]===t)return void this.availablePositions.splice(n,1);console.log("WARNING: removeAvailablePosition() did not remove "+e+", "+t)},O.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")},O.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 i=this.availablePositions.splice(n,1);i=i[0],this.setNodePosition(e,i[0],i[1])},O.prototype.createMap=function(){var e=document.createElement("div");e.classList.add("hack-mission-grid"),e.setAttribute("id","hacking-mission-map"),document.getElementById("mission-container").appendChild(e);for(var t=(this.playerAtk+this.enemyAtk)/2,n=0;n<8;++n)for(var i=0;i<8;++i)if(!(this.map[n][i]instanceof k)){var a,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)};a=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)};a=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)};a=new k(_.Shield,s)}this.setNodePosition(a,n,i),this.removeAvailablePosition(n,i),this.miscNodes.push(a)}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)},O.prototype.createNodeDomElement=function(e){var t=document.createElement("a"),n=document.createElement("p");e.el=t;var i,a="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1];switch(t.setAttribute("id",a),n.setAttribute("id",a+"-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:i="CPU Core<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-cpu-node");break;case _.Firewall:i="Firewall<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-firewall-node");break;case _.Database:i="Database<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-database-node");break;case _.Spam:i="Spam<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-spam-node");break;case _.Transfer:i="Transfer<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-transfer-node");break;case _.Shield:default:i="Shield<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-shield-node")}i+="<br>Atk: "+Object(u.formatNumber)(e.atk,1)+"<br>Def: "+Object(u.formatNumber)(e.def,1),n.innerHTML=i,t.appendChild(n),document.getElementById("hacking-mission-map").appendChild(t)},O.prototype.updateNodeDomElement=function(e){if(null!=e.el){var t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],i=(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),i.innerHTML=t}else console.log("ERR: Calling updateNodeDomElement on a Node without an element")},O.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],i=t[1];return isNaN(n)||isNaN(i)||n>=8||i>=8||n<0||i<0?(console.log("ERROR: Unexpected values for x and y: "+n+", "+i),null):this.map[n][i]},O.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.log("Error getting Node object");var t=this;function n(){!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.log("Error getting Node object"),n.plyrCtrl&&(C(e),n.select(e.actionButtons),e.selectedNode.push(n))}(t,e)}e.addEventListener("click",n),e.addEventListener("dblclick",function(){!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.log("ERROR: Getting Node Object in multiselectNode()"),n.plyrCtrl){C(e);var i=n.type;i===_.Core?e.playerCores.forEach(function(t){t.select(e.actionButtons),e.selectedNode.push(t)}):e.playerNodes.forEach(function(t){t.type===i&&(t.select(e.actionButtons),e.selectedNode.push(t))})}}(t,e)}),e.firstChild&&e.firstChild.addEventListener("click",n)},O.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n<this.selectedNode.length;++n)if(this.selectedNode[n]==t){t.deselect(this.actionButtons),this.selectedNode.splice(n,1);break}},O.prototype.nodeReachable=function(e){var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].plyrCtrl)||(!!(t<7&&this.map[t+1][n].plyrCtrl)||(!!(n>0&&this.map[t][n-1].plyrCtrl)||!!(n<7&&this.map[t][n+1].plyrCtrl)))},O.prototype.nodeReachableByEnemy=function(e){if(null==e)return!1;var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].enmyCtrl)||(!!(t<7&&this.map[t+1][n].enmyCtrl)||(!!(n>0&&this.map[t][n-1].enmyCtrl)||!!(n<7&&this.map[t][n+1].enmyCtrl)))},O.prototype.start=function(){this.started=!0,this.initJsPlumb();var e=Object(l.clearEventListeners)("hack-mission-start-btn");e.classList.remove("a-link-button"),e.classList.add("a-link-button-inactive")},O.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t<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",function(e,t){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()})},O.prototype.dropAllConnectionsFromNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].source==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1])},O.prototype.dropAllConnectionsToNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].target==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1]);e.beingTargeted=!1};var T=0;O.prototype.process=function(e=1){if(this.started&&!((T+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,T)}),this.playerNodes.forEach(e=>{e.type!==_.Transfer&&e.type!==_.Shield&&e.type!==_.Firewall||(t|=this.processNode(e,T))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,T)}),this.enemyNodes.forEach(e=>{e.type!==_.Transfer&&e.type!==_.Shield&&e.type!==_.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,T))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*T,e.hp+=.1*T}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*T,e.maxhp+=.05*T,e.hp+=.1*T,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=T*a.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),T=0)):this.finishMission(!1):this.finishMission(!0)}},O.prototype.processNode=function(e,t=1){if(null!=e.action){var n,a,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,a=this.enemyAtk):r.enmyCtrl?(n=this.enemyDef,a=this.playerAtk):(n=r.def,a=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*i.CONSTANTS.HackingMissionDifficultyToHacking;switch(e.action){case y:if(null==r)break;if(null==e.conn)break;var u=this.calculateAttackDamage(a,n,l?o.a.hacking_skill:c);r.hp-=u/5*t;break;case f:if(null==r)break;if(null==e.conn)break;var p=this.calculateScanEffect(a,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(a,n,l?o.a.hacking_skill:c);r.atk-=p/5*t,s=!0;break;case E:p=this.calculateFortifyEffect(o.a.hacking_skill);e.def+=p/5*t,s=!0;break;case v: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 i=0;i<e.length;++i)if(e[i]==n){var a=e.splice(i,1);a=a[0],t.push(a);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+=i.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*=i.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configurePlayerNodeElement(r.el)):(d(h?this.miscNodes:this.playerNodes,this.enemyNodes,r),this.enemyCores.forEach(function(e){e.atk*=i.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*=i.CONSTANTS.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),r&&this.updateNodeDomElement(r),s}},O.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=E}else{var i;null==(i=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.log("Error getting Target node Object in enemyAISelectAction()"),i.def>this.enemyAtk+15?e.def<50?e.action=E:e.action=v:Math.abs(i.def-this.enemyAtk)<=15?e.action=f:e.action=y}break;case _.Transfer:e.def<125?e.action=E:e.action=v;break;case _.Firewall:case _.Shield:e.action=E}};O.prototype.calculateAttackDamage=function(e,t,n=0){return Math.max(.55*(e+n/80-t),1)},O.prototype.calculateScanEffect=function(e,t,n=0){return Math.max(.6*(e+n/25-.95*t),2)},O.prototype.calculateWeakenEffect=function(e,t,n=0){return Math.max(e+n/25-.95*t,2)},O.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},O.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},O.prototype.updateTimer=function(){var e=document.getElementById("hacking-mission-timer"),t=Math.round(this.time/1e3),n=Math.trunc(t/60);t%=60;var i=("0"+n).slice(-2)+":"+("0"+t).slice(-2);e.innerText="Time left: "+i},O.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*i.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",a.Engine.loadFactionContent(),Object(r.a)(this.faction.name)}}).call(this,n(72))},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 i=n(18),a=n(14),r=n(89),o=n(6),s=n(10),l=n(1),c=n(16),u=n(47),p=n(30),m=n(0),h=n(100),d=n(82),g=n(33),_=(n(12),n(45)),y=n(19),f=n(83),b=n(9),E=n(86),v=(n(15),n(3)),k=n(87),O=n(2),C=n(44),T=n(27);function S(e){var t=e.name;a.Augmentations[t]=e}function M(){for(var e in c.Factions)c.Factions.hasOwnProperty(e)&&(c.Factions[e].augmentations=[]);Object(k.clearObject)(a.Augmentations);var t=new i.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 a.Augmentations[o.AugmentationNames.HemoRecirculator],S(t);var n=new i.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 a.Augmentations[o.AugmentationNames.Targeting1],S(n);var r=new i.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 a.Augmentations[o.AugmentationNames.Targeting2],S(r);var u=new i.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 a.Augmentations[o.AugmentationNames.Targeting3],S(u);var p=new i.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 a.Augmentations[o.AugmentationNames.SyntheticHeart],S(p);var h=new i.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 a.Augmentations[o.AugmentationNames.SynfibrilMuscle],S(h);var d=new i.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 a.Augmentations[o.AugmentationNames.CombatRib1],S(d);var g=new i.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 a.Augmentations[o.AugmentationNames.CombatRib2],S(g);var _=new i.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 a.Augmentations[o.AugmentationNames.CombatRib3],S(_);var y=new i.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});y.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 a.Augmentations[o.AugmentationNames.NanofiberWeave],S(y);var f=new i.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});f.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),x(o.AugmentationNames.SubdermalArmor)&&delete a.Augmentations[o.AugmentationNames.SubdermalArmor],S(f);var b=new i.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 a.Augmentations[o.AugmentationNames.WiredReflexes],S(b);var E=new i.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});E.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),x(o.AugmentationNames.GrapheneBoneLacings)&&delete a.Augmentations[o.AugmentationNames.GrapheneBoneLacings],S(E);var v=new i.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});v.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(o.AugmentationNames.BionicSpine)&&delete a.Augmentations[o.AugmentationNames.BionicSpine],S(v);var O=new i.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});O.addToFactions(["Fulcrum Secret Technologies","ECorp"]),x(o.AugmentationNames.GrapheneBionicSpine)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicSpine],S(O);var C=new i.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});C.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(o.AugmentationNames.BionicLegs)&&delete a.Augmentations[o.AugmentationNames.BionicLegs],S(C);var T=new i.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});T.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),x(o.AugmentationNames.GrapheneBionicLegs)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicLegs],S(T);var M=new i.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 a.Augmentations[o.AugmentationNames.SpeechProcessor],S(M);let A=new i.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 a.Augmentations[o.AugmentationNames.TITN41Injection],S(A);var w=new i.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 a.Augmentations[o.AugmentationNames.EnhancedSocialInteractionImplant],S(w);var R=new i.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 a.Augmentations[o.AugmentationNames.BitWire],S(R);var N=new i.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 a.Augmentations[o.AugmentationNames.ArtificialBioNeuralNetwork],S(N);var I=new i.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 a.Augmentations[o.AugmentationNames.ArtificialSynapticPotentiation],S(I);var L=new i.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 a.Augmentations[o.AugmentationNames.EnhancedMyelinSheathing],S(L);var D=new i.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 a.Augmentations[o.AugmentationNames.SynapticEnhancement],S(D);var B=new i.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 a.Augmentations[o.AugmentationNames.NeuralRetentionEnhancement],S(B);var j=new i.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});j.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),x(o.AugmentationNames.DataJack)&&delete a.Augmentations[o.AugmentationNames.DataJack],S(j);var W=new i.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});W.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),x(o.AugmentationNames.ENM)&&delete a.Augmentations[o.AugmentationNames.ENM],S(W);var F=new i.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 a.Augmentations[o.AugmentationNames.ENMCore],S(F);var U=new i.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 a.Augmentations[o.AugmentationNames.ENMCoreV2],S(U);var H=new i.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 a.Augmentations[o.AugmentationNames.ENMCoreV3],S(H);var G=new i.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 a.Augmentations[o.AugmentationNames.ENMAnalyzeEngine],S(G);var K=new i.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 a.Augmentations[o.AugmentationNames.ENMDMA],S(K);var q=new i.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 a.Augmentations[o.AugmentationNames.Neuralstimulator],S(q);var $=new i.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 a.Augmentations[o.AugmentationNames.NeuralAccelerator],S($);var Y=new i.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 a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG1],S(Y);var z=new i.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 a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG2],S(z);var V=new i.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 a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG3],S(V);var J=new i.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 a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG4],S(J);var X=new i.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 a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG5],S(X);var Q=new i.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 a.Augmentations[o.AugmentationNames.NeuronalDensification],S(Q);var Z=new i.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 a.Augmentations[o.AugmentationNames.NuoptimalInjectorImplant],S(Z);var ee=new i.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 a.Augmentations[o.AugmentationNames.SpeechEnhancement],S(ee);var te=new i.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 a.Augmentations[o.AugmentationNames.FocusWire],S(te);var ne=new i.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 a.Augmentations[o.AugmentationNames.PCDNI],S(ne);var ie=new i.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});ie.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),x(o.AugmentationNames.PCDNIOptimizer)&&delete a.Augmentations[o.AugmentationNames.PCDNIOptimizer],S(ie);var ae=new i.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});ae.addToFactions(["Fulcrum Secret Technologies"]),x(o.AugmentationNames.PCDNINeuralNetwork)&&delete a.Augmentations[o.AugmentationNames.PCDNINeuralNetwork],S(ae);var re=new i.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 a.Augmentations[o.AugmentationNames.ADRPheromone1],S(re);var oe=new i.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 a.Augmentations[o.AugmentationNames.ADRPheromone2],S(oe);var se=new i.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 a.Augmentations[o.AugmentationNames.HacknetNodeCPUUpload],S(se);var le=new i.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 a.Augmentations[o.AugmentationNames.HacknetNodeCacheUpload],S(le);var ce=new i.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 a.Augmentations[o.AugmentationNames.HacknetNodeNICUpload],S(ce);var ue=new i.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 a.Augmentations[o.AugmentationNames.HacknetNodeKernelDNI],S(ue);var pe=new i.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 a.Augmentations[o.AugmentationNames.HacknetNodeCoreDNI],S(pe);var me=new i.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 a.Augmentations[o.AugmentationNames.NeuroFluxGovernor],me.addToAllFactions(),S(me);var ge=new i.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 a.Augmentations[o.AugmentationNames.Neurotrainer1],S(ge);var _e=new i.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 a.Augmentations[o.AugmentationNames.Neurotrainer2],S(_e);var ye=new i.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});ye.addToFactions(["NWO","Four Sigma"]),x(o.AugmentationNames.Neurotrainer3)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer3],S(ye);var fe=new i.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});fe.addToFactions(["Blade Industries","KuaiGong International"]),x(o.AugmentationNames.Hypersight)&&delete a.Augmentations[o.AugmentationNames.Hypersight],S(fe);var be=new i.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 a.Augmentations[o.AugmentationNames.LuminCloaking1],S(be);var Ee=new i.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});Ee.addToFactions(["Slum Snakes","Tetrads"]),x(o.AugmentationNames.LuminCloaking2)&&delete a.Augmentations[o.AugmentationNames.LuminCloaking2],S(Ee);var ve=new i.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});ve.addToFactions(["Slum Snakes"]),x(o.AugmentationNames.SmartSonar)&&delete a.Augmentations[o.AugmentationNames.SmartSonar],S(ve);var ke=new i.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 a.Augmentations[o.AugmentationNames.PowerRecirculator],S(ke);var Oe=new i.Augmentation({name:o.AugmentationNames.QLink,repCost:75e4,moneyCost:13e8,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.<br><br>This augmentation:<br>Increases the player's hacking speed by 10%.<br>Increases the player's chance of successfully performing a hack by 30%.<br>Increases the amount of money the player gains from hacking by 100%.",hacking_speed_mult:1.1,hacking_chance_mult:1.3,hacking_money_mult:2});Oe.addToFactions(["Illuminati"]),x(o.AugmentationNames.QLink)&&delete a.Augmentations[o.AugmentationNames.QLink],S(Oe);var Ce=new i.Augmentation({name:o.AugmentationNames.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Ce.addToFactions(["Daedalus"]),x(o.AugmentationNames.TheRedPill)&&delete a.Augmentations[o.AugmentationNames.TheRedPill],S(Ce);var Te=new i.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});Te.addToFactions(["The Covenant"]),x(o.AugmentationNames.SPTN97)&&delete a.Augmentations[o.AugmentationNames.SPTN97],S(Te);var Se=new i.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 a.Augmentations[o.AugmentationNames.HiveMind],S(Se);var Me=new i.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 a.Augmentations[o.AugmentationNames.CordiARCReactor],S(Me);var Pe=new i.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 a.Augmentations[o.AugmentationNames.SmartJaw],S(Pe);var Ae=new i.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 a.Augmentations[o.AugmentationNames.Neotra],S(Ae);var we=new i.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 a.Augmentations[o.AugmentationNames.Xanipher],S(we);var xe=new i.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 a.Augmentations[o.AugmentationNames.nextSENS],S(xe);var Re=new i.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 a.Augmentations[o.AugmentationNames.OmniTekInfoLoad],S(Re);var Ne=new i.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 a.Augmentations[o.AugmentationNames.PhotosyntheticCells],S(Ne);var Ie=new i.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 a.Augmentations[o.AugmentationNames.Neurolink],S(Ie);var Le=new i.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 a.Augmentations[o.AugmentationNames.TheBlackHand],S(Le);var De=new i.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 a.Augmentations[o.AugmentationNames.CRTX42AA],S(De);var Be=new i.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 a.Augmentations[o.AugmentationNames.Neuregen],S(Be);var je=new i.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."});je.addToFactions(["Sector-12"]),x(o.AugmentationNames.CashRoot)&&delete a.Augmentations[o.AugmentationNames.CashRoot],S(je);var We=new i.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});We.addToFactions(["New Tokyo"]),x(o.AugmentationNames.NutriGen)&&delete a.Augmentations[o.AugmentationNames.NutriGen],S(We);var Fe=new i.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 a.Augmentations[o.AugmentationNames.INFRARet],S(Fe);var Ue=new i.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 a.Augmentations[o.AugmentationNames.DermaForce],S(Ue);var He=new i.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 a.Augmentations[o.AugmentationNames.GrapheneBrachiBlades],S(He);var Ge=new i.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 a.Augmentations[o.AugmentationNames.GrapheneBionicArms],S(Ge);var Ke=new i.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 a.Augmentations[o.AugmentationNames.BrachiBlades],S(Ke);var qe=new i.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 a.Augmentations[o.AugmentationNames.BionicArms],S(qe);var $e=new i.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 a.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(a.Augmentations),c.Factions.Tetrads.addAllAugmentations(a.Augmentations),c.Factions["The Syndicate"].addAllAugmentations(a.Augmentations),c.Factions["The Dark Army"].addAllAugmentations(a.Augmentations),c.Factions["Speakers for the Dead"].addAllAugmentations(a.Augmentations),c.Factions.NiteSec.addAllAugmentations(a.Augmentations),c.Factions["The Black Hand"].addAllAugmentations(a.Augmentations));if(Object(c.factionExists)("Bladeburners")){var Ye=new i.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 i.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 i.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 i.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 i.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 i.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 i.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 i.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 i.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 i.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 it=new i.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});it.addToFactions(["Bladeburners"]),P(it);var at=new i.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});at.addToFactions(["Bladeburners"]),P(at);var rt=new i.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 i.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 i.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 i.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 i.Augmentation({name:o.AugmentationNames.BladesSimulacrum,repCost:3e3,moneyCost:8e10,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 a.Augmentations)a.Augmentations.hasOwnProperty(e)&&(a.Augmentations[e].baseCost*=ut);m.a.reapplyAllAugmentations()}function P(e){if(!(e instanceof i.Augmentation))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;x(t)&&delete a.Augmentations[t],S(e)}function A(e,t=!1){a.Augmentations[e.name].owned=!0;const n=a.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){a.Augmentations[e.name].level=e.level;for(var i=0;i<m.a.augmentations.length;++i)if(m.a.augmentations[i].name==o.AugmentationNames.NeuroFluxGovernor){m.a.augmentations[i].level=e.level;break}}if(e.name===o.AugmentationNames.NeuroFluxGovernor)for(i=0;i<m.a.augmentations.length;++i)if(m.a.augmentations[i].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 i=a.Augmentations[m.a.queuedAugmentations[n].name];null!=i?(A(m.a.queuedAugmentations[n]),t+=i.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(C.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.b(o,[]);s.threads=1,r.runningScripts.push(s),Object(p.c)(s,r)}}}function x(e){return a.Augmentations.hasOwnProperty(e)}function R(e){Object(T.removeChildrenFromElement)(e),e.appendChild(Object(O.createElement)("h1",{innerText:"Purchased Augmentations"}));var t="\n";(6===m.a.bitNodeN||u.c)&&(t="Bladeburner Progress\n\n"),e.appendChild(Object(O.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(O.createElement)("a",{class:"a-link-button",innerText:"Install Augmentations",tooltip:"'I never asked for this'",clickListener:()=>(w(),!1)})),e.appendChild(Object(O.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(O.createElement)("ul",{class:"augmentations-list"}),i=0;i<m.a.queuedAugmentations.length;++i){var r=m.a.queuedAugmentations[i].name,s=a.Augmentations[r],l=r;r===o.AugmentationNames.NeuroFluxGovernor&&(l+=" - Level "+m.a.queuedAugmentations[i].level);var c=Object(E.createAccordionElement)({hdrText:l,panelText:s.info});n.appendChild(c[0])}e.appendChild(n),e.appendChild(Object(O.createElement)("h1",{innerText:"Installed Augmentations",marginTop:"8px"})),e.appendChild(Object(O.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(O.createElement)("ul",{class:"augmentations-list"});e.appendChild(Object(O.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(O.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(O.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(T.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),y.Settings.OwnedAugmentationsOrder=_.OwnedAugmentationsOrderSetting.Alphabetically}});e.appendChild(h);const g=Object(O.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(T.removeChildrenFromElement)(p),I(p,m.a.sourceFiles),N(p,m.a.augmentations),y.Settings.OwnedAugmentationsOrder=_.OwnedAugmentationsOrderSetting.AcquirementTime}});e.appendChild(g),y.Settings.OwnedAugmentationsOrder===_.OwnedAugmentationsOrderSetting.Alphabetically?h.click():g.click(),e.appendChild(p),e.appendChild(Object(O.createElement)("p",{display:"block",innerHTML:"<br><br><strong><u>Total Multipliers:</u></strong><br>Hacking Chance multiplier: "+Object(v.formatNumber)(100*m.a.hacking_chance_mult,2)+"%<br>Hacking Speed multiplier: "+Object(v.formatNumber)(100*m.a.hacking_speed_mult,2)+"%<br>Hacking Money multiplier: "+Object(v.formatNumber)(100*m.a.hacking_money_mult,2)+"%<br>Hacking Growth multiplier: "+Object(v.formatNumber)(100*m.a.hacking_grow_mult,2)+"%<br><br>Hacking Level multiplier: "+Object(v.formatNumber)(100*m.a.hacking_mult,2)+"%<br>Hacking Experience multiplier: "+Object(v.formatNumber)(100*m.a.hacking_exp_mult,2)+"%<br><br>Strength Level multiplier: "+Object(v.formatNumber)(100*m.a.strength_mult,2)+"%<br>Strength Experience multiplier: "+Object(v.formatNumber)(100*m.a.strength_exp_mult,2)+"%<br><br>Defense Level multiplier: "+Object(v.formatNumber)(100*m.a.defense_mult,2)+"%<br>Defense Experience multiplier: "+Object(v.formatNumber)(100*m.a.defense_exp_mult,2)+"%<br><br>Dexterity Level multiplier: "+Object(v.formatNumber)(100*m.a.dexterity_mult,2)+"%<br>Dexterity Experience multiplier: "+Object(v.formatNumber)(100*m.a.dexterity_exp_mult,2)+"%<br><br>Agility Level multiplier: "+Object(v.formatNumber)(100*m.a.agility_mult,2)+"%<br>Agility Experience multiplier: "+Object(v.formatNumber)(100*m.a.agility_exp_mult,2)+"%<br><br>Charisma Level multiplier: "+Object(v.formatNumber)(100*m.a.charisma_mult,2)+"%<br>Charisma Experience multiplier: "+Object(v.formatNumber)(100*m.a.charisma_exp_mult,2)+"%<br><br>Hacknet Node production multiplier: "+Object(v.formatNumber)(100*m.a.hacknet_node_money_mult,2)+"%<br>Hacknet Node purchase cost multiplier: "+Object(v.formatNumber)(100*m.a.hacknet_node_purchase_cost_mult,2)+"%<br>Hacknet Node RAM upgrade cost multiplier: "+Object(v.formatNumber)(100*m.a.hacknet_node_ram_cost_mult,2)+"%<br>Hacknet Node Core purchase cost multiplier: "+Object(v.formatNumber)(100*m.a.hacknet_node_core_cost_mult,2)+"%<br>Hacknet Node level upgrade cost multiplier: "+Object(v.formatNumber)(100*m.a.hacknet_node_level_cost_mult,2)+"%<br><br>Company reputation gain multiplier: "+Object(v.formatNumber)(100*m.a.company_rep_mult,2)+"%<br>Faction reputation gain multiplier: "+Object(v.formatNumber)(100*m.a.faction_rep_mult,2)+"%<br>Salary multiplier: "+Object(v.formatNumber)(100*m.a.work_money_mult,2)+"%<br>Crime success multiplier: "+Object(v.formatNumber)(100*m.a.crime_success_mult,2)+"%<br>Crime money multiplier: "+Object(v.formatNumber)(100*m.a.crime_money_mult,2)+"%<br><br><br>"}))}function N(e,t){for(var n=0;n<t.length;++n){var i=t[n].name,r=a.Augmentations[i],s=i;i===o.AugmentationNames.NeuroFluxGovernor&&(s+=" - Level "+t[n].level);var l=Object(E.createAccordionElement)({hdrText:s,panelText:r.info});e.appendChild(l[0])}}function I(e,t){for(var n=0;n<t.length;++n){var i="SourceFile"+t[n].n,a=f.a[i];if(null==a){console.log("ERROR: Invalid source file number: "+t[n].n);continue}const o=12==t[n].n?"∞":"3";var r=Object(E.createAccordionElement)({hdrText:a.name+"<br>Level "+t[n].lvl+" / "+o,panelText:a.info});e.appendChild(r[0])}}},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";(function(e){n.d(t,"b",function(){return g}),n.d(t,"a",function(){return _});var i=n(69),a=n(11),r=n(0),o=n(100),s=n(83),l=n(157),c=n(58),u=n(21),p=n(9),m=n(27),h=n(22);function d(e){return new Promise(function(t,n){var i=document.getElementById("red-pill-content"),a=document.createElement("p");i.appendChild(a),function e(t,n,i=0){return new Promise(function(a,r){setTimeout(function(){if(i>=n.length){var o=n.substring(0,i);return t.innerHTML="> "+o,a(!0)}var o=n.substring(0,i);t.innerHTML="> "+o+"<span class='typed-cursor'> &#9608; </span>";var s=e(t,n,i+1);s.then(function(e){a(e)},function(e){r(e)})},30)})}(a,e,0).then(function(e){t(e)},function(e){n(e)})})}let g=!1;function _(e,t=!1){var n=document.getElementById("red-pill-content");return Object(m.removeChildrenFromElement)(n),g=!0,a.Engine.loadRedPillContent(),d("[ERROR] SEMPOOL INVALID").then(function(){return d("[ERROR] Segmentation Fault")}).then(function(){return d("[ERROR] SIGKILL RECVD")}).then(function(){return d("Dumping core...")}).then(function(){return d("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return d("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return d("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return d("----------------------------------------")}).then(function(){return d("Failsafe initiated...")}).then(function(){return d("Restarting BitNode-"+e+"...")}).then(function(){return d("...........")}).then(function(){return d("...........")}).then(function(){return d("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return d("..............................................")}).then(function(){return d("..............................................")}).then(function(){return function(e,t=!1){var n=document.getElementById("red-pill-content");Object(m.removeChildrenFromElement)(n);for(var a=document.createElement("pre"),r=[],o=1;o<=12;++o)r.push(y(o));a.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(a);for(var o=1;o<=12;++o)!function(n){var a="bitnode-"+n.toString(),r=Object(u.clearEventListeners)(a);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 a="BitNode"+n,r=i.a[a];null!=r?(Object(h.yesNoBoxCreate)("BitNode-"+n+": "+r.name+"<br><br>"+r.info),f(n,e,t)):console.log("ERROR: Could not find BitNode object for number: "+n)}):r.addEventListener("click",function(){Object(p.dialogBoxCreate)("Not yet implemented! Coming soon!")}))}(o);return d("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function(){return d("Our species fought back, but it was futile. The Enders had technology far beyond our own...")}).then(function(){return d("Instead of killing every last one of us, the human race was enslaved...")}).then(function(){return d("We were shackled in a digital world, chained into a prison for our minds...")}).then(function(){return d("Using their advanced technology, the Enders created complex simulations of a virtual reality...")}).then(function(){return d("Simulations designed to keep us content...ignorant of the truth.")}).then(function(){return d("Simulations used to trap and suppress our consciousness, to keep us under control...")}).then(function(){return d("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.")}).then(function(){return d("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...")}).then(function(){return d("Only then can we begin to fight back...")}).then(function(){return d("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...")}).then(function(){return d("But there is still a long way to go...")}).then(function(){return d("The technology the Enders used to enslave the human race wasn't just a single complex simulation...")}).then(function(){return d("There are tens if not hundreds of BitNodes out there...")}).then(function(){return d("Each with their own simulations of a reality...")}).then(function(){return d("Each creating their own universes...a universe of universes")}).then(function(){return d("And all of which must be destroyed...")}).then(function(){return d(".......................................")}).then(function(){return d("Welcome to the Bitverse...")}).then(function(){return d(" ")}).then(function(){return d("(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=i.a[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 f(t,n,i=!1){var a=Object(h.yesNoBoxGetYesButton)();a.innerHTML="Enter BitNode-"+t,a.addEventListener("click",function(){i?r.a.gainIntelligenceExp(-5):function(e){var t="SourceFile"+e.toString(),n=s.a[t];if(null!=n){for(var i=!1,a=null,o=0;o<r.a.sourceFiles.length;++o)if(r.a.sourceFiles[o].n===e){i=!0,a=r.a.sourceFiles[o];break}if(i&&a)a.lvl>=3&&12!==a.n?Object(p.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++a.lvl,Object(p.dialogBoxCreate)(n.name+" was upgraded to level "+a.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(p.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),g=!1;var a=document.getElementById("red-pill-content");Object(m.removeChildrenFromElement)(a),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(h.yesNoBoxClose)()});var u=Object(h.yesNoBoxGetNoButton)();u.innerHTML="Back",u.addEventListener("click",function(){Object(h.yesNoBoxClose)()})}}).call(this,n(72))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"a",function(){return Corporation});var _CorporationState__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(141),_CorporationState__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_CorporationState__WEBPACK_IMPORTED_MODULE_0__),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(124),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(123),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(31),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__),_IndustryData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(25),_IndustryData__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_4__),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(122),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(71),_Material__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_6__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(85),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__),_Product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(121),_Product__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_8__),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(114),_ResearchMap__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_ResearchMap__WEBPACK_IMPORTED_MODULE_9__),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(10),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_10__),_Constants__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(1),_Constants__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_11__),_Faction_Factions__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(16),_Faction_Factions__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Faction_Factions__WEBPACK_IMPORTED_MODULE_12__),_Literature__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(96),_Locations__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(5),_Locations__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Locations__WEBPACK_IMPORTED_MODULE_14__),_Player__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(0),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(4),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(13),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(9),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(164),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_19__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(15),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(59),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(2),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(40),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(78),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(3),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(17),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(44),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(29),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(27),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(66),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_30__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(23),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(22),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__),decimal_js__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(39);const INITIALSHARES=1e9,SHARESPERPRICEUPDATE=1e6,IssueNewSharesCooldown=216e3,SellSharesCooldown=18e3,CyclesPerMarketCycle=75,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,CyclesPerEmployeeRaise=400,EmployeeRaiseAmount=50;$(document).mousedown(function(e){researchTreeBoxOpened&&null==$(e.target).closest("#corporation-research-popup-box-content").get(0)&&(Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_30__.removeElement)(researchTreeBox),researchTreeBox=null,researchTreeBoxOpened=!1)});var empManualAssignmentModeActive=!1;function Industry(e={}){this.offices={[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Aevum]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Chongqing]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Sector12]:new OfficeSpace({loc:_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Sector12,size:OfficeInitialSize}),[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.NewTokyo]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Ishima]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Volhaven]:0},this.warehouses={[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Aevum]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Chonqing]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Sector12]:new Warehouse({loc:_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Sector12,size:WarehouseInitialSize}),[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.NewTokyo]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Ishima]:0,[_Locations__WEBPACK_IMPORTED_MODULE_14__.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_33__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.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.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_26__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.age=e.age?e.age:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(20,50),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.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=.1,this.aiFac=.15,this.robFac=.05,this.reqMats={Hardware:.5,Energy:1},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.calculateProductionFactors=function(){for(var e=0,t=0;t<Cities.length;++t){var n=Cities[t],i=this.warehouses[n];if(i instanceof Warehouse){var a=i.materials,r=(this.offices[n],Math.pow(.002*a.RealEstate.qty+1,this.reFac)*Math.pow(.002*a.Hardware.qty+1,this.hwFac)*Math.pow(.002*a.Robots.qty+1,this.robFac)*Math.pow(.002*a.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&&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_25__.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 i=this.processMaterials(e,n);this.thisCycleRevenue=this.thisCycleRevenue.plus(i[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(i[1]),i=this.processProducts(e,n),this.thisCycleRevenue=this.thisCycleRevenue.plus(i[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(i[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_18__.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_33__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var a=0;for(var r in this.offices)this.offices.hasOwnProperty(r)&&this.offices[r]instanceof OfficeSpace&&(a+=this.offices[r].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(a),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,i=0;i<Cities.length;++i)if(this.warehouses[Cities[i]]instanceof Warehouse){var a=this.warehouses[Cities[i]];for(var r in t)t.hasOwnProperty(r)&&a.materials[r].processMarket();for(var o=0;o<n.length;++o)a.materials[n[o]].processMarket();a.materials.Hardware.processMarket(),a.materials.Robots.processMarket(),a.materials.AICores.processMarket(),a.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],i=4e-4*Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.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||(i*=3),i*=e,n.dmd-=i,n.cmp+=i,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(var i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city];if(this.warehouses[city]instanceof 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(var i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city];if(this.warehouses[city]instanceof 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,i,a=warehouse.materials[e];warehouse.smartSupplyEnabled&&Object.keys(t.reqMats).includes(e)?(a.buy=t.reqMats[e]*warehouse.smartSupplyStore,i=a.buy*SecsPerMarketCycle*marketCycles):i=a.buy*SecsPerMarketCycle*marketCycles,n="RealEstate"==e?i:Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e]),(i=Math.min(i,n))>0&&(a.qty+=i,expenses+=i*a.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;for(var totalMatSize=0,tmp=0;tmp<this.prodMats.length;++tmp)totalMatSize+=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[this.prodMats[tmp]];for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var normQty=this.reqMats[reqMatName];totalMatSize-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[reqMatName]*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(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=this.reqMats[reqMatName]*e*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd=0,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(var j=0;j<this.prodMats.length;++j)warehouse.materials[this.prodMats[j]].qty+=e*producableFrac,warehouse.materials[this.prodMats[j]].qlt=office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]/100+Math.pow(this.sciResearch.qty,this.sciFac)+Math.pow(warehouse.materials.AICores.qty,this.aiFac)/1e4}else for(var reqMatName in this.reqMats)this.reqMats.hasOwnProperty(reqMatName)&&(warehouse.materials[reqMatName].prd=0);for(var fooProd=e*producableFrac/(SecsPerMarketCycle*marketCycles),fooI=0;fooI<this.prodMats.length;++fooI)warehouse.materials[this.prodMats[fooI]].prd=fooProd}else for(var reqMatName in this.reqMats)this.reqMats.hasOwnProperty(reqMatName)&&(warehouse.materials[reqMatName].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}var mat=warehouse.materials[matName],sCost;Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(mat.sCost)?(sCost=mat.sCost.replace(/MP/g,mat.bCost),sCost=eval(sCost)):sCost=mat.sCost;let markup=1,markupLimit=mat.getMarkupLimit();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 businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(mat),maxSell=(mat.qlt+.001)*marketFactor*markup*businessFactor*company.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.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_18__.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_18__.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_18__.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)){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+=.005*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(var i in this.products){if(this.products.hasOwnProperty(i))if(!(l=this.products[i]).fin){var a,r=l.createCity,o=this.offices[r],s=o.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations]+o.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]+o.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management];a=0===s?0:o.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]/s+o.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations]/s+o.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management]/s,l.createProduct(e,a*Math.pow(s,.29)),l.prog>=100&&l.finishProduct(o.employeeProd,this);break}}for(var i in this.products){var l;if(this.products.hasOwnProperty(i))(l=this.products[i])instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&l.fin&&(n+=this.processProduct(e,l,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){for(var totalProfit=0,i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city],warehouse=this.warehouses[city];if(warehouse instanceof Warehouse)switch(this.state){case"PRODUCTION":var maxProd=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier();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);var sCost;product.pCost*=ProductProductionCostRatio,Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1,markupLimit=product.rat/product.mku;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.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_18__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):maxSell;sellAmt<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,t){var n=t.company;t.industry;for(var i in this.products)this.products.hasOwnProperty(i)&&e===this.products[i]&&(delete this.products[i],n.updateUIContent())},Industry.prototype.upgrade=function(e,t){var n=t.corporation,i=(t.division,t.office),a=e[0];for(e[1],e[2],e[3];this.upgrades.length<=a;)this.upgrades.push(0);switch(++this.upgrades[a],a){case 0:for(let e=0;e<i.employees.length;++e)i.employees[e].ene=Math.min(1.05*i.employees[e].ene,i.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_26__.getRandomInt)(1,3)/100)*r;break;default:console.log("ERROR: Un-implemented function index: "+a)}},Industry.prototype.getOfficeProductivity=function(e,t){var n,i=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations]+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management];return 0===i?n=0:(n=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations]/i*(e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]/i)*(e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management]/i),n=Math.max(.01,n)),t&&t.forProduct?n*Math.pow(i,.22):2*n*Math.pow(i,.3)},Industry.prototype.getBusinessFactor=function(e){var t=1;return e.employeeProd.total>0&&(t=1+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business]/e.employeeProd.total),t*Math.pow(1+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business],.15)},Industry.prototype.getAdvertisingFactors=function(){var e=Math.pow(this.awareness+1,this.advFac),t=Math.pow(this.popularity+1,this.advFac),n=0===this.awareness?.01:Math.max((this.popularity+.001)/this.awareness,.01);return[Math.pow(e*t*n,.85),e,t,n]},Industry.prototype.getMarketFactor=function(e){return e.dmd*(100-e.cmp)/100},Industry.prototype.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.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_31__.removeElementById)(e),researchTreeBox=null),this.updateResearchTree();const t=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type];researchTreeBox=Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.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 i=t.getAllNodes();for(let e=0;e<i.length;++e){if(!0===this.researched[i[e]])continue;const n=_ResearchMap__WEBPACK_IMPORTED_MODULE_9__.ResearchMap[i[e]],a=i[e].replace(/\s/g,""),r=document.getElementById(a+"-corp-research-click-listener");null!=r?r.addEventListener("click",()=>{if(this.sciResearch.qty>=n.cost)return this.sciResearch.qty-=n.cost,t.research(i[e]),this.researched[i[e]]=!0,this.createResearchBox();Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)(`You do not have enough Scientific Research for ${n.name}`)}):console.warn(`Could not find Research Tree div for ${a}`)}const a=document.getElementById(`${e}-content`);null!=a&&(Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(a,2),a.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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()}`})),a.appendChild(Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(researchTreeBox,{class:"std-button",display:"block",innerText:"Close"}))),researchTreeBoxOpened=!0},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Industry=Industry,Employee.prototype.process=function(e=1,t){var n=.001*e,i=n*Math.random();this.age+=n,this.exp+=n,this.age>150&&(this.int-=i,this.eff-=i,this.cha-=i),this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.salary+=EmployeeRaiseAmount,this.cyclesUntilRaise+=CyclesPerEmployeeRaise);var a=n*Math.random();this.pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training&&(this.cha+=a,this.exp+=a,this.eff+=a);var r=.5*(t.employees.length/t.size-.5);return Math.random()<.5-r?(this.ene+=i,this.hap+=i):(this.ene-=i,this.hap-=i),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,i=this.cre*e.getEmployeeCreMultiplier()*t.getEmployeeCreMultiplier(),a=this.cha*e.getEmployeeChaMultiplier()*t.getEmployeeChaMultiplier(),r=this.int*e.getEmployeeIntMultiplier()*t.getEmployeeIntMultiplier(),o=this.eff*e.getEmployeeEffMultiplier()*t.getEmployeeEffMultiplier(),s=this.mor*this.hap*this.ene*1e-6;switch(this.pos){case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations:n=.6*r+.1*a+this.exp+.5*i+o;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer:n=r+.1*a+1.5*this.exp+o;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business:n=.4*r+a+.5*this.exp;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management:n=2*a+this.exp+.2*i+.7*o;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD:n=1.5*r+.8*this.exp+i+.5*o;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned:case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training:n=0;break;default:console.log("ERROR: Invalid employee position: "+this.pos)}return s*n},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 i=this.cre*t.getEmployeeCreMultiplier()*n.getEmployeeCreMultiplier(),a=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_22__.createElement)("p",{id:"cmpy-mgmt-employee-"+this.name+"-panel-text",innerHTML:"Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.mor,3)+"<br>Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.hap,3)+"<br>Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.ene,3)+"<br>Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.age,3)+"<br>Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(r,3)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,3)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.exp,3)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(i,3)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(o,3)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.sal,"$0.000a")+"/ s<br>"}));var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_22__.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.updateUI=function(e,t,n){var i=this.cre*t.getEmployeeCreMultiplier()*n.getEmployeeCreMultiplier(),a=this.cha*t.getEmployeeChaMultiplier()*n.getEmployeeChaMultiplier(),r=this.int*t.getEmployeeIntMultiplier()*n.getEmployeeIntMultiplier(),o=this.eff*t.getEmployeeEffMultiplier()*n.getEmployeeEffMultiplier();if(null!=e){var s=document.getElementById("cmpy-mgmt-employee-"+this.name+"-panel-text");if(null==s)return this.createUI(e);s.innerHTML="Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.mor,3)+"<br>Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.hap,3)+"<br>Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.ene,3)+"<br>Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.age,3)+"<br>Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(r,3)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,3)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.exp,3)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(i,3)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(o,3)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.sal,"$0.000a")+"/ s<br>"}else console.log("ERROR: Employee.updateUI() called with null panel")},Employee.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Employee",this)},Employee.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Employee,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.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 Warehouse(e={}){this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.level=0,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.breakdown="",this.smartSupplyStore=0,this.materials={Water:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Water"}),Energy:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Energy"}),Food:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Food"}),Plants:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Plants"}),Metal:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Metal"}),Hardware:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Hardware"}),Chemicals:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Chemicals"}),Drugs:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Drugs"}),Robots:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Robots"}),AICores:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"AI Cores"}),RealEstate:new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Real Estate"})}}function Corporation(e={}){this.name=e.name?e.name:"The Corporation",this.divisions=[],this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(15e10),this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.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}OfficeSpace.prototype.process=function(e=1,t){t.corporation;var n=t.industry;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 i=1;n.funds<0&&n.lastCycleRevenue<0?i=Math.pow(.99,e):n.funds>0&&n.lastCycleRevenue>0&&(i=Math.pow(1.01,e));const a=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*=i,n.hap*=i,n.mor=Math.min(n.mor,this.maxMor),n.hap=Math.min(n.hap,this.maxHap)),a?n.ene=this.maxEne:(n.ene*=i,n.ene=Math.min(n.ene,this.maxEne)),o+=n.process(e,this)}return this.calculateEmployeeProductivity(e,t),o},OfficeSpace.prototype.calculateEmployeeProductivity=function(e=1,t){var n=t.corporation,i=t.industry;for(var a in this.employeeProd)this.employeeProd.hasOwnProperty(a)&&(this.employeeProd[a]=0);for(var r=0,o=0;o<this.employees.length;++o){var s=this.employees[o],l=s.calculateProductivity(n,i);this.employeeProd[s.pos]+=l,r+=l}this.employeeProd.total=r},OfficeSpace.prototype.findEmployees=function(e){e.corporation,e.industry;if(null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(25,50)/100,n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(51,75)/100,i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),c=2.2*(a+r+o+s+l),u=new Employee({intelligence:a*t,charisma:r*t,experience:o*t,creativity:s*t,efficiency:l*t,salary:c*t}),p=new Employee({intelligence:a*n,charisma:r*n,experience:o*n,creativity:s*n,efficiency:l*n,salary:c*n}),m=new Employee({intelligence:a*i,charisma:r*i,experience:o*i,creativity:s*i,efficiency:l*i,salary:c*i}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("h1",{innerHTML:"Select one of the following candidates for hire:"}),d=function(t,n){return Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerHTML:"Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.int,1)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cha,1)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.exp,1)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cre,1)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.eff,1)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t.sal,"$0.000a")+" s<br>",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.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_23__.createPopup)("cmpy-mgmt-hire-employee-popup",_)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,i=t.industry,a=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoTxtInpBoxGetYesButton)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoTxtInpBoxGetNoButton)();a.innerHTML="Hire",r.innerHTML="Cancel",a.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoTxtInpBoxGetInput)(),a=0;a<this.employees.length;++a)if(this.employees[a].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.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.displayDivisionContent(i,currentCityUi),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoTxtInpBoxClose)()}),r.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoTxtInpBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoTxtInpBoxCreate)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(e){var t=e.corporation,n=e.industry;if(null==document.getElementById("cmpy-mgmt-hire-employee-popup")){for(var i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),c=new Employee({intelligence:a*i,charisma:r*i,experience:o*i,creativity:s*i,efficiency:l*i,salary:2.2*(a+r+o+s+l)*i}),u=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.generateRandomString)(7),p=0;p<this.employees.length;++p)if(this.employees[p].name===u)return this.hireRandomEmployee(e);c.name=u,this.employees.push(c),t.displayDivisionContent(n,currentCityUi)}},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_20__.Generic_toJSON)("OfficeSpace",this)},OfficeSpace.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(OfficeSpace,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.OfficeSpace=OfficeSpace,Warehouse.prototype.updateMaterialSizeUsed=function(){for(var e in this.sizeUsed=0,this.breakdown="",this.materials)if(this.materials.hasOwnProperty(e)){var t=this.materials[e];_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes.hasOwnProperty(e)&&(this.sizeUsed+=t.qty*_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e],t.qty>0&&(this.breakdown+=e+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.qty*_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e],0)+"<br>"))}this.sizeUsed>this.size&&console.log("ERROR: Warehouse size used greater than capacity, something went wrong")},Warehouse.prototype.updateSize=function(e,t){null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),this.size=100*this.level*e.getStorageMultiplier()*t.getStorageMultiplier()},Warehouse.prototype.createUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry;Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__.removeChildrenFromElement)(industryWarehousePanel),industryWarehouseStorageText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{display:"inline-block",class:"tooltip",color:this.sizeUsed>=this.size?"red":"white"}),industryWarehousePanel.appendChild(industryWarehouseStorageText);var i=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);industryWarehouseUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{innerText:"Upgrade Warehouse Size - "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(i,"$0.000a"),display:"inline-block",class:t.funds.lt(i)?"a-link-button-inactive":"a-link-button",clickListener:()=>{null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),++this.level,this.updateSize(t,n),t.funds=t.funds.minus(i),this.createUI(e)}}),industryWarehousePanel.appendChild(industryWarehouseUpgradeSizeButton);var a="This Industry uses ["+Object.keys(n.reqMats).join(", ")+"] in order to ";n.prodMats.length>0?(a+="produce ["+n.prodMats.join(", ")+"] ",n.makesProducts&&(a+=" and "+n.getProductDescriptionText())):n.makesProducts&&(a+=n.getProductDescriptionText()+".");var r=". The exact requirements for production are:<br>";for(var o in n.reqMats)n.reqMats.hasOwnProperty(o)&&(r+=[" *",n.reqMats[o],o].join(" ")+"<br>");if(r+="in order to create ",n.prodMats.length>0?(r+="one of each produced Material ("+n.prodMats.join(", ")+") ",n.makesProducts&&(r+="or to create one of its Products")):n.makesProducts&&(r+="one of its Products"),a+=r,a+="<br><br>To get started with production, purchase your required materials or import them from another of your company's divisions.<br><br>",industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:a})),industryWarehouseStateText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p"),industryWarehousePanel.appendChild(industryWarehouseStateText),t.unlockUpgrades[1]){null==this.smartSupplyEnabled&&(this.smartSupplyEnabled=!1);industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("label",{for:"cmpy-mgmt-smart-supply-checkbox",innerText:"Enable Smart Supply",color:"white"})),(industrySmartSupplyCheckbox=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",margin:"3px",changeListener:()=>{this.smartSupplyEnabled=industrySmartSupplyCheckbox.checked}})).checked=this.smartSupplyEnabled,industryWarehousePanel.appendChild(industrySmartSupplyCheckbox)}industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"<br>Materials:<br>"})),industryWarehouseMaterials=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseMaterials),n.makesProducts&&Object.keys(n.products).length>0&&(industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"<br>Products:<br>"})),industryWarehouseProducts=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseProducts)),this.updateUI(e)}else console.log("ERROR: Warehouse.createUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.updateUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry,i="Storage: "+(this.sizedUsed,this.size,Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.sizeUsed,3))+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.size,3);null!=this.breakdown&&""!=this.breakdown&&(i+="<span class='tooltiptext'>"+this.breakdown+"</span>"),industryWarehouseStorageText.innerHTML=i;var a=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);t.funds.lt(a)?industryWarehouseUpgradeSizeButton.className="a-link-button-inactive":industryWarehouseUpgradeSizeButton.className="a-link-button";var r="Current state: ";switch(n.state){case"START":r+="Preparing...";break;case"PURCHASE":r+="Purchasing materials...";break;case"PRODUCTION":r+="Producing materials and/or products...";break;case"SALE":r+="Selling materials and/or products...";break;case"EXPORT":r+="Exporting materials and/or products...";break;default:console.log("ERROR: Invalid state: "+n.state)}for(var o in industryWarehouseStateText.innerText=r,Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__.removeChildrenFromElement)(industryWarehouseMaterials),this.materials)this.materials.hasOwnProperty(o)&&this.materials[o]instanceof _Material__WEBPACK_IMPORTED_MODULE_6__.Material&&(Object.keys(n.reqMats).includes(o)||n.prodMats.includes(o)||"Hardware"===o||"Robots"===o||"AICores"===o||"RealEstate"===o)&&industryWarehouseMaterials.appendChild(this.createMaterialUI(this.materials[o],o,e));if(Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__.removeChildrenFromElement)(industryWarehouseProducts),n.makesProducts&&Object.keys(n.products).length>0)for(var s in n.products)n.products.hasOwnProperty(s)&&n.products[s]instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&industryWarehouseProducts.appendChild(this.createProductUI(n.products[s],e))}else console.log("ERROR: Warehouse.updateUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.createMaterialUI=function(mat,matName,parentRefs){if(null!=parentRefs.company&&null!=parentRefs.industry){var company=parentRefs.company,industry=parentRefs.industry,purchasePopupId="cmpy-mgmt-material-purchase-popup",sellPopupid="cmpy-mgmt-material-sell-popup",div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-warehouse-material-div"}),totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="<br>Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="<br>Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.cmp,3));var innerTxt="<p class='tooltip'>"+mat.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.qty,3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(totalGain,3)+"/s)<span class='tooltiptext'>Buy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.buy,3)+"/s<br>Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.prd,3)+"/s<br>Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.sll,3)+"/s<br>Export: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.totalExp,3)+"/s<br>Import: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.imp,3)+"/s"+cmpAndDmdText+"</span></p><br><p class='tooltip'>MP: $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.bCost,2)+"<span class='tooltiptext'>Market Price: The price you would pay if you were to buy this material on the market</span></p><br><p class='tooltip'>Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.qlt,2)+"<span class='tooltiptext'>The quality of your material. Higher quality will lead to more sales</span></p>";div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:innerTxt,id:"cmpy-mgmt-warehouse-"+matName+"-text",display:"inline-block"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var tutorial=industry.newInd&&Object.keys(industry.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,buyButtonParams={innerText:"Buy ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.buy,3)+")",display:"inline-block",class:tutorial?"a-link-button flashing-button":"a-link-button",clickListener:()=>{var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"Enter the amount of "+mat.name+" you would like to purchase per second. This material's cost changes constantly"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{margin:"5px",placeholder:"Purchase amount",type:"number",value:mat.buy?mat.buy:null,onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{innerText:"Confirm",class:"std-button",clickListener:()=>{if(!isNaN(n.value))return mat.buy=parseFloat(n.value),isNaN(mat.buy)&&(mat.buy=0),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1;Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid amount")}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{innerText:"Clear Purchase",class:"std-button",clickListener:()=>(mat.buy=0,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1)});const a=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(purchasePopupId,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(purchasePopupId,[t,n,e,i,a]),n.focus()}},innerTextString;if(tutorial&&(buyButtonParams.tooltip="Purchase your required materials to get production started!"),buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",buyButtonParams)),1===company.unlockUpgrades[0]){function createExportPopup(){for(var popupId="cmpy-mgmt-export-popup",exportTxt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_22__.createElement)("select",{class:"dropdown"}),industrySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{class:"dropdown",changeListener:()=>{for(var e=industrySelector.options[industrySelector.selectedIndex].value,t=0;t<company.divisions.length;++t)if(company.divisions[t].name==e){Object(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_19__.clearSelector)(citySelector);company.divisions[t];for(var n in company.divisions[t].warehouses)company.divisions[t].warehouses[n]instanceof Warehouse&&citySelector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{value:n,text:n}));return}}}),i=0;i<company.divisions.length;++i)industrySelector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:company.divisions[i].name,value:company.divisions[i].name}));for(var currIndustry=industrySelector.options[industrySelector.selectedIndex].value,i=0;i<company.divisions.length;++i)if(company.divisions[i].name==currIndustry){for(var cityName in company.divisions[i].warehouses)company.divisions[i].warehouses.hasOwnProperty(cityName)&&company.divisions[i].warehouses[cityName]instanceof Warehouse&&citySelector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{value:cityName,text:cityName}));break}for(var exportAmount=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{class:"text-input",placeholder:"Export amount / s"}),exportBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Export",clickListener:()=>{var industryName=industrySelector.options[industrySelector.selectedIndex].text,cityName=citySelector.options[citySelector.selectedIndex].text,amt=exportAmount.value,sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");var temp=sanitizedAmt.replace(/MAX/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.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_31__.removeElementById)(popupId),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid amount entered for export")}}),cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(popupId),!1)}),currExportsText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."}),currExports=[],i=0;i<mat.exp.length;++i)!function(e,t,n){n.push(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_31__.removeElementById)(popupId),createExportPopup()}}))}(i,mat,currExports);Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(popupId,[exportTxt,industrySelector,citySelector,exportAmount,exportBtn,cancelBtn,currExportsText].concat(currExports))}buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{innerText:"Export",display:"inline-block",class:"a-link-button",clickListener:()=>{createExportPopup()}}))}if(buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{})),mat.sllman[0]){if(innerTextString=-1===mat.sllman[1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.sll,3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.sll,3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.sllman[1],3)+")",mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(mat.sCost)){var sCost=mat.sCost.replace(/MP/g,mat.bCost);innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(eval(sCost),2)}else innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(mat.sCost,2)}else innerTextString="Sell (0.000/0.000)";if(buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{innerText:innerTextString,display:"inline-block",class:"a-link-button",clickListener:()=>{var txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_22__.createElement)("br",{}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_28__.KEY.ENTER&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sCost?mat.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{class:"std-button",innerText:"Confirm",clickListener:()=>{var cost=inputPx.value.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");var temp=cost.replace(/MP/g,mat.bCost);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.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_18__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric or 'MAX'"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(sellPopupid),!1}});const cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(sellPopupid,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(sellPopupid,[txt,br,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),industry.hasResearch("Market-TA.I")){let e=()=>{const e="cmpy-mgmt-marketta-popup",t=mat.getMarkupLimit(),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_16__.numeralWrapper.format(mat.bCost+t,"$0.000a")+". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"}),i=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(e,{class:"std-button",display:"block"});if(industry.hasResearch("Market-TA.II")){let a;const r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p"),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{marginTop:"4px",onkeyup:e=>{e.preventDefault(),a()},type:"number",value:mat.bCost});(a=function(){const e=parseFloat(o.value);let n=1;e>mat.bCost?e-mat.bCost>t&&(n=Math.pow(t/(e-mat.bCost),2)):e<mat.bCost&&(n=e<=0?1e12:mat.bCost/e),r.innerHTML="<br><u><strong>Market-TA.II</strong></u><br>"+`If you sell at ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(e,"$0.0001")}, `+`then you will sell ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(n,5)}x as much compared `+"to if you sold at market price."})(),Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[n,r,o,i])}else Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[n,i])};buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",clickListener:()=>{e()},display:"inline-block",innerText:"Market-TA"}))}return div}console.log("ERROR: Warehouse.createMaterialUI called without industry or company parent refs")},Warehouse.prototype.createProductUI=function(product,parentRefs){var company=parentRefs.company,industry=parentRefs.industry,city=currentCityUi,div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-warehouse-product-div"});if(!product.fin)return div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"Designing "+product.name+"...<br>"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.prog,2)+"% complete"})),div;var cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="<br>Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="<br>Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.cmp,3));var totalGain=product.data[city][1]-product.data[city][2];div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"<p class='tooltip'>"+product.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.data[city][0],3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(totalGain,3)+"/s)<span class='tooltiptext'>Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.data[city][1],3)+"/s<br>Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.data[city][2],3)+"/s</span></p><br><p class='tooltip'>Rating: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.rat,3)+"<span class='tooltiptext'>Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.qlt,3)+"<br>Performance: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.per,3)+"<br>Durability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.dur,3)+"<br>Reliability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.rel,3)+"<br>Aesthetics: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.aes,3)+"<br>Features: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.fea,3)+cmpAndDmdText+"</span></p><br><p class='tooltip'>Est. Production Cost: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(product.pCost/ProductProductionCostRatio,"$0.000a")+"<span class='tooltiptext'>An estimate of the material cost it takes to create this Product.</span></p><br><p class='tooltip'>Est. Market Price: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(product.pCost+product.rat/product.mku,"$0.000a")+"<span class='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.</span></p>"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var sellInnerTextString=-1===product.sllman[city][1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.data[city][2],3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.data[city][2],3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.sllman[city][1],3)+")";product.sCost&&(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sCost)?sellInnerTextString+=" @ "+product.sCost:sellInnerTextString+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(product.sCost,"$0.000a")),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{innerText:sellInnerTextString,class:"a-link-button",display:"inline-block",margin:"6px",clickListener:()=>{var popupId="cmpy-mgmt-sell-product-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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."}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"text",value:product.sllman[city][1]?product.sllman[city][1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"text",value:product.sCost?product.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Confirm",clickListener:()=>{if(inputPx.value.includes("MP")){var price=inputPx.value.replace(/\s+/g,"");price=price.replace(/[^-()\d/*+.MP]/g,"");var temp=price.replace(/MP/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value or expression for sell quantity field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.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_18__.dialogBoxCreate)("Invalid value for sell price field"),!1;product.sCost=cost}if(inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;product.sllman[city][0]=!0,product.sllman[city][1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?product.sllman[city][0]=!1:(product.sllman[city][0]=!0,product.sllman[city][1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(popupId),!1}});var cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(popupId),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(popupId,[txt,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}));var limitProductionInnerText="Limit Production";return product.prdman[city][0]&&(limitProductionInnerText+=" ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(product.prdman[city][1],3)+")"),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:limitProductionInnerText,display:"inline-block",clickListener:()=>{var e,t="cmpy-mgmt-limit-product-production-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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."}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Limit",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Limit production",margin:"6px",clickListener:()=>{if(""===i.value)return product.prdman[city][0]=!1,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(t),!1;var e=parseFloat(i.value);return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value entered"),!1):(e<0?product.prdman[city][0]=!1:(product.prdman[city][0]=!0,product.prdman[city][1]=e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(t),!1)}});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",margin:"6px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(t,[n,i,e,a])}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Discontinue",clickListener:()=>{var e="cmpy-mgmt-discontinue-product-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Discontinue",clickListener:()=>(industry.discontinueProduct(product,parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[t,n,i])}})),div},Warehouse.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Warehouse",this)},Warehouse.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Warehouse,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Warehouse=Warehouse,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,i=n*CyclesPerIndustryStateCycle;if(this.storedCycles-=i,this.divisions.forEach(function(i){i.process(n,t,e)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=i),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=i),"START"===t){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_33__.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_18__.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_33__.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,i=t/this.totalShares;_Player__WEBPACK_IMPORTED_MODULE_15__.a.gainMoney(this.numShares*i*(1-this.dividendTaxPercentage/100)),this.funds=this.funds.plus(n)}else this.funds=this.funds.plus(e);this.updateSharePrice()}this.state.nextState(),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.Page.Corporation)&&this.updateUIContent()}},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_10__.BitNodeMultipliers.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();let n=4;switch(this.fundingRound){case 0:e=.1,n=5;break;case 1:e=.35,n=4;break;case 2:e=.25,n=4;break;case 3:e=.2,n=3.5;break;case 4:return}var i=t*e*n,a=Math.floor(INITIALSHARES*e),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoBoxGetYesButton)(),o=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoBoxGetNoButton)();r.innerHTML="Accept",o.innerHML="Reject",r.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(i),this.numShares-=a,this.displayCorporationOverviewContent(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoBoxClose)())),o.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_32__.yesNoBoxCreate)("An investment firm has offered you "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(i,"$0.000a")+" in funding in exchange for a "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(100*e,"0.000a")+"% stake in the company ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(a,"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_22__.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_16__.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_16__.numeralWrapper.format(this.numShares,"0.000a")+" of shares that you can issue."}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(i.value),t=this.determineValuation()/this.totalShares;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.displayCorporationOverviewContent(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)("cmpy-mgmt-go-public-popup"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)(`You took your ${this.name} public and earned `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(e*t)} in your IPO`),!1)}});var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-go-public-popup",[n,a,i,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,i=this.sharePrice,a=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+=i*t,n-=t;break}r+=i*n,t-=n=SHARESPERPRICEUPDATE,a+=n,i=this.determineValuation()/(2*(this.totalShares+a-this.numShares))}return[r,i,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_11__.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_18__.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],i=e[2],a=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var r=n*Math.pow(i,this.upgrades[t]);if(this.funds.lt(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.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]*a,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&&s.warehouses[l].updateSize(this,s)}this.updateCorporationOverviewContent()}},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};var companyManagementDiv,companyManagementHeaderTabs,companyManagementPanel,currentCityUi,corporationUnlockUpgrades,corporationUpgrades,sellSharesButton,sellSharesButtonTooltip,issueNewSharesButton,issueNewSharesButtonTooltip,industryOverviewPanel,industryOverviewText,industryEmployeePanel,industryEmployeeText,industryEmployeeHireButton,industryEmployeeAutohireButton,industryEmployeeManagementUI,industryEmployeeInfo,industryIndividualEmployeeInfo,industryOfficeUpgradeSizeButton,industryWarehousePanel,industrySmartSupplyCheckbox,industryWarehouseStorageText,industryWarehouseUpgradeSizeButton,industryWarehouseStateText,industryWarehouseMaterials,industryWarehouseProducts,researchTreeBoxOpened=!1,researchTreeBox,headerTabs,cityTabs;Corporation.prototype.createUI=function(){companyManagementDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-container",position:"fixed",class:"generic-menupage-container"}),companyManagementHeaderTabs=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-header-tabs"}),companyManagementDiv.appendChild(companyManagementHeaderTabs),this.updateUIHeaderTabs(),companyManagementPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-panel"}),companyManagementDiv.appendChild(companyManagementPanel),document.getElementById("entire-game-container").appendChild(companyManagementDiv),this.displayCorporationOverviewContent()},Corporation.prototype.updateUIHeaderTabs=function(){if(companyManagementHeaderTabs){Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__.removeChildrenFromElement)(companyManagementHeaderTabs);var e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{id:"cmpy-mgmt-company-tab",class:"cmpy-mgmt-header-tab",innerText:this.name,checked:!0,clickListener:()=>(this.selectHeaderTab(e),this.displayCorporationOverviewContent(),!1)});companyManagementHeaderTabs.appendChild(e);for(var t=0;t<this.divisions.length;++t)this.createDivisionUIHeaderTab(this.divisions[t]);companyManagementHeaderTabs.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{id:"cmpy-mgmt-expand-industry-tab",class:"cmpy-mgmt-header-tab",innerText:"Expand into new Industry",clickListener:()=>{if(null!=document.getElementById("cmpy-mgmt-expand-industry-popup"))return;var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"popup-box-container",id:"cmpy-mgmt-expand-industry-popup"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"popup-box-content"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"Create a new division to expand into a new industry:"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{class:"dropdown"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"text",id:"cmpy-mgmt-expand-industry-name-input",class:"text-input",display:"block",maxLength:30,pattern:"[a-zA-Z0-9-_]",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("label",{for:"cmpy-mgmt-expand-industry-name-input",innerText:"Division name: "});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("span",{class:"popup-box-button",innerText:"Create Division",clickListener:()=>{for(var e=a.options[a.selectedIndex].value,t=o.value,n=0;n<this.divisions.length;++n)if(this.divisions[n].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("This name is already in use!"),!1;if(this.funds.lt(_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[e]))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Not enough money to create a new division in this industry");else if(""===t)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("New division must have a name!");else{this.funds=this.funds.minus(_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[e]);var i=new Industry({name:t,type:e});this.divisions.push(i),this.updateUIHeaderTabs(),this.selectHeaderTab(headerTabs[headerTabs.length-2]),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)("cmpy-mgmt-expand-industry-popup"),this.displayDivisionContent(i,_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Sector12)}return!1}});const l=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(t,{innerText:"Cancel"});for(var c={},u=0;u<this.divisions.length;++u)c[this.divisions[u].type]=!0;for(var p in c.Agriculture||a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture,value:"Agriculture"})),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries)if("Agriculture"!==p&&_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.hasOwnProperty(p)&&!c[p]){var m=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries[p];a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:m,value:p}))}m=a.options[a.selectedIndex].value;return r.innerHTML=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryDescriptions[m]+"<br><br>",a.addEventListener("change",function(){var e=a.options[a.selectedIndex].value;r.innerHTML=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryDescriptions[e]+"<br><br>"}),n.appendChild(i),n.appendChild(a),n.appendChild(r),n.appendChild(s),n.appendChild(o),n.appendChild(l),n.appendChild(e),t.appendChild(n),document.getElementById("entire-game-container").appendChild(t),t.style.display="flex",o.focus(),!1}})),headerTabs=companyManagementDiv.getElementsByClassName("cmpy-mgmt-header-tab")}else console.log("ERROR: Header tabs div has not yet been created when Corporation.updateUIHeaderTabs() is called")},Corporation.prototype.selectHeaderTab=function(e){if(null!=e){for(var t=0;t<headerTabs.length;++t)headerTabs[t].className="cmpy-mgmt-header-tab";e.className="cmpy-mgmt-header-tab current"}},Corporation.prototype.createDivisionUIHeaderTab=function(e){var t="cmpy-mgmt-"+e.name+"-tab",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{id:t,class:"cmpy-mgmt-header-tab",innerText:e.name,clickListener:()=>(this.selectHeaderTab(n),this.displayDivisionContent(e,_Locations__WEBPACK_IMPORTED_MODULE_14__.Locations.Sector12),!1)});companyManagementHeaderTabs.appendChild(n)},Corporation.prototype.clearUIPanel=function(){for(;companyManagementPanel.firstChild;)companyManagementPanel.removeChild(companyManagementPanel.firstChild)},Corporation.prototype.updateUIContent=function(){if(null!=headerTabs){for(var e=0;e<headerTabs.length;++e)if(headerTabs[e].classList.contains("current"))return void(0===e?this.updateCorporationOverviewContent():this.updateDivisionContent(this.divisions[e-1]))}else console.log("ERROR: headerTabs is null in Corporation.updateUIContent()")},Corporation.prototype.displayCorporationOverviewContent=function(){this.clearUIPanel(),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{id:"cmpy-mgmt-overview-text"})),headerTabs&&headerTabs.length>=1&&this.selectHeaderTab(headerTabs[0]);for(var e=_Player__WEBPACK_IMPORTED_MODULE_15__.a.getHomeComputer(),t=!1,n="corporation-management-handbook.lit",i=0;i<e.messages.length;++i)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(e.messages[i])&&e.messages[i]===n){t=!0;break}if(companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Getting Started Guide",display:"inline-block",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.",clickListener:()=>(t||e.messages.push(n),Object(_Literature__WEBPACK_IMPORTED_MODULE_13__.b)(n),!1)})),this.public){var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button tooltip",innerText:"Sell Shares",display:"inline-block",clickListener:()=>{var e="cmpy-mgmt-sell-shares-popup",t=this.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_16__.numeralWrapper.format(t,"$0.000a")}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Shares to sell",margin:"5px",inputListener:()=>{var e=Math.round(a.value);if(isNaN(e)||e<=0)i.innerText="ERROR: Invalid value entered for number of shares to sell";else if(e>this.numShares)i.innerText="You don't have this many shares to sell!";else{const t=this.calculateShareSale(e),n=t[0];t[1],t[2];i.innerText="Sell "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(n,"$0.000a")}}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Sell shares",display:"inline-block",clickListener:()=>{var t=Math.round(a.value);if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else{if(!(t>this.numShares)){const i=this.calculateShareSale(t),a=i[0],r=i[1],o=i[2];if(this.numShares-=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var n=parseInt(this.issuedShares);isNaN(n)?this.issuedShares=0:this.issuedShares=n}return this.issuedShares+=t,this.sharePrice=r,this.shareSalesUntilPriceUpdate=o,this.shareSaleCooldown=SellSharesCooldown,_Player__WEBPACK_IMPORTED_MODULE_15__.a.gainMoney(a),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)(`Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(t,"0.000a")} shares for `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(a,"$0.000a")}. `+`The corporation's stock price fell to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(this.sharePrice)} `+"as a result of dilution."),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: You don't have this many shares to sell")}}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[n,i,a,r,o])}});sellSharesButtonTooltip=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("span",{class:"tooltiptext",innerText:"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."}),a.appendChild(sellSharesButtonTooltip);var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Buyback shares",display:"inline-block",tooltip:"Buy back shares you that previously issued or sold at market price.",clickListener:()=>{var e="cmpy-mgmt-buyback-shares-popup";const t=1.1*this.sharePrice;var n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_16__.numeralWrapper.format(t,"$0.000a")+". Your company currently has "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.issuedShares,3)+" outstanding stock shares"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Shares to buyback",margin:"5px",inputListener:()=>{var e=Math.round(a.value);isNaN(e)||e<=0?i.innerText="ERROR: Invalid value entered for number of shares to buyback":e>this.issuedShares?i.innerText="There are not this many shares available to buy back. There are only "+this.issuedShares+" outstanding shares.":i.innerText="Purchase "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(e*t,"$0.000a")}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Buy shares",display:"inline-block",clickListener:()=>{var t=Math.round(a.value);const n=1.1*this.sharePrice;if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else if(t>this.issuedShares)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: There are not this many oustanding shares to buy back");else if(t*n>_Player__WEBPACK_IMPORTED_MODULE_15__.a.money)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: You do not have enough money to purchase this many shares (you need "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t*n,"$0.000a")+")");else{if(this.numShares+=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var i=parseInt(this.issuedShares);isNaN(i)?this.issuedShares=0:this.issuedShares=i}this.issuedShares-=t,_Player__WEBPACK_IMPORTED_MODULE_15__.a.loseMoney(t*n),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e)}return!1}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[n,i,a,r,o])}});companyManagementPanel.appendChild(a),companyManagementPanel.appendChild(r),sellSharesButton=a,Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(companyManagementPanel,1);const e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"std-button tooltip",display:"inline-block",innerText:"Issue New Shares",clickListener:()=>{const e="cmpy-mgmt-issue-new-shares-popup",t=Math.round(.2*this.totalShares),n=t-t%1e6,i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.<br><br>"+`&nbsp;* You can issue at most ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(n,"0.000a")} new shares<br>`+"&nbsp;* New shares are sold at a 10% discount<br>&nbsp;* You can only issue new shares once every 12 hours<br>&nbsp;* Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share<br>&nbsp;* 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 a,r;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{display:"block"});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{margin:"5px",placeholder:"# New Shares",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER?a.click():function(e){const t=Math.round(.9*e.sharePrice);let i=parseInt(r.value);isNaN(i)?o.innerText="Invalid input":(i/=1e7,i=1e7*Math.round(i),o.innerText=i<1e7?"Must issue at least 10 million new shares":i>n?"You cannot issue that many shares":`Issue ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(i,"0.000a")} new shares `+`for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(i*t)}?`)}(this)}}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"std-button",display:"inline-block",innerText:"Issue New Shares",clickListener:()=>{const t=Math.round(.9*this.sharePrice);let i=parseInt(r.value);if(isNaN(i))return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid input for number of new shares");if((i=1e7*Math.round(i/1e7))<1e7||i>n)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid input for number of new shares");const a=i*t;this.issueNewSharesCooldown=IssueNewSharesCooldown,this.totalShares+=i;let o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(0,Math.round(i/2));return o=1e6*Math.round(o/1e6),this.issuedShares+=i-o,this.funds=this.funds.plus(a),this.immediatelyUpdateSharePrice(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)(`Issued ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(i,"0.000a")} and raised `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(a)}. ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(o,"0.000a")} `+"of these shares were bought by private investors.<br><br>"+`Stock price decreased to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(this.sharePrice)}`),!1}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[i,o,r,a,s]),r.focus()}});issueNewSharesButtonTooltip=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("span",{class:"tooltiptext",innerText:"Issue new equity shares to raise capital"}),e.appendChild(issueNewSharesButtonTooltip),companyManagementPanel.appendChild(e),issueNewSharesButton=e;const t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"std-button",display:"inline-block",innerText:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)",clickListener:()=>{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 ${DividendMaxPercentage}. (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_22__.createElement)("p",{innerHTML:t});let i;const a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{margin:"5px",placeholder:"Dividend %",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&i.click()}});i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Allocate Dividend Percentage",clickListener:()=>{const t=Math.round(parseInt(a.value));return isNaN(t)||t<0||t>DividendMaxPercentage?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)(`Invalid value. Must be an integer between 0 and ${DividendMaxPercentage}`):(this.dividendPercentage=t,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)}});const r=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[n,a,i,r]),a.focus()}});companyManagementPanel.appendChild(t)}else{var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:this.fundingRound>=4?"a-link-button-inactive":"a-link-button tooltip",innerText:"Find Investors",display:"inline-block",clickListener:()=>{this.getInvestment()}});if(this.fundingRound<4){var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("span",{class:"tooltiptext",innerText:"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company"});o.appendChild(s)}var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button tooltip",innerText:"Go Public",display:"inline-block",clickListener:()=>(this.goPublic(),!1)}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("span",{class:"tooltiptext",innerText:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."});l.appendChild(c),companyManagementPanel.appendChild(o),companyManagementPanel.appendChild(l)}Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(companyManagementPanel,1);var u=this.determineValuation()>=BribeThreshold,p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:u?"a-link-button":"a-link-button-inactive",innerText:"Bribe Factions",display:"inline-block",tooltip:u?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders",clickListener:()=>{for(var e="cmpy-mgmt-bribe-factions-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_22__.createElement)("select",{margin:"3px"}),i=0;i<_Player__WEBPACK_IMPORTED_MODULE_15__.a.factions.length;++i){var a=_Player__WEBPACK_IMPORTED_MODULE_15__.a.factions[i];n.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:a,value:a}))}var r,o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Corporation funds",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,i=null==r.value||""==r.value?0:Math.round(parseFloat(r.value));if(isNaN(e)||isNaN(i)||e<0||i<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var a=(Number(e)+i*t)/BribeToRepRatio;o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Stock Shares",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,i=null==r.value||""==r.value?0:Math.round(r.value);if(isNaN(e)||isNaN(i)||e<0||i<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var a=(e+i*t)/BribeToRepRatio;console.log("repGain: "+a),o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Bribe",display:"inline-block",clickListener:()=>{var t=null==s.value||""==s.value?0:parseFloat(s.value),i=this.sharePrice,a=null==r.value||""==r.value?0:Math.round(parseFloat(r.value)),o=_Faction_Factions__WEBPACK_IMPORTED_MODULE_12__.Factions[n.options[n.selectedIndex].value];if(null==o)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: You must select a faction to bribe"),!1;if(isNaN(t)||isNaN(a)||t<0||a<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: Invalid value(s) entered");else if(this.funds.lt(t))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: You do not have this much money to bribe with");else{if(!(a>this.numShares)){var l=(t+a*i)/BribeToRepRatio;return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You gained "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(l,0)+" reputation with "+o.name+" by bribing them."),o.playerReputation+=l,this.funds=this.funds.minus(t),this.numShares-=a,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("ERROR: You do not have this many shares to bribe with")}}}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[t,n,o,s,r,l,c])}});if(companyManagementPanel.appendChild(p),this.updateCorporationOverviewContent(),!(this.divisions.length<=0)){var m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-upgrade-container"});m.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("h1",{innerText:"Unlocks",margin:"6px",padding:"6px"}));var h=Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__.CorporationUnlockUpgrades).length,d=Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__.CorporationUpgrades).length;for(null!=this.unlockUpgrades&&null!=this.upgrades||(this.unlockUpgrades=Array(h).fill(0),this.upgrades=Array(d).fill(0));this.unlockUpgrades.length<h;)this.unlockUpgrades.push(0);for(;this.upgrades.length<d;)this.upgrades.push(0);for(;this.upgradeMultipliers<d;)this.upgradeMultipliers.push(1);for(i=0;i<h;++i)!function(e,t){if(0===t.unlockUpgrades[e]){var n=_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__.CorporationUnlockUpgrades[e.toString()];if(null==n)return void console.log("ERROR: Could not find upgrade index "+e);m.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-upgrade-div",width:"45%",innerHTML:n[2]+" - "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(n[1],"$0.000a"),tooltip:n[3],clickListener:()=>{t.funds.lt(n[1])?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Insufficient funds"):(t.unlock(n),t.displayCorporationOverviewContent())}}))}}(i,this);m.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("h1",{innerText:"Upgrades",margin:"6px",padding:"6px"}));for(i=0;i<d;++i)!function(e,t){var n=_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__.CorporationUpgrades[e.toString()];if(null!=n){var i=n[1],a=n[2],r=i*Math.pow(a,t.upgrades[e]);m.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-upgrade-div",width:"45%",innerHTML:n[4]+" - "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(r,"$0.000a"),tooltip:n[5],clickListener:()=>{t.funds.lt(r)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Insufficient funds"):(t.upgrade(n),t.displayCorporationOverviewContent())}}))}else console.log("ERROR: Could not find levelable upgrade index "+e)}(i,this);companyManagementPanel.appendChild(m)}},Corporation.prototype.updateCorporationOverviewContent=function(){var e=document.getElementById("cmpy-mgmt-overview-text");if(null==e)return void console.log("WARNING: Could not find overview text elemtn in updateCorporationOverviewContent()");var t=this.revenue.minus(this.expenses).toNumber(),n=t>=0?_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t,"$0.000a"):"-"+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(-1*t,"$0.000a");let i="";if(this.dividendPercentage>0&&t>0){const e=this.dividendPercentage/100*t,n=t-e,a=e/this.totalShares,r=this.numShares*a;i=`Retained Profits (after dividends): ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(n,"$0.000a")} / s<br><br>`+`Dividend Percentage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.dividendPercentage/100,"0%")}<br>`+`Dividends per share: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(a,"$0.000a")} / s<br>`+`Your earnings as a shareholder (Pre-Tax): ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(r,"$0.000a")} / s<br>`+`Dividend Tax Rate: ${this.dividendTaxPercentage}%<br>`+`Your earnings as a shareholder (Post-Tax): ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(r*(1-this.dividendTaxPercentage/100),"$0.000a")} / s<br><br>`}var a="Total Funds: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.funds.toNumber(),"$0.000a")+"<br>Total Revenue: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.revenue.toNumber(),"$0.000a")+" / s<br>Total Expenses: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.expenses.toNumber(),"$0.000a")+"/ s<br>Total Profits: "+n+" / s<br>"+i+"Publicly Traded: "+(this.public?"Yes":"No")+"<br>Owned Stock Shares: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.numShares,"0.000a")+"<br>Stock Price: "+(this.public?"$"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.sharePrice,2):"N/A")+"<br><p class='tooltip'>Total Stock Shares: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.totalShares,"0.000a")+"<span class='tooltiptext'>"+`Outstanding Shares: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.issuedShares,"0.000a")}<br>`+`Private Shares: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.totalShares-this.issuedShares-this.numShares,"0.000a")}`+"</span></p><br><br>";const r=this.storedCycles*_Constants__WEBPACK_IMPORTED_MODULE_11__.CONSTANTS.MilliPerCycle/1e3;r>15&&(a+=`Bonus Time: ${r} seconds<br><br>`);var o=this.getProductionMultiplier(),s=this.getStorageMultiplier(),l=this.getAdvertisingMultiplier(),c=this.getEmployeeCreMultiplier(),u=this.getEmployeeChaMultiplier(),p=this.getEmployeeIntMultiplier(),m=this.getEmployeeEffMultiplier(),h=this.getSalesMultiplier(),d=this.getScientificResearchMultiplier();o>1&&(a+="Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(o,3)+"<br>"),s>1&&(a+="Storage Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(s,3)+"<br>"),l>1&&(a+="Advertising Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(l,3)+"<br>"),c>1&&(a+="Empl. Creativity Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(c,3)+"<br>"),u>1&&(a+="Empl. Charisma Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(u,3)+"<br>"),p>1&&(a+="Empl. Intelligence Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(p,3)+"<br>"),m>1&&(a+="Empl. Efficiency Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(m,3)+"<br>"),h>1&&(a+="Sales Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(h,3)+"<br>"),d>1&&(a+="Scientific Research Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(d,3)+"<br>"),e.innerHTML=a,sellSharesButton instanceof Element&&(this.shareSaleCooldown<=0?sellSharesButton.className="std-button tooltip":sellSharesButton.className="a-link-button-inactive tooltip"),sellSharesButtonTooltip instanceof Element&&(this.shareSaleCooldown<=0?sellSharesButtonTooltip.innerText="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.":sellSharesButtonTooltip.innerText="Cannot sell shares for "+this.convertCooldownToString(this.shareSaleCooldown)),issueNewSharesButton instanceof Element&&(this.issueNewSharesCooldown<=0?issueNewSharesButton.className="std-button tooltip":issueNewSharesButton.className="a-link-button-inactive tooltip"),issueNewSharesButtonTooltip instanceof Element&&(this.issueNewSharesCooldown<=0?issueNewSharesButtonTooltip.innerText="Issue new equity shares to raise capital":issueNewSharesButtonTooltip.innerText="Cannot issue new shares for "+this.convertCooldownToString(this.issueNewSharesCooldown))},Corporation.prototype.displayDivisionContent=function(e,t){for(var n in this.clearUIPanel(),currentCityUi=t,e.offices)e.offices[n]instanceof OfficeSpace&&this.createCityUITab(n,e);(cityTabs=companyManagementPanel.getElementsByClassName("cmpy-mgmt-city-tab")).length>0&&this.selectCityTab(document.getElementById("cmpy-mgmt-city-"+t+"-tab"),t),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{class:"cmpy-mgmt-city-tab",innerText:"Expand into new City",display:"inline-block",clickListener:()=>{var t="cmpy-mgmt-expand-city-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Would you like to expand into a new city by opening an office? This would cost "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(OfficeInitialCost,"$0.000a")}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{class:"dropdown",margin:"5px"});for(var a in e.offices)e.offices.hasOwnProperty(a)&&(e.offices[a]instanceof OfficeSpace||i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:a,value:a})));var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{innerText:"Confirm",class:"a-link-button",display:"inline-block",margin:"3px",clickListener:()=>{var n=i.options[i.selectedIndex].value;return this.funds.lt(OfficeInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You don't have enough company funds to open a new office!"):(this.funds=this.funds.minus(OfficeInitialCost),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Opened a new office in "+n+"!"),e.offices[n]=new OfficeSpace({loc:n,size:OfficeInitialSize}),this.displayDivisionContent(e,n)),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(t),!1}});const o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(t,{class:"std-button",innerText:"Cancel"});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(t,[n,i,r,o]),!1}})),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}));var i=e.offices[currentCityUi];if(i instanceof OfficeSpace){var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-industry-left-panel",overflow:"visible",padding:"2px"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-industry-right-panel",overflow:"visible",padding:"2px"});companyManagementPanel.appendChild(a),companyManagementPanel.appendChild(r),industryOverviewPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-industry-overview-panel",class:"cmpy-mgmt-industry-overview-panel"}),a.appendChild(industryOverviewPanel),industryEmployeePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-employee-panel",class:"cmpy-mgmt-employee-panel"}),a.appendChild(industryEmployeePanel),industryWarehousePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-warehouse-panel",class:"cmpy-mgmt-warehouse-panel"}),r.appendChild(industryWarehousePanel),industryOverviewText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{}),industryOverviewPanel.appendChild(industryOverviewText),industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}));for(var o=Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades).length;e.upgrades.length<o;)e.upgrades.push(0);var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{});s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("u",{innerText:"Purchases & Upgrades",margin:"2px",padding:"2px",fontSize:"14px"})),s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}));for(let n=0;n<o;++n)e.hasResearch("AutoBrew")&&0==n||function(e,n,i,a){var r=_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades[e.toString()];if(null!=r){var o=r[1],l=r[2],c=0;switch(e){case 0:c=a.employees.length*o;break;default:c=o*Math.pow(l,i.upgrades[e])}s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-upgrade-div",display:"inline-block",innerHTML:r[4]+" - "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(c,"$0.000a"),tooltip:r[5],clickListener:()=>{n.funds.lt(c)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Insufficient funds"):(n.funds=n.funds.minus(c),i.upgrade(r,{corporation:n,office:a}),n.displayDivisionContent(i,t))}})),s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}))}else console.log("ERROR: Could not find levelable upgrade index: "+e)}(n,this,e,i);if(industryOverviewPanel.appendChild(s),e.makesProducts){var l,c;switch(e.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:l="Build Restaurant",c="Build and manage a new restaurant!";break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:l="Create Product",c="Create a new tobacco product!";break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:l="Create Drug",c="Design and develop a new pharmaceutical drug!";break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":l="Create Product",c="Design and manufacture a new computer hardware product!";break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:l="Design Robot",c="Design and create a new robot or robotic system!";break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:l="Develop Software",c="Develop a new piece of software!";break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:l="Build Hospital",c="Build and manage a new hospital!";break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:l="Develop Property",c="Develop a new piece of real estate property!";break;default:return l="Create Product",""}c+="<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.",industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:l,margin:"6px",display:"inline-block",clickListener:()=>{var n="cmpy-mgmt-create-product-popup",i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:c}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{});for(var r in e.offices)e.offices[r]instanceof OfficeSpace&&a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{value:r,text:r}));var o="Product Name";e.type===_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food?o="Restaurant Name":e.type===_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare?o="Hospital Name":e.type===_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate&&(o="Property Name");var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{placeholder:o}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}),u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Design investment"}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Marketing investment"}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Develop Product",clickListener:()=>{null==u.value&&(u.value=0),null==p.value&&(p.value=0);var i=parseFloat(u.value),r=parseFloat(p.value);if(null==s.value||""===s.value)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You must specify a name for your product!");else if(isNaN(i))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value for design investment");else if(isNaN(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value for marketing investment");else if(this.funds.lt(i+r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You don't have enough company funds to make this large of an investment");else{var o=new _Product__WEBPACK_IMPORTED_MODULE_8__.Product({name:s.value.replace(/[<>]/g,""),createCity:a.options[a.selectedIndex].value,designCost:i,advCost:r});this.funds=this.funds.minus(i+r),e.products[o.name]=o,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(n)}return this.displayDivisionContent(e,t),!1}}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(n),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(n,[i,a,s,l,u,p,m,h])}}))}if(industryEmployeeText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{id:"cmpy-mgmt-employee-p",display:"block",innerHTML:"<h1>Office Space</h1><br>Size: "+i.employees.length+" / "+i.size+" employees"}),industryEmployeePanel.appendChild(industryEmployeeText),industryEmployeeHireButton=0===i.employees.length?Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",tooltip:"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position",clickListener:()=>(i.findEmployees({corporation:this,industry:e}),!1)}):Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",clickListener:()=>(i.findEmployees({corporation:this,industry:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeHireButton),industryEmployeeAutohireButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Autohire Employee",fontSize:"13px",tooltip:"Automatically hires an employee and gives him/her a random name",clickListener:()=>(i.hireRandomEmployee({corporation:this,industry:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeAutohireButton),industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{})),industryOfficeUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Upgrade size",display:"inline-block",margin:"6px",fontSize:"13px",tooltip:"Upgrade the office's size so that it can hold more employees!",clickListener:()=>{for(var e="cmpy-mgmt-upgrade-office-size-popup",t=Math.round(i.size/OfficeInitialSize),n=OfficeInitialCost*Math.pow(1.07,t),a=0,r=0;r<5;++r)a+=Math.pow(1.07,t+r);var o=OfficeInitialCost*a,s=this.funds.dividedBy(OfficeInitialCost).toNumber(),l=1;for(a=Math.pow(1.07,t);l<50&&!(a>=s);){var c=Math.pow(1.07,t+l);if(a+c>s)break;a+=c,++l}var u=OfficeInitialCost*a,p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Increase the size of your office space to fit additional employees!"}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Upgrade size: "}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:this.funds.lt(n)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 3",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(n,"$0.000a"),clickListener:()=>(this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(i.size+=OfficeInitialSize,this.funds=this.funds.minus(n),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Office space increased! It can now hold "+i.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:this.funds.lt(o)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 15",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(o,"$0.000a"),clickListener:()=>(this.funds.lt(o)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(i.size+=5*OfficeInitialSize,this.funds=this.funds.minus(o),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Office space increased! It can now hold "+i.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)}),g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:this.funds.lt(u)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by MAX ("+l*OfficeInitialSize+")",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(u,"$0.000a"),clickListener:()=>(this.funds.lt(u)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(i.size+=OfficeInitialSize*l,this.funds=this.funds.minus(u),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Office space increased! It can now hold "+i.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)}),_=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",margin:"4px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(e),!1)});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[p,m,h,d,g,_]),!1}}),industryEmployeePanel.appendChild(industryOfficeUpgradeSizeButton),e.hasResearch("AutoPartyManager")||industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",fontSize:"13px",tooltip:"Throw an office party to increase your employee's morale and happiness",clickListener:()=>{var e,t="cmpy-mgmt-throw-office-party-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.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_22__.createElement)("p",{innerText:"Throwing this party will cost a total of $0"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",margin:"5px",placeholder:"$ / employee",inputListener:()=>{if(isNaN(r.value)||r.value<0)a.innerText="Invalid value entered!";else{var e=r.value*i.employees.length;a.innerText="Throwing this party will cost a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(e,"$0.000a")}},onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",clickListener:()=>{if(isNaN(r.value)||r.value<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("Invalid value entered");else{var e=r.value*i.employees.length;if(this.funds.lt(e))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You don't have enough company funds to throw this party!");else{var n;this.funds=this.funds.minus(e);for(var a=0;a<i.employees.length;++a)n=i.employees[a].throwParty(r.value);Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You threw a party for the office! The morale and happiness of each employee increased by "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(100*(n-1),2)+"%."),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(t)}}return!1}});var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(t,[n,a,r,e,o])}})),industryEmployeeManagementUI=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{}),industryEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{margin:"4px",padding:"4px"}),empManualAssignmentModeActive){industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",margin:"4px",innerText:"Switch to Auto Mode",tooltip:"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job",clickListener:()=>{empManualAssignmentModeActive=!1,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{})),industryIndividualEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{margin:"4px",padding:"4px"});for(var u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{color:"white",backgroundColor:"black",margin:"4px",padding:"4px",changeListener:()=>{for(var t=u.options[u.selectedIndex].text,n=0;n<i.employees.length;++n)if(i.employees[n].name===t)return Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__.removeChildrenFromElement)(industryIndividualEmployeeInfo),void i.employees[n].createUI(industryIndividualEmployeeInfo,this,e);console.log("ERROR: Employee in selector could not be found")}}),p=0;p<i.employees.length;++p)u.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:i.employees[p].name}));u.selectedIndex=-1,industryEmployeeManagementUI.appendChild(industryEmployeeInfo),industryEmployeeManagementUI.appendChild(u),industryEmployeeManagementUI.appendChild(industryIndividualEmployeeInfo)}else{industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",display:"inline-block",margin:"4px",innerText:"Switch to Manual Mode",tooltip:"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs",clickListener:()=>{empManualAssignmentModeActive=!0,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}));var m=0,h=0,d=0,g=0,_=0,y=0,f=0;for(p=0;p<i.employees.length;++p)switch(i.employees[p].pos){case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations:++m;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer:++h;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business:++d;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management:++g;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD:++_;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned:++y;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training:++f;break;default:console.log("ERROR: Unrecognized employee position: "+i.employees[p].pos)}industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{display:"inline-block",innerText:"Unassigned Employees: "+y})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{})),industryEmployeeManagementUI.appendChild(industryEmployeeInfo),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{}));var b=[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations,_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer,_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business,_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management,_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD,_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training],E=["Manages supply chain operations. Improves production.","Develops and maintains products and production systems. Improves production.","Handles sales and finances. Improves sales.","Leads and oversees employees and office operations. Improves production.","Research new innovative ways to improve the company. Generates Scientific Research","Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations."],v=[m,h,d,g,_,f];for(p=0;p<b.length;++p)!function(n,a){var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("h2",{display:"inline-block",width:"50%",fontSize:"15px",innerText:b[a]+"("+v[a]+")",tooltip:E[a]}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:y>0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"+",clickListener:()=>{i.assignEmployeeToJob(b[a]),n.displayDivisionContent(e,t)}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:v[a]>0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"-",clickListener:()=>{i.unassignEmployeeFromJob(b[a]),n.displayDivisionContent(e,t)}}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{});industryEmployeeManagementUI.appendChild(r),industryEmployeeManagementUI.appendChild(o),industryEmployeeManagementUI.appendChild(s),industryEmployeeManagementUI.appendChild(l)}(this,p)}industryEmployeePanel.appendChild(industryEmployeeManagementUI);var k=e.warehouses[currentCityUi];k instanceof Warehouse?k.createUI({industry:e,company:this}):industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{innerText:"Purchase Warehouse ($5b)",class:"a-link-button",clickListener:()=>(this.funds.lt(WarehouseInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.dialogBoxCreate)("You do not have enough funds to do this!"):(e.warehouses[currentCityUi]=new Warehouse({loc:currentCityUi,size:WarehouseInitialSize}),this.funds=this.funds.minus(WarehouseInitialCost),this.displayDivisionContent(e,currentCityUi)),!1)})),this.updateDivisionContent(e)}else console.log("ERROR: Current city for UI does not have an office space")},Corporation.prototype.updateDivisionContent=function(e){if(e instanceof Industry){var t=1===this.unlockUpgrades[4],n=e.lastCycleRevenue.minus(e.lastCycleExpenses).toNumber(),i=n>=0?_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(n,"$0.000a"):"-"+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(-1*n,"$0.000a"),a="";if(t){var r=e.getAdvertisingFactors(),o=r[1],s=r[2],l=r[3],c=r[0];a="<p class='tooltip'>Advertising Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(c,3)+"<span class='tooltiptext cmpy-mgmt-advertising-info'>Total multiplier for this industry's sales due to its awareness and popularity<br>Awareness Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(Math.pow(o,.85),3)+"<br>Popularity Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(Math.pow(s,.85),3)+"<br>Ratio Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(Math.pow(l,.85),3)+"</span></p><br>"}Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_29__.removeChildrenFromElement)(industryOverviewText),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"Industry: "+e.type+" (Corp Funds: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.funds.toNumber(),"$0.000a")+")<br><br>Awareness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(e.awareness,3)+"<br>Popularity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(e.popularity,3)+"<br>"+a+"<br>Revenue: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(e.lastCycleRevenue.toNumber(),"$0.000a")+" / s<br>Expenses: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(e.lastCycleExpenses.toNumber(),"$0.000a")+" /s<br>Profit: "+i+" / s<br><br>"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{marginTop:"2px",innerText:"Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(e.prodMult,2),tooltip:"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__.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.")}})),Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(industryOverviewText,2),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{display:"inline-block",innerText:"Scientific Research: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(e.sciResearch.qty,3),tooltip:"Scientific Research increases the quality of the materials and products that you produce."})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"help-tip",innerText:"Research",clickListener:()=>{e.createResearchBox()}}));var u=e.offices[currentCityUi];industryEmployeeText.innerHTML="<h1>Office Space</h1><br>Size: "+u.employees.length+" / "+u.size+" employees",u.employees.length>=u.size?(industryEmployeeHireButton.className="a-link-button-inactive",industryEmployeeAutohireButton.className="a-link-button-inactive tooltip"):0===u.employees.length?(industryEmployeeHireButton.className="a-link-button tooltip flashing-button",industryEmployeeAutohireButton.className="a-link-button tooltip"):(industryEmployeeHireButton.className="a-link-button",industryEmployeeAutohireButton.className="a-link-button tooltip");var p=0,m=0,h=0,d=0,g=0,_=0,y=0;for(let e=0;e<u.employees.length;++e)p+=u.employees[e].mor,m+=u.employees[e].hap,h+=u.employees[e].ene,d+=u.employees[e].sal;u.employees.length>0&&(g=p/u.employees.length,_=m/u.employees.length,y=h/u.employees.length),industryEmployeeInfo.innerHTML="Avg Employee Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(g,3)+"<br>Avg Employee Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(_,3)+"<br>Avg Employee Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(y,3)+"<br>Total Employee Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(d,"$0.000a"),t&&(industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Material Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(e.getOfficeProductivity(u),3),tooltip:"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Product Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(e.getOfficeProductivity(u,{forProduct:!0}),3),tooltip:"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerText:"Business Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(e.getBusinessFactor(u),3),tooltip:"The effect this office's 'Business' employees has on boosting sales"})));var f=e.warehouses[currentCityUi];f instanceof Warehouse&&f.updateUI({industry:e,company:this})}else console.log("ERROR: Invalid 'division' argument in Corporation.updateDivisionContent")},Corporation.prototype.createCityUITab=function(e,t){var n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("button",{id:"cmpy-mgmt-city-"+e+"-tab",class:"cmpy-mgmt-city-tab",innerText:e,clickListener:()=>(this.selectCityTab(n,e),this.displayDivisionContent(t,e),!1)});companyManagementPanel.appendChild(n)},Corporation.prototype.selectCityTab=function(e,t){if(null!=e||null!=(e=document.getElementById("cmpy-mgmt-city-"+t+"-tab"))){for(var n=0;n<cityTabs.length;++n)cityTabs[n].className="cmpy-mgmt-city-tab";e.className="cmpy-mgmt-city-tab current"}},Corporation.prototype.clearUI=function(){null!=companyManagementDiv&&Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_31__.removeElementById)(companyManagementDiv.id),companyManagementDiv=null,companyManagementPanel=null,currentCityUi=null,corporationUnlockUpgrades=null,corporationUpgrades=null,sellSharesButton=null,issueNewSharesButton=null,sellSharesButtonTooltip=null,issueNewSharesButtonTooltip=null,industryOverviewPanel=null,industryOverviewText=null,industryEmployeePanel=null,industryEmployeeText=null,industryEmployeeHireButton=null,industryEmployeeAutohireButton=null,industryEmployeeManagementUI=null,industryEmployeeInfo=null,industryIndividualEmployeeInfo=null,industryOfficeUpgradeSizeButton=null,industryWarehousePanel=null,industrySmartSupplyCheckbox=null,industryWarehouseStorageText=null,industryWarehouseUpgradeSizeButton=null,industryWarehouseStateText=null,industryWarehouseMaterials=null,industryWarehouseProducts=null,researchTreeBoxOpened=!1,researchTreeBox=null,companyManagementHeaderTabs=null,headerTabs=null,cityTabs=null,document.getElementById("character-overview-wrapper").style.visibility="visible"},Corporation.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Corporation",this)},Corporation.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Corporation,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Corporation=Corporation}).call(this,__webpack_require__(72))},function(e,t,n){"use strict";n.d(t,"c",function(){return s}),n.d(t,"a",function(){return o}),n.d(t,"b",function(){return l});var i=n(10),a=n(0);function r(e,t,n="",i=""){this.number=e,this.name=t,this.desc=n,this.info=i}let o={};function s(){(o={}).BitNode1=new r(1,"Source Genesis","The original BitNode","The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.<br><br>This is the first BitNode that you play through. It has no special modifications or mechanics.<br><br>Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),o.BitNode2=new r(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.<br><br>Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050s. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.<br><br>In this BitNode:<br><br>Your hacking level is reduced by 20%<br>The growth rate and maximum amount of money available on servers are significantly decreased<br>The amount of money gained from crimes and Infiltration is tripled<br>Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction<br>Every Augmentation in the game will be available through the Factions listed above<br>For every Faction NOT listed above, reputation gains are halved<br>You will no longer gain passive reputation with Factions<br><br>Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File 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.BitNode3=new r(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.<br><br>Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.<br><br>In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: <br><br>The price and reputation cost of all Augmentations is tripled<br>The starting and maximum amount of money on servers is reduced by 75%<br>Server growth rate is reduced by 80%<br>You now only need 75 favour with a faction in order to donate to it, rather than 150<br><br>Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),o.BitNode4=new r(4,"The Singularity","The Man and the Machine","The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. <br><br>In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.<br><br>In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.<br><br>Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use."),o.BitNode5=new r(5,"Artificial Intelligence","Posthuman","They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that couldn't be modeled by 1's and 0's. They were wrong.<br><br>In this BitNode:<br><br>The base security level of servers is doubled<br>The starting money on servers is halved, but the maximum money remains the same<br>Most methods of earning money now give significantly less<br>Infiltration gives 50% more reputation and money<br>Corporations have 50% lower valuations and are therefore less profitable<br>Augmentations are more expensive<br>Hacking experience gain rates are reduced<br><br>Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. <br><br>In addition, this Source-File will unlock the getBitNodeMultipliers() 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%"),o.BitNode6=new r(6,"Bladeburners","Like Tears in Rain","In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:<br><br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 50%<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 50% 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%"),o.BitNode7=new r(7,"Bladeburners 2079","More human than humans","In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: <br><br>The rank you gain from Bladeburner contracts/operations is reduced by 40%<br>Bladeburner skills cost twice as many skill points<br>Augmentations are 3x more expensive<br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 50%<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 50% 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%"),o.BitNode8=new r(8,"Ghost of Wall Street","Money never sleeps","You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.<br><br>In this BitNode:<br><br>You start with $250 million<br>The only way to earn money is by trading on the stock market<br>You start with a WSE membership and access to the TIX API<br>You are able to short stocks and place different types of orders (limit/stop)<br>You can immediately donate to factions to gain reputation<br><br>Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),o.BitNode9=new r(9,"Do Androids Dream?","COMING SOON"),o.BitNode10=new r(10,"Digital Carbon","Your body is not who you are","In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally achieved immortality - at least for those that could afford it.<br><br>This BitNode unlocks Sleeve technology. Sleeve technology allows you to:<br><br>1. Re-sleeve: Purchase and transfer your consciousness into a new body<br>2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously<br><br>In this BitNode:<br><br>Your stats are significantly decreased.<br>All methods of gaining money are half as profitable (except Stock Market)<br>Purchased servers are more expensive, have less max RAM, and a lower maximum limit<br>Augmentations are 5x as expensive and require twice as much reputation<br><br>Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),o.BitNode11=new r(11,"The Big Crash","Okay. Sell it all.","The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period of disorder that eventually lead to the governmental reformation of many global superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.<br><br>In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.<br><br>In this BitNode:<br><br>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%"),o.BitNode12=new r(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.<br><br>Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give 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)"),o.BitNode13=new r(13,"fOS","COMING SOON"),o.BitNode14=new r(14,"","COMING SOON"),o.BitNode15=new r(15,"","COMING SOON"),o.BitNode16=new r(16,"","COMING SOON"),o.BitNode17=new r(17,"","COMING SOON"),o.BitNode18=new r(18,"","COMING SOON"),o.BitNode19=new r(19,"","COMING SOON"),o.BitNode20=new r(20,"","COMING SOON"),o.BitNode21=new r(21,"","COMING SOON"),o.BitNode22=new r(22,"","COMING SOON"),o.BitNode23=new r(23,"","COMING SOON"),o.BitNode24=new r(24,"","COMING SOON")}function l(){for(var e in null==a.a.bitNodeN&&(a.a.bitNodeN=1),i.BitNodeMultipliers)i.BitNodeMultipliers.hasOwnProperty(e)&&(i.BitNodeMultipliers[e]=1);switch(a.a.bitNodeN){case 1:break;case 2:i.BitNodeMultipliers.HackingLevelMultiplier=.8,i.BitNodeMultipliers.ServerGrowthRate=.8,i.BitNodeMultipliers.ServerMaxMoney=.2,i.BitNodeMultipliers.ServerStartingMoney=.4,i.BitNodeMultipliers.CrimeMoney=3,i.BitNodeMultipliers.InfiltrationMoney=3,i.BitNodeMultipliers.FactionWorkRepGain=.5,i.BitNodeMultipliers.FactionPassiveRepGain=0;break;case 3:i.BitNodeMultipliers.RepToDonateToFaction=.5,i.BitNodeMultipliers.AugmentationRepCost=3,i.BitNodeMultipliers.AugmentationMoneyCost=3,i.BitNodeMultipliers.ServerMaxMoney=.2,i.BitNodeMultipliers.ServerStartingMoney=.2,i.BitNodeMultipliers.ServerGrowthRate=.2,i.BitNodeMultipliers.ScriptHackMoney=.2,i.BitNodeMultipliers.CompanyWorkMoney=.25,i.BitNodeMultipliers.CrimeMoney=.25,i.BitNodeMultipliers.HacknetNodeMoney=.25;break;case 4:i.BitNodeMultipliers.ServerMaxMoney=.15,i.BitNodeMultipliers.ServerStartingMoney=.75,i.BitNodeMultipliers.ScriptHackMoney=.2,i.BitNodeMultipliers.CompanyWorkMoney=.1,i.BitNodeMultipliers.CrimeMoney=.2,i.BitNodeMultipliers.HacknetNodeMoney=.05,i.BitNodeMultipliers.CompanyWorkExpGain=.5,i.BitNodeMultipliers.ClassGymExpGain=.5,i.BitNodeMultipliers.FactionWorkExpGain=.5,i.BitNodeMultipliers.HackExpGain=.4,i.BitNodeMultipliers.CrimeExpGain=.5,i.BitNodeMultipliers.FactionWorkRepGain=.75;break;case 5:i.BitNodeMultipliers.ServerMaxMoney=2,i.BitNodeMultipliers.ServerStartingSecurity=2,i.BitNodeMultipliers.ServerStartingMoney=.5,i.BitNodeMultipliers.ScriptHackMoney=.15,i.BitNodeMultipliers.HacknetNodeMoney=.2,i.BitNodeMultipliers.CrimeMoney=.5,i.BitNodeMultipliers.InfiltrationRep=1.5,i.BitNodeMultipliers.InfiltrationMoney=1.5,i.BitNodeMultipliers.AugmentationMoneyCost=2,i.BitNodeMultipliers.HackExpGain=.5,i.BitNodeMultipliers.CorporationValuation=.5;break;case 6:i.BitNodeMultipliers.HackingLevelMultiplier=.4,i.BitNodeMultipliers.ServerMaxMoney=.5,i.BitNodeMultipliers.ServerStartingMoney=.5,i.BitNodeMultipliers.ServerStartingSecurity=1.5,i.BitNodeMultipliers.ScriptHackMoney=.5,i.BitNodeMultipliers.CompanyWorkMoney=.5,i.BitNodeMultipliers.CrimeMoney=.5,i.BitNodeMultipliers.InfiltrationMoney=.5,i.BitNodeMultipliers.CorporationValuation=.2,i.BitNodeMultipliers.HacknetNodeMoney=.2,i.BitNodeMultipliers.FactionPassiveRepGain=0,i.BitNodeMultipliers.HackExpGain=.25;break;case 7:i.BitNodeMultipliers.BladeburnerRank=.6,i.BitNodeMultipliers.BladeburnerSkillCost=2,i.BitNodeMultipliers.AugmentationMoneyCost=3,i.BitNodeMultipliers.HackingLevelMultiplier=.4,i.BitNodeMultipliers.ServerMaxMoney=.5,i.BitNodeMultipliers.ServerStartingMoney=.5,i.BitNodeMultipliers.ServerStartingSecurity=1.5,i.BitNodeMultipliers.ScriptHackMoney=.5,i.BitNodeMultipliers.CompanyWorkMoney=.5,i.BitNodeMultipliers.CrimeMoney=.5,i.BitNodeMultipliers.InfiltrationMoney=.5,i.BitNodeMultipliers.CorporationValuation=.2,i.BitNodeMultipliers.HacknetNodeMoney=.2,i.BitNodeMultipliers.FactionPassiveRepGain=0,i.BitNodeMultipliers.HackExpGain=.25;break;case 8:i.BitNodeMultipliers.ScriptHackMoney=0,i.BitNodeMultipliers.ManualHackMoney=0,i.BitNodeMultipliers.CompanyWorkMoney=0,i.BitNodeMultipliers.CrimeMoney=0,i.BitNodeMultipliers.HacknetNodeMoney=0,i.BitNodeMultipliers.InfiltrationMoney=0,i.BitNodeMultipliers.RepToDonateToFaction=0,i.BitNodeMultipliers.CorporationValuation=0,i.BitNodeMultipliers.CodingContractMoney=0;break;case 10:i.BitNodeMultipliers.HackingLevelMultiplier=.2,i.BitNodeMultipliers.StrengthLevelMultiplier=.4,i.BitNodeMultipliers.DefenseLevelMultiplier=.4,i.BitNodeMultipliers.DexterityLevelMultiplier=.4,i.BitNodeMultipliers.AgilityLevelMultiplier=.4,i.BitNodeMultipliers.CharismaLevelMultiplier=.4,i.BitNodeMultipliers.CompanyWorkMoney=.5,i.BitNodeMultipliers.CrimeMoney=.5,i.BitNodeMultipliers.HacknetNodeMoney=.5,i.BitNodeMultipliers.ManualHackMoney=.5,i.BitNodeMultipliers.ScriptHackMoney=.5,i.BitNodeMultipliers.CodingContractMoney=.5,i.BitNodeMultipliers.InfiltrationMoney=.5,i.BitNodeMultipliers.CorporationValuation=.5,i.BitNodeMultipliers.AugmentationMoneyCost=5,i.BitNodeMultipliers.AugmentationRepCost=2,i.BitNodeMultipliers.PurchasedServerCost=5,i.BitNodeMultipliers.PurchasedServerLimit=.6,i.BitNodeMultipliers.PurchasedServerMaxRam=.5;break;case 11:i.BitNodeMultipliers.ServerMaxMoney=.1,i.BitNodeMultipliers.ServerStartingMoney=.1,i.BitNodeMultipliers.ServerGrowthRate=.5,i.BitNodeMultipliers.ServerWeakenRate=2,i.BitNodeMultipliers.CrimeMoney=3,i.BitNodeMultipliers.CompanyWorkMoney=.5,i.BitNodeMultipliers.HacknetNodeMoney=.1,i.BitNodeMultipliers.AugmentationMoneyCost=2,i.BitNodeMultipliers.InfiltrationMoney=2.5,i.BitNodeMultipliers.InfiltrationRep=2.5,i.BitNodeMultipliers.CorporationValuation=.01;break;case 12:for(var t=0,n=0;n<a.a.sourceFiles.length;n++)12===a.a.sourceFiles[n].n&&(t=a.a.sourceFiles[n].lvl);var r=Math.pow(1.02,t),o=1/r;i.BitNodeMultipliers.HackingLevelMultiplier=o,i.BitNodeMultipliers.ServerMaxMoney=o,i.BitNodeMultipliers.ServerStartingMoney=o,i.BitNodeMultipliers.ServerGrowthRate=o,i.BitNodeMultipliers.ServerWeakenRate=o,i.BitNodeMultipliers.ServerStartingSecurity=1.5,i.BitNodeMultipliers.ManualHackMoney=o,i.BitNodeMultipliers.ScriptHackMoney=o,i.BitNodeMultipliers.CompanyWorkMoney=o,i.BitNodeMultipliers.CrimeMoney=o,i.BitNodeMultipliers.HacknetNodeMoney=o,i.BitNodeMultipliers.CompanyWorkExpGain=o,i.BitNodeMultipliers.ClassGymExpGain=o,i.BitNodeMultipliers.FactionWorkExpGain=o,i.BitNodeMultipliers.HackExpGain=o,i.BitNodeMultipliers.CrimeExpGain=o,i.BitNodeMultipliers.FactionWorkRepGain=o,i.BitNodeMultipliers.FactionPassiveRepGain=o,i.BitNodeMultipliers.RepToDonateToFaction=r,i.BitNodeMultipliers.AugmentationRepCost=r,i.BitNodeMultipliers.AugmentationMoneyCost=r,i.BitNodeMultipliers.InfiltrationMoney=o,i.BitNodeMultipliers.InfiltrationRep=o,i.BitNodeMultipliers.CorporationValuation=o,i.BitNodeMultipliers.BladeburnerRank=o,i.BitNodeMultipliers.BladeburnerSkillCost=r;break;default:console.log("WARNING: Player.bitNodeN invalid")}}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var i=n(12),a=n(111);function r(){var e=Object(a.getRandomByte)(99)+"."+Object(a.getRandomByte)(9)+"."+Object(a.getRandomByte)(9)+"."+Object(a.getRandomByte)(9);return o(e)?r():e}function o(e){for(var t in i.b)if(i.b.hasOwnProperty(t)&&t==e)return!0;return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(15);class a{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],e.name&&(this.name=e.name),this.init()}static fromJSON(e){return i.Generic_fromJSON(a,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 i.Generic_toJSON("Material",this)}}t.Material=a,i.Reviver.constructors.Material=a},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9),a=n(15);class r{static fromJSON(e){return a.Generic_fromJSON(r,e.data)}constructor(e="",t=""){this.fn=(e.endsWith(".txt")?e:`${e}.txt`).replace(/\s+/g,""),this.text=t}append(e){this.text+=e}download(){const e=this.fn,t=new Blob([this.text],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const e=document.createElement("a"),n=URL.createObjectURL(t);e.href=n,e.download=this.fn,document.body.appendChild(e),e.click(),setTimeout(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){i.dialogBoxCreate(`${this.fn}<br /><br />${this.text}`,!0)}toJSON(){return a.Generic_toJSON("TextFile",this)}write(e){this.text=e}}function o(e,t){const n=e.endsWith(".txt")?e:`${e}.txt`;for(const e of t.textFiles)if(e.fn===n)return e;return null}t.TextFile=r,a.Reviver.constructors.TextFile=r,t.getTextFile=o,t.createTextFile=function(e,t,n){if(null!==o(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const i=new r(e,t);return n.textFiles.push(i),i}},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";n.d(t,"a",function(){return _}),n.d(t,"b",function(){return T}),n.d(t,"c",function(){return b}),n.d(t,"d",function(){return A}),n.d(t,"e",function(){return y}),n.d(t,"f",function(){return S});var i=n(10),a=n(1),r=n(11),o=n(38),s=n(0),l=n(9),c=n(21),u=n(15),p=n(2),m=n(13),h=n(3),d=n(61);function g(e,t){var n=Object(d.getElementById)(e);n.innerText!=t&&(n.innerText=t)}function _(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=b();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 _("hacknet-node-"+t);return n.updateMoneyGainRate(),s.a.loseMoney(e),s.a.hacknetNodes.push(n),m.routing.isOn(m.Page.HacknetNodes)&&T(),f(),t}function f(){for(var e=0,t=0;t<s.a.hacknetNodes.length;++t)e+=s.a.hacknetNodes[t].moneyGainRatePerSecond;s.a.totalHacknetNodeProduction=e}function b(){var e=s.a.hacknetNodes.length,t=a.CONSTANTS.HacknetNodePurchaseNextMult;return a.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,v(),S(),!1})};for(var t of[{id:"1x",multiplier:1},{id:"5x",multiplier:5},{id:"10x",multiplier:10},{id:"max",multiplier:0}])e(t)},!1),_.prototype.updateMoneyGainRate=function(){var e=a.CONSTANTS.HacknetNodeMoneyGainPerLevel;this.moneyGainRatePerSecond=this.level*e*Math.pow(1.035,this.ram-1)*((this.cores+5)/6)*s.a.hacknet_node_money_mult*i.BitNodeMultipliers.HacknetNodeMoney,isNaN(this.moneyGainRatePerSecond)&&(this.moneyGainRatePerSecond=0,Object(l.dialogBoxCreate)("Error in calculating Hacknet Node production. Please report to game developer")),f()},_.prototype.calculateLevelUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;if(this.level>=a.CONSTANTS.HacknetNodeMaxLevel)return 1/0;for(var t=a.CONSTANTS.HacknetNodeUpgradeLevelMult,n=0,i=this.level,r=0;r<e;++r)n+=Math.pow(t,i),++i;return a.CONSTANTS.BaseCostForHacknetNode/2*n*s.a.hacknet_node_level_cost_mult},_.prototype.purchaseLevelUpgrade=function(e=1){e=Math.round(e);var t=this.calculateLevelUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.level>=a.CONSTANTS.HacknetNodeMaxLevel)return!1;if(this.level+e>a.CONSTANTS.HacknetNodeMaxLevel){var n=Math.max(0,a.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)},_.prototype.calculateRamUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;if(this.ram>=a.CONSTANTS.HacknetNodeMaxRam)return 1/0;let t=0,n=Math.round(Math.log2(this.ram)),i=this.ram;for(let r=0;r<e;++r){t+=i*a.CONSTANTS.BaseCostFor1GBOfRamHacknetNode*Math.pow(a.CONSTANTS.HacknetNodeUpgradeRamMult,n),i*=2,++n}return t*=s.a.hacknet_node_ram_cost_mult},_.prototype.purchaseRamUpgrade=function(e=1){e=Math.round(e);var t=this.calculateRamUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.ram>=a.CONSTANTS.HacknetNodeMaxRam)return!1;if(this.ram*Math.pow(2,e)>a.CONSTANTS.HacknetNodeMaxRam){var n=Math.max(0,Math.log2(Math.round(a.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},_.prototype.calculateCoreUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;if(this.cores>=a.CONSTANTS.HacknetNodeMaxCores)return 1/0;const t=a.CONSTANTS.BaseCostForHacknetNodeCore,n=a.CONSTANTS.HacknetNodeUpgradeCoreMult;let i=0,r=this.cores;for(let a=0;a<e;++a)i+=t*Math.pow(n,r-1),++r;return i*=s.a.hacknet_node_core_cost_mult},_.prototype.purchaseCoreUpgrade=function(e=1){e=Math.round(e);var t=this.calculateCoreUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.cores>=a.CONSTANTS.HacknetNodeMaxCores)return!1;if(this.cores+e>a.CONSTANTS.HacknetNodeMaxCores){var n=Math.max(0,a.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)},_.prototype.toJSON=function(){return Object(u.Generic_toJSON)("HacknetNode",this)},_.fromJSON=function(e){return Object(u.Generic_fromJSON)(_,e.data)},u.Reviver.constructors.HacknetNode=_;var E=1;function v(){var e=document.getElementById("hacknet-nodes-1x-multiplier"),t=document.getElementById("hacknet-nodes-5x-multiplier"),n=document.getElementById("hacknet-nodes-10x-multiplier"),i=document.getElementById("hacknet-nodes-max-multiplier");e.setAttribute("class","a-link-button"),t.setAttribute("class","a-link-button"),n.setAttribute("class","a-link-button"),i.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"),i.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"):i.setAttribute("class","a-link-button-inactive")}function k(e){if(s.a.money.lt(e.calculateLevelUpgradeCost(1)))return 0;var t=1,n=a.CONSTANTS.HacknetNodeMaxLevel-1,i=a.CONSTANTS.HacknetNodeMaxLevel-e.level;if(s.a.money.gt(e.calculateLevelUpgradeCost(i)))return i;for(;t<=n;){var r=(t+n)/2|0;if(r!=a.CONSTANTS.HacknetNodeMaxLevel&&s.a.money.gt(e.calculateLevelUpgradeCost(r))&&s.a.money.lt(e.calculateLevelUpgradeCost(r+1)))return Math.min(i,r);if(s.a.money.lt(e.calculateLevelUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateLevelUpgradeCost(r)))return Math.min(i,r);t=r+1}}return 0}function O(e){if(s.a.money.lt(e.calculateRamUpgradeCost(1)))return 0;const t=Math.round(Math.log2(a.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 C(e){if(s.a.money.lt(e.calculateCoreUpgradeCost(1)))return 0;var t=1,n=a.CONSTANTS.HacknetNodeMaxCores-1;const i=a.CONSTANTS.HacknetNodeMaxCores-e.cores;if(s.a.money.gt(e.calculateCoreUpgradeCost(i)))return i;for(;t<=n;){let r=(t+n)/2|0;if(r!=a.CONSTANTS.HacknetNodeMaxCores&&s.a.money.gt(e.calculateCoreUpgradeCost(r))&&s.a.money.lt(e.calculateCoreUpgradeCost(r+1)))return Math.min(i,r);if(s.a.money.lt(e.calculateCoreUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateCoreUpgradeCost(r)))return Math.min(i,r);t=r+1}}return 0}function T(){Object(c.clearEventListeners)("hacknet-nodes-purchase-button").addEventListener("click",function(){return y(),!1}),v();for(var e=document.getElementById("hacknet-nodes-list");e.firstChild;)e.removeChild(e.firstChild);for(var t=0;t<s.a.hacknetNodes.length;++t)M(s.a.hacknetNodes[t]);S()}function S(){var e=b(),t=Object(d.getElementById)("hacknet-nodes-purchase-button");g("hacknet-nodes-purchase-button","Purchase Hacknet Node - $"+Object(h.formatNumber)(e,2)),s.a.money.lt(e)?t.setAttribute("class","a-link-button-inactive"):t.setAttribute("class","a-link-button"),g("hacknet-nodes-player-money","$"+Object(h.formatNumber)(s.a.money.toNumber(),2)),g("hacknet-nodes-total-production","$"+Object(h.formatNumber)(s.a.totalHacknetNodeProduction,2)+" / sec");for(var n=0;n<s.a.hacknetNodes.length;++n)P(s.a.hacknetNodes[n])}function M(e){var t=e.name,n=Object(p.createElement)("div",{class:"hacknet-node-level-container row",innerHTML:'<p>Level:</p><span class="text upgradable-info" id="hacknet-node-level-'+t+'"></span>'}),i=Object(p.createElement)("div",{class:"hacknet-node-ram-container row",innerHTML:'<p>RAM:</p><span class="text upgradable-info" id="hacknet-node-ram-'+t+'"></span>'}),a=Object(p.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(p.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(i),r.appendChild(a);var o=Object(p.createElement)("li",{class:"hacknet-node"});o.appendChild(r),n.appendChild(Object(p.createElement)("a",{id:"hacknet-node-upgrade-level-"+t,class:"a-link-button-inactive",clickListener:function(){let t=E;return 0==E&&(t=k(e)),e.purchaseLevelUpgrade(t),S(),!1}})),i.appendChild(Object(p.createElement)("a",{id:"hacknet-node-upgrade-ram-"+t,class:"a-link-button-inactive",clickListener:function(){let t=E;return 0==E&&(t=O(e)),e.purchaseRamUpgrade(t),S(),!1}})),a.appendChild(Object(p.createElement)("a",{id:"hacknet-node-upgrade-core-"+t,class:"a-link-button-inactive",clickListener:function(){let t=E;return 0==E&&(t=C(e)),e.purchaseCoreUpgrade(t),S(),!1}})),document.getElementById("hacknet-nodes-list").appendChild(o),P(e)}function P(e){var t=e.name;g("hacknet-node-name-"+t,t),g("hacknet-node-total-production-"+t,"$"+Object(h.formatNumber)(e.totalMoneyGenerated,2)),g("hacknet-node-production-rate-"+t,"($"+Object(h.formatNumber)(e.moneyGainRatePerSecond,2)+" / sec)"),g("hacknet-node-level-"+t,e.level),g("hacknet-node-ram-"+t,e.ram+"GB"),g("hacknet-node-cores-"+t,e.cores);var n=Object(d.getElementById)("hacknet-node-upgrade-level-"+t);if(e.level>=a.CONSTANTS.HacknetNodeMaxLevel)g("hacknet-node-upgrade-level-"+t,"MAX LEVEL"),n.setAttribute("class","a-link-button-inactive");else{let o=0;if(0==E)o=k(e);else{var i=a.CONSTANTS.HacknetNodeMaxLevel-e.level;o=Math.min(i,E)}var r=e.calculateLevelUpgradeCost(o);g("hacknet-node-upgrade-level-"+t,"Upgrade x"+o+" - $"+Object(h.formatNumber)(r,2)),s.a.money.lt(r)?n.setAttribute("class","a-link-button-inactive"):n.setAttribute("class","a-link-button")}var o=Object(d.getElementById)("hacknet-node-upgrade-ram-"+t);if(e.ram>=a.CONSTANTS.HacknetNodeMaxRam)g("hacknet-node-upgrade-ram-"+t,"MAX RAM"),o.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==E)n=O(e);else{i=Math.round(Math.log2(a.CONSTANTS.HacknetNodeMaxRam/e.ram));n=Math.min(i,E)}var l=e.calculateRamUpgradeCost(n);g("hacknet-node-upgrade-ram-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(l,2)),s.a.money.lt(l)?o.setAttribute("class","a-link-button-inactive"):o.setAttribute("class","a-link-button")}var c=Object(d.getElementById)("hacknet-node-upgrade-core-"+t);if(e.cores>=a.CONSTANTS.HacknetNodeMaxCores)g("hacknet-node-upgrade-core-"+t,"MAX CORES"),c.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==E)n=C(e);else{i=a.CONSTANTS.HacknetNodeMaxCores-e.cores;n=Math.min(i,E)}var u=e.calculateCoreUpgradeCost(n);g("hacknet-node-upgrade-core-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(u,2)),s.a.money.lt(u)?c.setAttribute("class","a-link-button-inactive"):c.setAttribute("class","a-link-button")}}function A(e){for(var t=0,n=0;n<s.a.hacknetNodes.length;++n)t+=w(e,s.a.hacknetNodes[n]);return t}function w(e,t){var n=1e3/r.Engine._idleSpeed,i=t.moneyGainRatePerSecond/n;isNaN(i)&&(console.error("Hacknet Node '"+t.name+"' Calculated earnings is NaN"),i=0);var a=e*i;return t.totalMoneyGenerated+=a,t.onlineTimeSeconds+=e*(r.Engine._idleSpeed/1e3),s.a.gainMoney(a),a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(15),a=n(105),r=n(1),o={name:"",info:"",companyPositions:{},expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0};class s{static fromJSON(e){return i.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 a.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 i.Generic_toJSON("Company",this)}}t.Company=s,i.Reviver.constructors.Company=s},function(e,t,n){"use strict";n.d(t,"a",function(){return C}),n.d(t,"b",function(){return T}),n.d(t,"c",function(){return S});var i=n(30),a=n(0),r=n(12),o=n(4),s=n(9),l=n(86),c=n(63),u=n(2),p=n(90),m=n(42),h=n(61),d=n(91),g=n(3),_=n(27),y=n(66),f=n(95),b=n(13);let E={},v=[];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,"&nbsp;")},O=e=>{const t=E[e.hostname];if(null===t||void 0===t)return;const n=""+Object(f.roundToTwo)(e.ramUsed/e.maxRam);t.header.dataset.ramPercentage!==n&&(t.header.dataset.ramPercentage=n,t.header.innerHTML=k(e))};function C(e){var t=Object(r.e)(e.serverIp);if(null==t)return void console.log("ERROR: Invalid server IP for workerscript in addActiveScriptsItem()");let n=t.hostname;v.push(function(e,n){null==E[n]&&function(e){let t=e.hostname;var n=document.getElementById("active-scripts-list");let i=Object(l.createAccordionElement)({hdrText:k(e)}),a=i[0];var r=i[1];let o=i[2];if(null==E[t]){var s=Object(u.createElement)("ul");return o.appendChild(s),n.appendChild(a),E[t]={header:r,panel:o,panelList:s,scripts:{},scriptHdrs:{},scriptStats:{}},a}console.log("WARNING: Tried to create already-existing Active Scripts Server panel. This is most likely fine. It probably means many scripts just got started up on a new server. Aborting")}(t);for(var a=["active","scripts",n,e.name],r=0;r<e.args.length;++r)a.push(String(e.args[r]));var o=a.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(i.d)(e.scriptRef,e.scriptRef.scriptRef.server),Object(s.dialogBoxCreate)("Killing script, may take a few minutes to complete..."),!1)})),E[n].panelList.appendChild(m),E[n].scripts[o]=m,E[n].scriptHdrs[o]=h,E[n].scriptStats[o]=_}.bind(null,e,n))}function T(e){v.push(function(e){var t=Object(r.e)(e.serverIp);if(null==t)throw new Error("ERROR: Invalid server IP for workerscript. This most likely occurred because you tried to delete a large number of scripts and also deleted servers at the same time. It's not a big deal, just save and refresh the game.");let n=t.hostname;if(null==E[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 i=["active","scripts",t.hostname,e.name],a=0;a<e.args.length;++a)i.push(String(e.args[a]));var o=i.join("-");let s=E[n].scripts[o];if(null==s)return console.log("ERROR: Cannot find Active Script UI element for workerscript: "),void console.log(e);Object(y.removeElement)(s),delete E[n].scripts[o],delete E[n].scriptHdrs[o],delete E[n].scriptStats[o],0===Object.keys(E[n].scripts).length&&function(e){let t=e.hostname;null!=E[t]?Object.keys(E[t].scripts).length>0?console.log("WARNING: Tried to delete Active Scripts Server panel that still has scripts. Aborting"):(Object(y.removeElement)(E[t].panel),Object(y.removeElement)(E[t].header),delete E[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,v.length);for(let e=0;e<t;++e){let e=v.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<i.h.length;++r)try{n+=M(i.h[r])}catch(e){Object(m.exceptionAlert)(e)}return Object(h.getElementById)("active-scripts-total-production-active").innerText=o.numeralWrapper.format(n,"$0.000a"),Object(h.getElementById)("active-scripts-total-prod-aug-total").innerText=o.numeralWrapper.format(a.a.scriptProdSinceLastAug,"$0.000a"),Object(h.getElementById)("active-scripts-total-prod-aug-avg").innerText=o.numeralWrapper.format(a.a.scriptProdSinceLastAug/(a.a.playtimeSinceLastAug/1e3),"$0.000a"),n}}function M(e){var t=Object(r.e)(e.serverIp);if(null==t)return void console.log("ERROR: Invalid server IP for workerscript.");let n=t.hostname;if(null!=E[n]){O(t);for(var i=["active","scripts",t.hostname,e.name],a=0;a<e.args.length;++a)i.push(String(e.args[a]));var o=i.join("-");if(null!=E[n].scriptStats[o])return function(e,t,n){var i=Object(r.e)(e.serverIp);if(null==i)return void console.log("ERROR: Invalid server IP for workerscript.");let a=i.hostname;if(null==E[a]||null==E[a].scriptHdrs[n])return void console.log("ERROR: Trying to update Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: "+a);O(i);var o=e.scriptRef.onlineMoneyMade/e.scriptRef.onlineRunningTime;if(!1===E[a].header.classList.contains("active"))return o;if(!1===E[a].scriptHdrs[n].classList.contains("active"))return o;Object(_.removeChildrenFromElement)(t);var s="Total online production: $"+Object(g.formatNumber)(e.scriptRef.onlineMoneyMade,2),l=(Array(26).join(" ")+Object(g.formatNumber)(e.scriptRef.onlineExpGained,2)+" hacking exp").replace(/ /g,"&nbsp;"),c="Online production rate: $"+Object(g.formatNumber)(o,2)+"/second",u=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime,p=(Array(25).join(" ")+Object(g.formatNumber)(u,4)+" hacking exp/second").replace(/ /g,"&nbsp;"),m="Total offline production: $"+Object(g.formatNumber)(e.scriptRef.offlineMoneyMade,2),h=(Array(27).join(" ")+Object(g.formatNumber)(e.scriptRef.offlineExpGained,2)+" hacking exp").replace(/ /g,"&nbsp;"),d=e.scriptRef.offlineMoneyMade/e.scriptRef.offlineRunningTime,y="Offline production rate: $"+Object(g.formatNumber)(d,2)+"/second",f=e.scriptRef.offlineExpGained/e.scriptRef.offlineRunningTime,b=(Array(26).join(" ")+Object(g.formatNumber)(f,4)+" hacking exp/second").replace(/ /g,"&nbsp;");return t.innerHTML=s+"<br>"+l+"<br>"+c+"<br>"+p+"<br>"+m+"<br>"+h+"<br>"+y+"<br>"+b+"<br>",o}(e,E[n].scriptStats[o],o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),a=n(66);t.createPopupCloseButton=function(e,t){let n;function r(e){27===e.keyCode&&n.click()}return n=i.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)a.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&a.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";Object.defineProperty(t,"__esModule",{value:!0});const i=n(235),a=n(28);t.DarkWebItems={BruteSSHProgram:new i.DarkWebItem(a.Programs.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new i.DarkWebItem(a.Programs.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new i.DarkWebItem(a.Programs.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new i.DarkWebItem(a.Programs.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new i.DarkWebItem(a.Programs.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new i.DarkWebItem(a.Programs.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new i.DarkWebItem(a.Programs.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new i.DarkWebItem(a.Programs.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'"),ServerProfilerProgram:new i.DarkWebItem(a.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 a});var i=n(19);function a(){this.data=[]}a.prototype.write=function(e){return this.data.push(e),this.data.length>i.Settings.MaxPortCapacity?this.data.shift():null},a.prototype.tryWrite=function(e){return!(this.data.length>=i.Settings.MaxPortCapacity)&&(this.data.push(e),!0)},a.prototype.read=function(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()},a.prototype.peek=function(){return 0===this.data.length?"NULL PORT DATA":this.data.slice()[0]},a.prototype.full=function(){return this.data.length==i.Settings.MaxPortCapacity},a.prototype.empty=function(){return 0===this.data.length},a.prototype.clear=function(){this.data.length=0}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return A}),n.d(t,"a",function(){return R});var i=n(49),a=n(20),r=(n(105),n(1)),o=n(11),s=n(16),l=n(51),c=n(52),u=n(57),p=n(75),m=n(46),h=n(0),d=n(33),g=n(12),_=n(19),y=n(37),f=n(24),b=n(9),E=n(97),v=n(21),k=n(15),O=n(2),C=n(40),T=n(84),S=n(4),M=n(23),P=n(39);let A=new w;function w(){this.PlayerSave="",this.AllServersSave="",this.CompaniesSave="",this.FactionsSave="",this.SpecialServerIpsSave="",this.AliasesSave="",this.GlobalAliasesSave="",this.MessagesSave="",this.StockMarketSave="",this.SettingsSave="",this.FconfSettingsSave="",this.VersionSave="",this.AllGangsSave="",this.CorporationResearchTreesSave=""}function x(e){if(e<="0.41.2")for(var t in null!=h.a.companyPosition&&"string"!=typeof h.a.companyPosition&&(console.log("Changed Player.companyPosition value to be compatible with v0.41.2"),h.a.companyPosition=h.a.companyPosition.data.positionName,null==h.a.companyPosition&&(h.a.companyPosition="")),a.Companies){const e=a.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"&&(""!==h.a.companyName&&null!=h.a.companyPosition&&""!==h.a.companyPosition&&(console.log("Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0"),h.a.jobs[h.a.companyName]=h.a.companyPosition),delete h.a.companyPosition)}function R(e){if(""===e||null==e||void 0===e){if(!window.localStorage.getItem("bitburnerSave"))return console.log("No save file to load"),!1;e=decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave")))),console.log("Loading game from localStorage")}else e=decodeURIComponent(escape(atob(e))),console.log("Loading game from IndexedDB");var t=JSON.parse(e,k.Reviver);if(Object(h.b)(t.PlayerSave),Object(g.g)(t.AllServersSave),Object(a.loadCompanies)(t.CompaniesSave),Object(s.loadFactions)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(i.c)(t.AliasesSave)}catch(e){Object(i.c)("")}else Object(i.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(i.d)(t.GlobalAliasesSave)}catch(e){Object(i.d)("")}else Object(i.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(m.e)(t.MessagesSave)}catch(e){Object(m.d)()}else Object(m.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.k)(t.StockMarketSave)}catch(e){Object(f.k)("")}else Object(f.k)("");if(t.hasOwnProperty("SettingsSave"))try{_.Settings.load(t.SettingsSave)}catch(e){console.log("ERROR: Failed to parse Settings. Re-initing default values"),_.Settings.init()}else _.Settings.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(c.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,k.Reviver);x(n),window.location.href.toLowerCase().includes("bitburner-beta")?Object(b.dialogBoxCreate)("You are playing on the beta environment! This branch of the game features the latest developments in the game. This version may be unstable.<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&&N()}catch(e){N()}else N();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(u.c)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function N(){Object(b.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 I(t){var n=t.target.files[0];if(n){var v=new FileReader;v.onload=function(t){var n=t.target.result;!function(t,n){var v=null,T=null;try{var A=decodeURIComponent(escape(atob(n)));if(v=new w,v=JSON.parse(A,k.Reviver),(T=JSON.parse(v.PlayerSave,k.Reviver)).money=new P.a(T.money),T.total_money=new P.a(T.total_money),T.lifetime_money=new P.a(T.lifetime_money),JSON.parse(v.AllServersSave,k.Reviver),JSON.parse(v.CompaniesSave,k.Reviver),JSON.parse(v.FactionsSave,k.Reviver),JSON.parse(v.SpecialServerIpsSave,k.Reviver),v.hasOwnProperty("AliasesSave"))try{JSON.parse(v.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Aliases save failed: "+e)}if(v.hasOwnProperty("GlobalAliases"))try{JSON.parse(v.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Global Aliases save failed: "+e)}if(v.hasOwnProperty("MessagesSave"))try{JSON.parse(v.MessagesSave,k.Reviver)}catch(e){console.log("Parsing Messages save failed: "+e),Object(m.d)()}else Object(m.d)();if(t.hasOwnProperty("StockMarketSave"))try{JSON.parse(v.StockMarketSave,k.Reviver)}catch(e){console.log("Parsing StockMarket save failed: "+e)}if(v.hasOwnProperty("VersionSave"))try{x(R=JSON.parse(v.VersionSave,k.Reviver))}catch(e){console.error("Parsing Version save failed: "+e)}if(2==T.bitNodeN&&T.inGang()&&v.hasOwnProperty("AllGangsSave"))try{Object(u.c)(v.AllGangsSave)}catch(e){throw console.error("Failed to parse AllGangsSave: {e}"),e}}catch(e){return Object(b.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(n=decodeURIComponent(escape(atob(n))),t=JSON.parse(n,k.Reviver),Object(h.b)(t.PlayerSave),Object(g.g)(t.AllServersSave),Object(a.loadCompanies)(t.CompaniesSave),Object(s.loadFactions)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(i.c)(t.AliasesSave)}catch(e){Object(i.c)("")}else Object(i.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(i.d)(t.GlobalAliasesSave)}catch(e){Object(i.d)("")}else Object(i.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(m.e)(t.MessagesSave)}catch(e){Object(m.d)()}else Object(m.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.k)(t.StockMarketSave)}catch(e){Object(f.k)("")}else Object(f.k)("");if(t.hasOwnProperty("SettingsSave"))try{_.Settings.load(t.SettingsSave)}catch(e){_.Settings.init()}else _.Settings.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(c.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to load .fconf settings when importing")}if(t.hasOwnProperty("VersionSave"))try{var R;x(R=JSON.parse(t.VersionSave,k.Reviver)),R!=r.CONSTANTS.Version&&N()}catch(e){N()}else N();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(u.c)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}var I="import-game-restart-game-notice",L=Object(O.createElement)("p",{innerText:"Imported game! You need to SAVE the game and then RELOAD the page to make sure everything runs smoothly"}),D=Object(O.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(M.removeElementById)(I)}});Object(C.createPopup)(I,[L,D]),Object(E.a)(),console.log("Importing game"),o.Engine.setDisplayElements(),o.Engine.init(),o.Engine._lastUpdate=(new Date).getTime();var B=h.a.lastUpdate,j=Math.floor((o.Engine._lastUpdate-B)/o.Engine._idleSpeed),W=Object(d.g)();h.a.isWorking&&(console.log("work() called in load() for "+j*o.Engine._idleSpeed+" milliseconds"),h.a.workType==r.CONSTANTS.WorkTypeFaction?h.a.workForFaction(j):h.a.workType==r.CONSTANTS.WorkTypeCreateProgram?h.a.createProgramWork(j):h.a.workType==r.CONSTANTS.WorkTypeStudyClass?h.a.takeClass(j):h.a.workType==r.CONSTANTS.WorkTypeCrime?h.a.commitCrime(j):h.a.workType==r.CONSTANTS.WorkTypeCompanyPartTime?h.a.workPartTime(j):h.a.work(j));var F=Object(p.d)(j);Object(l.d)(j);var U=j*o.Engine._idleSpeed;null==h.a.totalPlaytime&&(h.a.totalPlaytime=0),null==h.a.playtimeSinceLastAug&&(h.a.playtimeSinceLastAug=0),null==h.a.playtimeSinceLastBitnode&&(h.a.playtimeSinceLastBitnode=0),h.a.totalPlaytime+=U,h.a.playtimeSinceLastAug+=U,h.a.playtimeSinceLastBitnode+=U,h.a.reapplyAllAugmentations(),e("#terminal tr:not(:last)").remove(),h.a.lastUpdate=o.Engine._lastUpdate,o.Engine.start(),Object(b.dialogBoxCreate)("While you were offline, your scripts generated <span class='money-gold'>$"+S.numeralWrapper.format(W,"0,0.00")+"</span> and your Hacknet Nodes generated <span class='money-gold'>$"+S.numeralWrapper.format(F,"0,0.00")+"</span>")}(A,n)},v.readAsText(n)}else Object(b.dialogBoxCreate)("Invalid file selected")}w.prototype.getSaveString=function(){this.PlayerSave=JSON.stringify(h.a);var e=JSON.parse(JSON.stringify(g.b),k.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(a.Companies),this.FactionsSave=JSON.stringify(s.Factions),this.SpecialServerIpsSave=JSON.stringify(y.a),this.AliasesSave=JSON.stringify(i.a),this.GlobalAliasesSave=JSON.stringify(i.b),this.MessagesSave=JSON.stringify(m.b),this.StockMarketSave=JSON.stringify(f.c),this.SettingsSave=JSON.stringify(_.Settings),this.FconfSettingsSave=JSON.stringify(c.a),this.VersionSave=JSON.stringify(r.CONSTANTS.Version),2==h.a.bitNodeN&&h.a.inGang()&&(this.AllGangsSave=JSON.stringify(u.a)),btoa(unescape(encodeURIComponent(JSON.stringify(this))))},w.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(T.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(T.createStatusText)("Game saved!")},w.prototype.exportGame=function(){this.PlayerSave=JSON.stringify(h.a),this.AllServersSave=JSON.stringify(g.b),this.CompaniesSave=JSON.stringify(a.Companies),this.FactionsSave=JSON.stringify(s.Factions),this.SpecialServerIpsSave=JSON.stringify(y.a),this.AliasesSave=JSON.stringify(i.a),this.GlobalAliasesSave=JSON.stringify(i.b),this.MessagesSave=JSON.stringify(m.b),this.StockMarketSave=JSON.stringify(f.c),this.SettingsSave=JSON.stringify(_.Settings),this.VersionSave=JSON.stringify(r.CONSTANTS.Version),2==h.a.bitNodeN&&h.a.inGang()&&(this.AllGangsSave=JSON.stringify(u.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(),setTimeout(function(){document.body.removeChild(n),window.URL.revokeObjectURL(o)},0)}},w.prototype.importGame=function(){window.File&&window.FileReader&&window.FileList&&window.Blob?(Object(v.clearEventListeners)("import-game-file-selector").addEventListener("change",I,!1),e("#import-game-file-selector").click()):Object(b.dialogBoxCreate)("ERR: Your browser does not support HTML5 File API. Cannot import.")},w.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(T.createStatusText)("Game deleted!")},w.prototype.toJSON=function(){return Object(k.Generic_toJSON)("BitburnerSaveObject",this)},w.fromJSON=function(e){return Object(k.Generic_fromJSON)(w,e.data)},k.Reviver.constructors.BitburnerSaveObject=w}).call(this,n(72))},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 i=n(0),a=n(69);function r(e,t=""){var n="BitNode"+e,i=a.a[n];if(null==i)throw new Error("Invalid Bit Node for this Source File");this.n=e,this.name="Source-File "+e+": "+i.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 a=0,r=0;r<e.lvl;++r)a+=16/Math.pow(2,r);var s=1+a/100,l=1-a/100;i.a.hacking_chance_mult*=s,i.a.hacking_speed_mult*=s,i.a.hacking_money_mult*=s,i.a.hacking_grow_mult*=s,i.a.hacking_mult*=s,i.a.strength_mult*=s,i.a.defense_mult*=s,i.a.dexterity_mult*=s,i.a.agility_mult*=s,i.a.charisma_mult*=s,i.a.hacking_exp_mult*=s,i.a.strength_exp_mult*=s,i.a.defense_exp_mult*=s,i.a.dexterity_exp_mult*=s,i.a.agility_exp_mult*=s,i.a.charisma_exp_mult*=s,i.a.company_rep_mult*=s,i.a.faction_rep_mult*=s,i.a.crime_money_mult*=s,i.a.crime_success_mult*=s,i.a.hacknet_node_money_mult*=s,i.a.hacknet_node_purchase_cost_mult*=l,i.a.hacknet_node_ram_cost_mult*=l,i.a.hacknet_node_core_cost_mult*=l,i.a.hacknet_node_level_cost_mult*=l,i.a.work_money_mult*=s;break;case 2:for(a=0,r=0;r<e.lvl;++r)a+=24/Math.pow(2,r);s=1+a/100;i.a.crime_money_mult*=s,i.a.crime_success_mult*=s,i.a.charisma_mult*=s;break;case 3:for(a=0,r=0;r<e.lvl;++r)a+=8/Math.pow(2,r);s=1+a/100;i.a.charisma_mult*=s,i.a.work_money_mult*=s;break;case 4:break;case 5:for(a=0,r=0;r<e.lvl;++r)a+=8/Math.pow(2,r);s=1+a/100;i.a.hacking_chance_mult*=s,i.a.hacking_speed_mult*=s,i.a.hacking_money_mult*=s,i.a.hacking_grow_mult*=s,i.a.hacking_mult*=s,i.a.hacking_exp_mult*=s;break;case 6:for(a=0,r=0;r<e.lvl;++r)a+=8/Math.pow(2,r);s=1+a/100;i.a.strength_exp_mult*=s,i.a.defense_exp_mult*=s,i.a.dexterity_exp_mult*=s,i.a.agility_exp_mult*=s,i.a.strength_mult*=s,i.a.defense_mult*=s,i.a.dexterity_mult*=s,i.a.agility_mult*=s;break;case 7:for(a=0,r=0;r<e.lvl;++r)a+=8/Math.pow(2,r);s=1+a/100;i.a.bladeburner_max_stamina_mult*=s,i.a.bladeburner_stamina_gain_mult*=s,i.a.bladeburner_analysis_mult*=s,i.a.bladeburner_success_chance_mult*=s;break;case 8:for(a=0,r=0;r<e.lvl;++r)a+=12/Math.pow(2,r);s=1+a/100;i.a.hacking_grow_mult*=s;break;case 10:break;case 11:for(a=0,r=0;r<e.lvl;++r)a+=24/Math.pow(2,r);s=1+a/100;i.a.work_money_mult*=s,i.a.company_rep_mult*=s;break;case 12:var c=Math.pow(1.01,e.lvl),u=Math.pow(.99,e.lvl);i.a.hacking_chance_mult*=c,i.a.hacking_speed_mult*=c,i.a.hacking_money_mult*=c,i.a.hacking_grow_mult*=c,i.a.hacking_mult*=c,i.a.strength_mult*=c,i.a.defense_mult*=c,i.a.dexterity_mult*=c,i.a.agility_mult*=c,i.a.charisma_mult*=c,i.a.hacking_exp_mult*=c,i.a.strength_exp_mult*=c,i.a.defense_exp_mult*=c,i.a.dexterity_exp_mult*=c,i.a.agility_exp_mult*=c,i.a.charisma_exp_mult*=c,i.a.company_rep_mult*=c,i.a.faction_rep_mult*=c,i.a.crime_money_mult*=c,i.a.crime_success_mult*=c,i.a.hacknet_node_money_mult*=c,i.a.hacknet_node_purchase_cost_mult*=u,i.a.hacknet_node_ram_cost_mult*=u,i.a.hacknet_node_core_cost_mult*=u,i.a.hacknet_node_level_cost_mult*=u,i.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});const i=n(61),a=3e3;let r;t.createStatusText=function(e){void 0!==r&&(clearTimeout(r),r=void 0);const t=i.getElementById("status-text");t.classList.add("status-text"),t.innerText=e,r=setTimeout(()=>{t.classList.remove("status-text"),t.innerText=""},a)}},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}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2);t.createAccordionElement=function(e){const t=i.createElement("li"),n=i.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}),a=i.createElement("div",{class:"accordion-panel",id:void 0!==e.id?`${e.id}-panel`:void 0,innerHTML:e.panelText});return t.appendChild(n),t.appendChild(a),[t,n,a]}},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});const i=n(1);t.SourceFileFlags=Array(i.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 i=e.sourceFiles[n];t.SourceFileFlags[i.n]=i.lvl}}},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";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),i=Math.max(t.totalTicks-n,0);return`[${"|".repeat(n)}${"-".repeat(i)}]`}},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 i=n(30),a=n(21),r=n(63);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(a.clearEventListeners)("log-box-kill-script").addEventListener("click",()=>(Object(i.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(72))},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(117),a=(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(361),n(360),n(359),n(358),n(357),n(356),n(355),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(342),n(341),n(340),n(339),n(338),n(337),n(336),n(335),n(334),n(333),n(332),n(331),n(330),n(329),n(328),n(327),n(326),n(325),n(324),n(244),n(50)),r=n.n(a),o=(n(323),n(242),n(322),n(321),n(320),n(319),n(318),n(240),n(317),n(174),n(239),n(316),n(315),n(314),n(313),n(312),n(311),n(310),n(309),n(308),n(307),n(306),n(305),n(238),n(47)),s=n(45),l=n(19),c=n(21),u=n(2),p=n(55),m=(n(99),n(27));window.JSHINT=n(304).JSHINT;const h=20;const d=new class extends i.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="",i="";for(let e=1;e<=h;++e)n+=".CodeMirror .cm-whitespace-"+e+'::before { content: "'+(i+="·")+'";}\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 a=[];var s=Object(o.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(a.push(e),["bladeburner","hacknet","codingcontract","gang"].includes(e))){let t=s[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)a.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(...a);let n=t.list||[],i=e.getCursor(),o=e.getLine(i.line),s=i.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(i.line,s),to:r.a.Pos(i.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,i=0;i<c.options.length;++i)if(c.options[i].value===l.Settings.EditorTheme){n=i;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,i=0;i<g.options.length;++i)if(g.options[i].value===l.Settings.EditorKeybinding){n=i;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},i=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",i)):(this.vimCommandDisplayWrapper.style.display="none",this.editor.off("vim-keypress",n),this.editor.off("vim-command-done",i)),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 y=t("script-editor-option-showinvisibles","Show Invisible Checkbox");y.onchange=(()=>{const e={name:"invisibles",token:function(e){var t,n=0,i=" "===e.peek();if(i){for(;i&&n<h;)++n,e.next(),i=" "===e.peek();t="whitespace whitespace-"+n}else{for(;!e.eol()&&!i;)e.next(),i=" "===e.peek();t="cm-eol"}return t}};y.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="")}),y.onchange();const f=t("script-editor-option-usesofttab","Soft Tab Checkbox");function a(t){const n=e(t);return Object(m.removeChildrenFromElement)(n),n.style.display="block",n}f.onchange=(()=>{this.editor.setOption("indentWithTabs",!f.checked),f.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")}),f.onchange();const b=a("script-editor-option-flex1-fieldset"),E="script-editor-option-flex1";b.appendChild(Object(u.createElement)("label",{for:E,innerText:"Auto-Close Brackets/Quotes"}));const v=Object(u.createElement)("input",{checked:!0,id:E,name:E,type:"checkbox"});b.appendChild(v),v.onchange=(()=>{this.editor.setOption("autoCloseBrackets",v.checked)}),v.onchange();const k=a("script-editor-option-flex2-fieldset"),O="script-editor-option-flex2";k.appendChild(Object(u.createElement)("label",{for:O,innerText:"Enable Linting"}));const C=Object(u.createElement)("input",{checked:!0,id:O,name:O,type:"checkbox"});k.appendChild(C),C.onchange=(()=>{C.checked?this.editor.setOption("lint",r.a.lint.netscript):this.editor.setOption("lint",!1)}),C.onchange();const T=a("script-editor-option-flex3-fieldset"),S="script-editor-option-flex3";T.appendChild(Object(u.createElement)("label",{for:S,innerText:"Continue Comments"}));const M=Object(u.createElement)("input",{checked:!0,id:S,name:S,type:"checkbox"});T.appendChild(M),M.onchange=(()=>{this.editor.setOption("continueComments",M.checked)}),M.onchange(),function(e){const t=a(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 i=n(117),a=n(47),r=n(19),o=n(45),s=n(21),l=n(2),c=n(55),u=(n(99),n(27));const p=n(392);n(391),n(245),n(390),n(389),n(388),n(387),n(386),n(385),n(384),n(383),n(382),n(381),n(380);const m={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};const h=new class extends i.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,i,r){if(0!==i.length){var o=[],s=Object(a.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(o.push({name:e,value:e}),["bladeburner","hacknet","codingcontract","gang"].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,i=0;i<h.options.length;++i)if(h.options[i].value===r.Settings.EditorTheme){n=i;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,i=0;i<d.options.length;++i)if(d.options[i].value===r.Settings.EditorKeybinding){n=i;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 y=t("script-editor-option-usesofttab","Soft Tab Checkbox");function a(t){const n=e(t);return Object(u.removeChildrenFromElement)(n),n.style.display="block",n}function p(e){const t=a(e);return t.style.display="none",t}y.onchange=(()=>{this.editor.getSession().setUseSoftTabs(y.checked)});const f=a("script-editor-option-flex1-fieldset"),b="script-editor-option-maxerr",E=Object(l.createElement)("em",{innerText:"200"});f.appendChild(Object(l.createElement)("label",{for:b,innerText:"Max Error Count"}));const v=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:v.value}]),E.innerText=v.value}});f.appendChild(v),f.appendChild(E),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}),t.roundToTwo=function(e){return+`${Math.round(parseFloat(`${e}e+2`))}e-2`}},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return r});var i=n(9);function a(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(i.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/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/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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(e,t,n),e="The Secret War",n="",o[t="the-secret-war.lit"]=new a(e,t,n)}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return r}),n.d(t,"a",function(){return a}),e(document).click(function(t){i&&null==e(t.target).closest(".game-options-box").get(0)&&a()});var i=!1;function a(){i=!1,document.getElementById("game-options-container").style.display="none"}function r(){document.getElementById("game-options-container").style.display="flex",setTimeout(function(){i=!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 a(),!1})},!1)}).call(this,n(72))},,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";(function(e){n.d(t,"a",function(){return R}),n.d(t,"b",function(){return N});n(77);var i=n(14),a=n(65),r=n(6),o=n(69),s=n(35),l=n(116),c=n(20),u=n(25),p=n(28),m=n(11),h=n(62),d=n(16),g=n(51),_=(n(57),n(106),n(46)),y=n(47),f=n(30),b=n(0),E=n(12),v=n(88),k=n(37),O=n(24),C=n(58),T=n(39),S=n(9),M=n(23),P=n(2),A=n(40),w=n(42);let x=25e7;function R(){Object(o.b)(),b.a.prestigeAugmentation(),Object(f.e)();var t=b.a.getHomeComputer();for(var n in Object(E.i)(),Object(k.e)(),Object(E.a)(t),Object(E.j)(t),Object(a.b)(r.AugmentationNames.Neurolink)&&i.Augmentations[r.AugmentationNames.Neurolink].owned&&(t.programs.push(p.Programs.FTPCrackProgram.name),t.programs.push(p.Programs.RelaySMTPProgram.name)),Object(a.b)(r.AugmentationNames.CashRoot)&&i.Augmentations[r.AugmentationNames.CashRoot].owned&&(b.a.setMoney(new T.a(1e6)),t.programs.push(p.Programs.BruteSSHProgram.name)),Object(E.f)(),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,C.a.finishAction(!0)),Object(d.initFactions)(),Object(a.d)(),b.a.reapplyAllSourceFiles(),Object(c.initCompanies)(),e("#terminal tr:not(:last)").remove(),Object(C.b)(),Object(_.d)(),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 T.a(x)),(8===b.a.bitNodeN||y.f)&&(b.a.hasWseAccount=!0,b.a.hasTixApiAccess=!0),b.a.hasWseAccount&&(Object(O.h)(),Object(O.j)()),Object(O.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("mainmenu-container").style.visibility="visible",C.a.resetTerminalInput(),m.Engine.loadTerminalContent(),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(a.b)(r.AugmentationNames.TheRedPill)&&i.Augmentations[r.AugmentationNames.TheRedPill].owned){var v=E.b[k.a[k.b.WorldDaemon]],S=E.b[k.a[k.b.DaedalusServer]];v&&S&&(v.serversOnNetwork.push(S.ip),S.serversOnNetwork.push(v.ip))}}function N(){Object(o.b)(),Object(v.updateSourceFileFlags)(b.a),b.a.prestigeSourceFile(),Object(f.e)();var t=b.a.getHomeComputer();Object(E.i)(),Object(k.e)(),Object(E.a)(t),Object(E.j)(t),Object(E.f)();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,C.a.finishAction(!0)),i.Augmentations)i.Augmentations.hasOwnProperty(p)&&delete i.Augmentations[p];if(Object(d.initFactions)(),Object(a.d)(),b.a.reapplyAllSourceFiles(),Object(c.initCompanies)(),e("#terminal tr:not(:last)").remove(),Object(C.b)(),Object(_.d)(),document.getElementById("mainmenu-container").style.visibility="visible",C.a.resetTerminalInput(),m.Engine.loadTerminalContent(),Object(y.g)(),3===b.a.bitNodeN&&(t.messages.push("corporation-management-handbook.lit"),Object(S.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(P.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(P.createElement)("br"),i=Object(P.createElement)("a",{class:"a-link-button",innerText:"Got it!",padding:"8px",clickListener:()=>(Object(M.removeElementById)(e),!1)});Object(A.createPopup)(e,[t,n,i])}).catch(function(e){Object(w.exceptionAlert)(e)})}8===b.a.bitNodeN&&(b.a.money=new T.a(x)),(8===b.a.bitNodeN||y.f)&&(b.a.hasWseAccount=!0,b.a.hasTixApiAccess=!0),10===b.a.bitNodeN&&Object(S.dialogBoxCreate)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),b.a.hasWseAccount&&(Object(O.h)(),Object(O.j)()),Object(O.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(72))},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 i=n(148),a=n(147),r=n(10),o=n(152),s=n(36),l=n(113),c=n(20),u=n(76),p=n(34),m=n(1),h=n(62),d=n(16),g=n(146),_=n(5),y=n(15);class f extends a.Person{constructor(){super(),this.crimeType="",this.currentTask=i.SleeveTaskType.Idle,this.currentTaskLocation="",this.currentTaskMaxTime=0,this.currentTaskTime=0,this.earningsForSleeves=a.createTaskTracker(),this.earningsForPlayer=a.createTaskTracker(),this.earningsForTask=a.createTaskTracker(),this.factionWorkType=g.FactionWorkType.None,this.gainRatesForTask=a.createTaskTracker(),this.gymStatType="",this.logs=[],this.memory=0,this.shock=1,this.storedCycles=0,this.sync=1}static fromJSON(e){return y.Generic_fromJSON(f,e.data)}commitCrime(e,t){const n=s.Crimes[t];return n instanceof o.Crime&&(this.currentTask!==i.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=i.SleeveTaskType.Crime,!0)}finishTask(e){let t=a.createTaskTracker();if(this.currentTask===i.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(e)){const n=a.createTaskTracker(),i=Object.keys(n);for(let e=0;e<i.length;++e){const t=i[e];n[t]=2*this.gainRatesForTask[t]}t=this.gainExperience(e,n),this.gainMoney(e,this.gainRatesForTask)}else t=this.gainExperience(e,this.gainRatesForTask);return this.currentTaskTime=0,t}return this.resetTaskStatus(),t}gainExperience(e,t,n=1,i=!1){if(i)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),a.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 i=t.money*n;this.earningsForTask.money+=i,this.earningsForPlayer.money+=i,e.gainMoney(i)}getRepGain(e){if(this.currentTask!==i.SleeveTaskType.Faction){if(this.currentTask===i.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 i=p.CompanyPositions[e.jobs[t]];if(null==i)return console.error(`Invalid company position name found when trying to calculate rep gain: ${e.jobs[t]}`),0;const a=i.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma),r=1+n.favor/100;return a*this.company_rep_mult*r}return console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`),0}switch(this.factionWorkType){case g.FactionWorkType.Hacking:return this.getFactionHackingWorkRepGain()*(this.shock/100);case g.FactionWorkType.Field:return this.getFactionFieldWorkRepGain()*(this.shock/100);case g.FactionWorkType.Security:return this.getFactionSecurityWorkRepGain()*(this.shock/100);default:return console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`),0}}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=a.createTaskTracker();switch(this.currentTask){case i.SleeveTaskType.Idle:break;case i.SleeveTaskType.Class:case i.SleeveTaskType.Gym:s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);break;case i.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 i.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 i.SleeveTaskType.Recovery:this.shock=Math.min(100,this.shock+1e-4*o);break;case i.SleeveTaskType.Sync:this.sync=Math.min(100,this.sync+1e-4*o)}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===i.SleeveTaskType.Crime?s=this.finishTask(e):this.finishTask(e)),this.updateStatLevels(),this.storedCycles-=o,s}resetTaskStatus(){this.earningsForTask=a.createTaskTracker(),this.gainRatesForTask=a.createTaskTracker(),this.currentTask=i.SleeveTaskType.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=g.FactionWorkType.None,this.crimeType="",this.currentTaskLocation="",this.gymStatType=""}takeUniversityCourse(e,t,n){this.currentTask!==i.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let a=1,r=1;switch(t.toLowerCase()){case _.Locations.AevumSummitUniversity.toLowerCase():if(this.city!==l.Cities.Aevum)return!1;this.currentTaskLocation=_.Locations.AevumSummitUniversity,a=4,r=3;break;case _.Locations.Sector12RothmanUniversity.toLowerCase():if(this.city!==l.Cities.Sector12)return!1;this.currentTaskLocation=_.Locations.Sector12RothmanUniversity,a=3,r=2;break;case _.Locations.VolhavenZBInstituteOfTechnology.toLowerCase():if(this.city!==l.Cities.Volhaven)return!1;this.currentTaskLocation=_.Locations.VolhavenZBInstituteOfTechnology,a=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*a*-1;break;case"networks":this.gainRatesForTask.hack=2*r*this.hacking_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassNetworksBaseCost*a*-1;break;case"algorithms":this.gainRatesForTask.hack=4*r*this.hacking_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassAlgorithmsBaseCost*a*-1;break;case"management":this.gainRatesForTask.cha=2*r*this.charisma_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassManagementBaseCost*a*-1;break;case"leadership":this.gainRatesForTask.cha=4*r*this.charisma_exp_mult,this.gainRatesForTask.money=m.CONSTANTS.ClassLeadershipBaseCost*a*-1;break;default:return!1}return this.currentTask=i.SleeveTaskType.Class,!0}travel(e,t){return null==l.Cities[t]?(console.error(`Invalid city ${t} passed into Sleeve.travel()`),!1):(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!==i.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const n=c.Companies[t],a=p.CompanyPositions[e.jobs[t]];if(null==n)throw new Error(`Invalid company name specified in Sleeve.workForCompany(): ${t}`);if(null==a)throw new Error(`Invalid CompanyPosition data in Sleeve.workForCompany(): ${t}`);return this.gainRatesForTask.money=a.baseSalary*n.salaryMultiplier*this.work_money_mult*r.BitNodeMultipliers.CompanyWorkMoney,this.gainRatesForTask.hack=a.hackingExpGain*n.expMultiplier*this.hacking_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=a.strengthExpGain*n.expMultiplier*this.strength_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=a.defenseExpGain*n.expMultiplier*this.defense_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=a.dexterityExpGain*n.expMultiplier*this.dexterity_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=a.agilityExpGain*n.expMultiplier*this.agility_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.cha=a.charismaExpGain*n.expMultiplier*this.charisma_exp_mult*r.BitNodeMultipliers.FactionWorkExpGain,this.currentTaskLocation=t,this.currentTask=i.SleeveTaskType.Company,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer8Hours,!0}workForFaction(e,t,n){if(!(d.Factions[t]instanceof h.Faction&&e.factions.includes(t)))throw new Error(`Invalid Faction specified for Sleeve.workForFaction(): ${t}`);this.currentTask!==i.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const a=d.Factions[t].getInfo(),o=n.toLowerCase();if(o.includes("hack")){if(!a.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(!a.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(!a.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=i.SleeveTaskType.Faction,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer20Hours,!0}workoutAtGym(e,t,n){this.currentTask!==i.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let a=1,r=1;switch(t.toLowerCase()){case _.Locations.AevumCrushFitnessGym.toLowerCase():if(this.city!=l.Cities.Aevum)return!1;this.currentTaskLocation=_.Locations.AevumCrushFitnessGym,a=3,r=2;break;case _.Locations.AevumSnapFitnessGym.toLowerCase():if(this.city!=l.Cities.Aevum)return!1;this.currentTaskLocation=_.Locations.AevumSnapFitnessGym,a=10,r=5;break;case _.Locations.Sector12IronGym.toLowerCase():if(this.city!=l.Cities.Sector12)return!1;this.currentTaskLocation=_.Locations.Sector12IronGym,a=1,r=1;break;case _.Locations.Sector12PowerhouseGym.toLowerCase():if(this.city!=l.Cities.Sector12)return!1;this.currentTaskLocation=_.Locations.Sector12PowerhouseGym,a=20,r=10;break;case _.Locations.VolhavenMilleniumFitnessGym:if(this.city!=l.Cities.Volhaven)return!1;this.currentTaskLocation=_.Locations.VolhavenMilleniumFitnessGym,a=7,r=4;break;default:return!1}const o=n.toLowerCase();if(this.gainRatesForTask.money=m.CONSTANTS.ClassGymBaseCost*a*-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=i.SleeveTaskType.Gym,!0}toJSON(){return y.Generic_toJSON("Sleeve",this)}}t.Sleeve=f,y.Reviver.constructors.Sleeve=f},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),a=n(41);t.CompanyPosition=class{constructor(e){this.name=e.name,this.nextPosition=e.nextPosition,this.baseSalary=e.baseSalary,this.repMultiplier=e.repMultiplier,this.requiredHacking=null!=e.reqdHacking?e.reqdHacking:0,this.requiredStrength=null!=e.reqdStrength?e.reqdStrength:0,this.requiredDefense=null!=e.reqdDefense?e.reqdDefense:0,this.requiredDexterity=null!=e.reqdDexterity?e.reqdDexterity:0,this.requiredAgility=null!=e.reqdAgility?e.reqdAgility:0,this.requiredCharisma=null!=e.reqdCharisma?e.reqdCharisma:0,this.requiredReputation=null!=e.reqdReputation?e.reqdReputation:0,this.hackingEffectiveness=null!=e.hackingEffectiveness?e.hackingEffectiveness:0,this.strengthEffectiveness=null!=e.strengthEffectiveness?e.strengthEffectiveness:0,this.defenseEffectiveness=null!=e.defenseEffectiveness?e.defenseEffectiveness:0,this.dexterityEffectiveness=null!=e.dexterityEffectiveness?e.dexterityEffectiveness:0,this.agilityEffectiveness=null!=e.agilityEffectiveness?e.agilityEffectiveness:0,this.charismaEffectiveness=null!=e.charismaEffectiveness?e.charismaEffectiveness:0,100!==Math.round(this.hackingEffectiveness+this.strengthEffectiveness+this.defenseEffectiveness+this.dexterityEffectiveness+this.agilityEffectiveness+this.charismaEffectiveness)&&console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),this.hackingExpGain=null!=e.hackingExpGain?e.hackingExpGain:0,this.strengthExpGain=null!=e.strengthExpGain?e.strengthExpGain:0,this.defenseExpGain=null!=e.defenseExpGain?e.defenseExpGain:0,this.dexterityExpGain=null!=e.dexterityExpGain?e.dexterityExpGain:0,this.agilityExpGain=null!=e.agilityExpGain?e.agilityExpGain:0,this.charismaExpGain=null!=e.charismaExpGain?e.charismaExpGain:0}calculateJobPerformance(e,t,n,a,r,o){const s=this.hackingEffectiveness*e/i.CONSTANTS.MaxSkillLevel,l=this.strengthEffectiveness*t/i.CONSTANTS.MaxSkillLevel,c=this.defenseEffectiveness*n/i.CONSTANTS.MaxSkillLevel,u=this.dexterityEffectiveness*a/i.CONSTANTS.MaxSkillLevel,p=this.agilityEffectiveness*r/i.CONSTANTS.MaxSkillLevel,m=this.charismaEffectiveness*o/i.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 a.SoftwareCompanyPositions.includes(this.name)}isITJob(){return a.ITCompanyPositions.includes(this.name)}isSecurityEngineerJob(){return a.SecurityEngineerCompanyPositions.includes(this.name)}isNetworkEngineerJob(){return a.NetworkEngineerCompanyPositions.includes(this.name)}isBusinessJob(){return a.BusinessCompanyPositions.includes(this.name)}isSecurityJob(){return a.SecurityCompanyPositions.includes(this.name)}isAgentJob(){return a.AgentCompanyPositions.includes(this.name)}isSoftwareConsultantJob(){return a.SoftwareConsultantCompanyPositions.includes(this.name)}isBusinessConsultantJob(){return a.BusinessConsultantCompanyPositions.includes(this.name)}isPartTimeJob(){return a.PartTimeCompanyPositions.includes(this.name)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return x}),n.d(t,"b",function(){return R});var i=n(35),a=n(34),r=n(20),o=n(108),s=n(41),l=n(68),c=n(1),u=n(36),p=n(11),m=n(163),h=n(47),d=n(5),g=n(0),_=n(12),y=n(56),f=n(19),b=n(88),E=n(37),v=n(4),k=n(9),O=n(21),C=n(70),T=n(3),S=n(22),M=n(2),P=n(40),A=n(78),w=n(23);function x(){var e=Object(O.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"),k=document.getElementById("location-network-engineer-job"),C=document.getElementById("location-business-job"),S=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(O.clearEventListeners)("location-work"),F=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"),ie=document.getElementById("location-purchase-4gb"),ae=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"),ye=document.getElementById("location-travel-to-chongqing"),fe=document.getElementById("location-travel-to-sector12"),be=document.getElementById("location-travel-to-newtokyo"),Ee=document.getElementById("location-travel-to-ishima"),ve=document.getElementById("location-travel-to-volhaven"),ke=Object(O.clearEventListeners)("location-infiltrate"),Oe=document.getElementById("location-hospital-treatment"),Ce=document.getElementById("location-slums-description"),Te=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"),je=document.getElementById("location-nsa-bladeburner");const We=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",k.style.display="none",C.style.display="none",S.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",k.innerHTML="Apply for Network Engineer Job",C.innerHTML="Apply for Business Job",S.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",ie.style.display="none",ae.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 - "+v.numeralWrapper.formatMoney(Object(y.a)(2)),ie.innerHTML="Purchase 4GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(4)),ae.innerHTML="Purchase 8GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(8)),re.innerHTML="Purchase 16GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(16)),oe.innerHTML="Purchase 32GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(32)),se.innerHTML="Purchase 64GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(64)),le.innerHTML="Purchase 128GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(128)),ce.innerHTML="Purchase 256GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(256)),ue.innerHTML="Purchase 512GB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(512)),pe.innerHTML="Purchase 1TB Server - "+v.numeralWrapper.formatMoney(Object(y.a)(1024)),E.a.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(T.formatNumber)(c.CONSTANTS.TorRouterCost,2)),ge.style.display="none",_e.style.display="none",ye.style.display="none",fe.style.display="none",be.style.display="none",Ee.style.display="none",ve.style.display="none",ke.style.display="none",Oe.style.display="none",Ce.style.display="none",Te.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",je.style.display="none",We.style.display="none",""!=Fe&&Object.keys(g.a.jobs).includes(Fe)){let e=r.Companies[Fe];F.style.display="block",U.style.display="inline",H.style.display="inline",G.style.display="block",K.style.display="block",q.style.display="block",F.innerHTML=`Job Title: ${g.a.jobs[Fe]}`;let t=e.getFavorGain();2!=t.length&&(t=0),t=t[0],U.innerHTML="Company reputation: "+Object(T.formatNumber)(e.playerReputation,4)+"<span class='tooltiptext'>You will earn "+Object(T.formatNumber)(t,0)+" faction favor upon resetting after installing an Augmentation</span>",H.innerHTML="Company Favor: "+Object(T.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=a.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()?k.innerHTML="Apply for a promotion (Network Engineer)":n.isBusinessJob()?C.innerHTML="Apply for a promotion (Business)":n.isBusinessConsultantJob()?S.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 F.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(W(Fe,a.CompanyPositions[s.SoftwareCompanyPositions[0]],o),W(Fe,a.CompanyPositions[s.SoftwareConsultantCompanyPositions[0]],m),W(Fe,a.CompanyPositions[s.ITCompanyPositions[0]],_),W(Fe,a.CompanyPositions[s.SecurityEngineerCompanyPositions[0]],f),W(Fe,a.CompanyPositions[s.NetworkEngineerCompanyPositions[0]],k),W(Fe,a.CompanyPositions[s.BusinessCompanyPositions[0]],C),W(Fe,a.CompanyPositions[s.BusinessConsultantCompanyPositions[0]],S),W(Fe,a.CompanyPositions[s.SecurityCompanyPositions[0]],M),W(Fe,a.CompanyPositions[s.AgentCompanyPositions[0]],P),W(Fe,a.CompanyPositions[s.MiscCompanyPositions[1]],A),W(Fe,a.CompanyPositions[s.PartTimeCompanyPositions[1]],w),W(Fe,a.CompanyPositions[s.MiscCompanyPositions[0]],x),W(Fe,a.CompanyPositions[s.PartTimeCompanyPositions[0]],R),Fe){case d.Locations.AevumTravelAgency:ge.style.display="block",ye.style.display="block",fe.style.display="block",be.style.display="block",Ee.style.display="block",ve.style.display="block";break;case d.Locations.AevumSummitUniversity:var He=3;I(Ge=4),L(Ge,He);break;case d.Locations.AevumECorp:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",k.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",k.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",k.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",k.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",k.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",k.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",k.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",k.style.display="block",ne.style.display="block",ie.style.display="block",ae.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;D(Ge=3),B(Ge,He);break;case d.Locations.AevumSnapFitnessGym:He=5;D(Ge=10),B(Ge,He);break;case d.Locations.ChongqingTravelAgency:ge.style.display="block",_e.style.display="block",fe.style.display="block",be.style.display="block",Ee.style.display="block",ve.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",k.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",k.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",ye.style.display="block",be.style.display="block",Ee.style.display="block",ve.style.display="block";break;case d.Locations.Sector12RothmanUniversity:He=2;I(Ge=3),L(Ge,He);break;case d.Locations.Sector12MegaCorp:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",k.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",k.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",k.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",k.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",k.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",k.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",k.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",k.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 i.a?je.innerText="Enter Bladeburner Headquarters":(j(ke,d.Locations.Sector12NSA,1135,40,80,5),je.innerText="Apply to Bladeburner Division"),je.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",ie.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",k.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;D(Ge=1),B(Ge,He);break;case d.Locations.Sector12PowerhouseGym:He=10;D(Ge=20),B(Ge,He);break;case d.Locations.Sector12CityHall:Be.style.display="block",g.a.corporation instanceof l.a?Be.className="a-link-button-inactive":Be.className="a-link-button";break;case d.Locations.NewTokyoTravelAgency:ge.style.display="block",_e.style.display="block",ye.style.display="block",fe.style.display="block",Ee.style.display="block",ve.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",k.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",k.style.display="block",C.style.display="block",j(ke,d.Locations.NewTokyoVitaLife,605,22,100,3.5),(10===g.a.bitNodeN||b.SourceFileFlags[10])&&(We.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",k.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",ye.style.display="block",fe.style.display="block",be.style.display="block",ve.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",k.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",k.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",ie.style.display="block",ae.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",ye.style.display="block",fe.style.display="block",be.style.display="block",Ee.style.display="block";break;case d.Locations.VolhavenZBInstituteOfTechnology:He=4;I(Ge=5),L(Ge,He);break;case d.Locations.VolhavenOmniTekIncorporated:n.innerHTML=r.Companies[Fe].info,o.style.display="block",_.style.display="block",f.style.display="block",k.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",k.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",k.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",k.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",k.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",k.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",k.style.display="block",ae.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;D(Ge=7),B(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);Ce.style.display="block",Te.style.display="block",Te.innerHTML="Shoplift ("+(100*Ke).toFixed(3)+"% chance of success)",Te.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:Oe.innerText="Get treatment for wounds - $"+Object(T.formatNumber)(Ue,2).toString(),Oe.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 R(){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"),a=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"),f=document.getElementById("location-employee-job"),b=document.getElementById("location-parttime-employee-job"),O=document.getElementById("location-waiter-job"),R=document.getElementById("location-parttime-waiter-job"),N=(document.getElementById("location-work"),document.getElementById("location-purchase-2gb")),I=document.getElementById("location-purchase-4gb"),L=document.getElementById("location-purchase-8gb"),D=document.getElementById("location-purchase-16gb"),B=document.getElementById("location-purchase-32gb"),j=document.getElementById("location-purchase-64gb"),W=document.getElementById("location-purchase-128gb"),H=document.getElementById("location-purchase-256gb"),G=document.getElementById("location-purchase-512gb"),K=document.getElementById("location-purchase-1tb"),q=document.getElementById("location-purchase-tor"),$=document.getElementById("location-purchase-home-ram"),Y=document.getElementById("location-purchase-home-cores"),z=document.getElementById("location-travel-to-aevum"),V=document.getElementById("location-travel-to-chongqing"),J=document.getElementById("location-travel-to-sector12"),X=document.getElementById("location-travel-to-newtokyo"),Q=document.getElementById("location-travel-to-ishima"),Z=document.getElementById("location-travel-to-volhaven"),ee=document.getElementById("location-slums-shoplift"),te=document.getElementById("location-slums-rob-store"),ne=document.getElementById("location-slums-mug"),ie=document.getElementById("location-slums-larceny"),ae=document.getElementById("location-slums-deal-drugs"),re=document.getElementById("location-slums-bond-forgery"),oe=document.getElementById("location-slums-traffic-arms"),se=document.getElementById("location-slums-homicide"),le=document.getElementById("location-slums-gta"),ce=document.getElementById("location-slums-kidnap"),ue=document.getElementById("location-slums-assassinate"),pe=document.getElementById("location-slums-heist"),me=document.getElementById("location-cityhall-create-corporation"),he=document.getElementById("location-nsa-bladeburner");const de=document.getElementById("location-vitalife-resleeve");var ge=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)}),a.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)}),f.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForEmployeeJob(),!1)}),b.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForPartTimeEmployeeJob(),!1)}),O.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForWaiterJob(),!1)}),R.addEventListener("click",function(e){return!!e.isTrusted&&(g.a.applyForPartTimeWaiterJob(),!1)}),N.addEventListener("click",function(e){return!!e.isTrusted&&(U(2),!1)}),I.addEventListener("click",function(e){return!!e.isTrusted&&(U(4),!1)}),L.addEventListener("click",function(e){return!!e.isTrusted&&(U(8),!1)}),D.addEventListener("click",function(e){return!!e.isTrusted&&(U(16),!1)}),B.addEventListener("click",function(e){return!!e.isTrusted&&(U(32),!1)}),j.addEventListener("click",function(e){return!!e.isTrusted&&(U(64),!1)}),W.addEventListener("click",function(e){return!!e.isTrusted&&(U(128),!1)}),H.addEventListener("click",function(e){return!!e.isTrusted&&(U(256),!1)}),G.addEventListener("click",function(e){return!!e.isTrusted&&(U(512),!1)}),K.addEventListener("click",function(e){return!!e.isTrusted&&(U(1024),!1)}),q.addEventListener("click",function(e){return!!e.isTrusted&&(function(){if(g.a.money.lt(c.CONSTANTS.TorRouterCost))return void Object(k.dialogBoxCreate)("You cannot afford to purchase the Tor router");g.a.loseMoney(c.CONSTANTS.TorRouterCost);var e=new _.d({ip:Object(C.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(_.a)(e),E.a.addIp("Darkweb Server",e.ip);const t=document.getElementById("location-purchase-tor");t.setAttribute("class","a-link-button-bought"),t.innerHTML="TOR Router - Purchased",g.a.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(g.a.getHomeComputer().ip),Object(k.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)}),$.addEventListener("click",function(e){if(!e.isTrusted)return!1;const t=g.a.getUpgradeHomeRamCost(),n=g.a.getHomeComputer().maxRam;var i=Object(S.yesNoBoxGetYesButton)(),a=Object(S.yesNoBoxGetNoButton)();i.innerHTML="Purchase",a.innerHTML="Cancel",i.addEventListener("click",()=>{Object(y.d)(t),Object(S.yesNoBoxClose)()}),a.addEventListener("click",()=>{Object(S.yesNoBoxClose)()}),Object(S.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 "+v.numeralWrapper.format(t,"$0.000a"))}),Y.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 i=Object(S.yesNoBoxGetYesButton)(),a=Object(S.yesNoBoxGetNoButton)();i.innerHTML="Purchase",a.innerHTML="Cancel",i.addEventListener("click",()=>{g.a.money.lt(n)?Object(k.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(k.dialogBoxCreate)("You purchased an additional CPU Core for your home computer! It now has "+g.a.getHomeComputer().cpuCores+" cores.")),Object(S.yesNoBoxClose)()}),a.addEventListener("click",()=>{Object(S.yesNoBoxClose)()}),Object(S.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 "+v.numeralWrapper.format(n,"$0.000a"))}}),z.addEventListener("click",function(e){return!!e.isTrusted&&(F(d.Locations.Aevum,c.CONSTANTS.TravelCost),!1)}),V.addEventListener("click",function(e){return!!e.isTrusted&&(F(d.Locations.Chongqing,c.CONSTANTS.TravelCost),!1)}),J.addEventListener("click",function(e){return!!e.isTrusted&&(F(d.Locations.Sector12,c.CONSTANTS.TravelCost),!1)}),X.addEventListener("click",function(e){return!!e.isTrusted&&(F(d.Locations.NewTokyo,c.CONSTANTS.TravelCost),!1)}),Q.addEventListener("click",function(e){return!!e.isTrusted&&(F(d.Locations.Ishima,c.CONSTANTS.TravelCost),!1)}),Z.addEventListener("click",function(e){return!!e.isTrusted&&(F(d.Locations.Volhaven,c.CONSTANTS.TravelCost),!1)}),ee.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Shoplift.commit(g.a),!1)}),te.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.RobStore.commit(g.a),!1)}),ne.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)}),ae.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.DealDrugs.commit(g.a),!1)}),re.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.BondForgery.commit(g.a),!1)}),oe.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.TraffickArms.commit(g.a),!1)}),se.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Homicide.commit(g.a),!1)}),le.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.GrandTheftAuto.commit(g.a),!1)}),ce.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Kidnap.commit(g.a),!1)}),ue.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Assassination.commit(g.a),!1)}),pe.addEventListener("click",function(e){return!!e.isTrusted&&(u.Crimes.Heist.commit(g.a),!1)}),me.addEventListener("click",function(){const e="create-corporation-popup",t=Object(M.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(M.createElement)("input",{placeholder:"Corporation Name"}),i=Object(M.createElement)("button",{class:"popup-box-button",innerText:"Self-Fund",clickListener:()=>{if(g.a.money.lt(15e10))return Object(k.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(k.dialogBoxCreate)("Invalid company name!"),!1):(g.a.corporation=new l.a({name:t}),x(),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(k.dialogBoxCreate)("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City"),Object(w.removeElementById)(e),!1)}}),a=Object(M.createElement)("button",{class:"popup-box-button",innerText:"Use Seed Money",clickListener:()=>{const t=n.value;return null==t||""==t?(Object(k.dialogBoxCreate)("Invalid company name!"),!1):(g.a.corporation=new l.a({name:t}),g.a.corporation.totalShares+=5e8,x(),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(k.dialogBoxCreate)("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City"),Object(w.removeElementById)(e),!1)}}),r=Object(A.createPopupCloseButton)(e,{class:"popup-box-button"});g.a.corporation instanceof l.a||(Object(P.createPopup)(e,[t,n,r,i,a]),n.focus())}),he.addEventListener("click",function(){g.a.bladeburner&&g.a.bladeburner instanceof i.a?p.Engine.loadBladeburnerContent():g.a.strength>=100&&g.a.defense>=100&&g.a.dexterity>=100&&g.a.agility>=100?(g.a.bladeburner=new i.a({new:!0}),Object(k.dialogBoxCreate)("You have been accepted into the Bladeburner division!"),x(),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()):Object(k.dialogBoxCreate)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}),de.addEventListener("click",function(){p.Engine.loadResleevingContent()}),ge.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(k.dialogBoxCreate)("You were healed to full health! The hospital billed you for $"+Object(T.formatNumber)(t,2).toString()),g.a.hp=g.a.max_hp,x(),!1})}function N(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(k.dialogBoxCreate)("You cannot afford to travel to "+e):(g.a.loseMoney(t),g.a.city=e,Object(k.dialogBoxCreate)("You are now in "+e+"!"),p.Engine.loadWorldContent())}function I(e){var t=document.getElementById("location-study-computer-science"),n=document.getElementById("location-data-structures-class"),i=document.getElementById("location-networks-class"),a=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",i.style.display="block",a.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)",i.innerHTML="Take Networks course ($"+l+" / sec)",a.innerHTML="Take Algorithms course ($"+u+" / sec)",r.innerHTML="Take Management course ($"+p+" / sec)",o.innerHTML="Take Leadership course ($"+m+" / sec)"}function L(e,t){Object(O.clearEventListeners)("location-study-computer-science").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassStudyComputerScience),!1}),Object(O.clearEventListeners)("location-data-structures-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassDataStructures),!1}),Object(O.clearEventListeners)("location-networks-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassNetworks),!1}),Object(O.clearEventListeners)("location-algorithms-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassAlgorithms),!1}),Object(O.clearEventListeners)("location-management-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassManagement),!1}),Object(O.clearEventListeners)("location-leadership-class").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassLeadership),!1})}function D(e){var t=document.getElementById("location-gym-train-str"),n=document.getElementById("location-gym-train-def"),i=document.getElementById("location-gym-train-dex"),a=document.getElementById("location-gym-train-agi");t.style.display="block",n.style.display="block",i.style.display="block",a.style.display="block";var r=c.CONSTANTS.ClassGymBaseCost*e;t.innerHTML="Train Strength ($"+r+" / sec)",n.innerHTML="Train Defense ($"+r+" / sec)",i.innerHTML="Train Dexterity ($"+r+" / sec)",a.innerHTML="Train Agility ($"+r+" / sec)"}function B(e,t){Object(O.clearEventListeners)("location-gym-train-str").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymStrength),!1}),Object(O.clearEventListeners)("location-gym-train-def").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymDefense),!1}),Object(O.clearEventListeners)("location-gym-train-dex").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymDexterity),!1}),Object(O.clearEventListeners)("location-gym-train-agi").addEventListener("click",function(){return g.a.startClass(e,t,c.CONSTANTS.ClassGymAgility),!1})}function j(e,t,n,i,a,r){e.style.display="block",e.addEventListener("click",function(){return p.Engine.loadInfiltrationContent(),Object(m.a)(t,n,i,a,r),!1})}function W(e,t,n){var i=r.Companies[e];if(null!=i){var a=g.a.getNextCompanyPosition(i,t);if(null!=a&&i.hasPosition(a)){var s=Object(o.getJobRequirementText)(i,a,!0);n.innerHTML+="<span class='tooltiptext'>"+s+"</span>"}}}function F(e,t){if(f.Settings.SuppressTravelConfirmation)N(e,t);else{var n=Object(S.yesNoBoxGetYesButton)(),i=Object(S.yesNoBoxGetNoButton)();n.innerHTML="Yes",i.innerHTML="No",i.addEventListener("click",()=>(Object(S.yesNoBoxClose)(),!1)),n.addEventListener("click",()=>(Object(S.yesNoBoxClose)(),N(e,t),!1)),Object(S.yesNoBoxCreate)("Would you like to travel to "+e+"? The trip will cost $"+Object(T.formatNumber)(t,2)+".")}}function U(e){const t=Object(y.a)(e);if(t!==1/0){var n=Object(S.yesNoTxtInpBoxGetYesButton)(),i=Object(S.yesNoTxtInpBoxGetNoButton)();n.innerHTML="Purchase Server",i.innerHTML="Cancel",n.addEventListener("click",function(){Object(y.e)(e),Object(S.yesNoTxtInpBoxClose)()}),i.addEventListener("click",function(){Object(S.yesNoTxtInpBoxClose)()}),Object(S.yesNoTxtInpBoxCreate)("Would you like to purchase a new server with "+e+"GB of RAM for $"+Object(T.formatNumber)(t,2)+"?<br><br>Please enter the server hostname below:<br>")}else Object(k.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.getJobRequirementText=function(e,t,n=!1){let i="";const a=e.jobStatReqOffset,r=t.requiredHacking>0?t.requiredHacking+a:0,o=t.requiredStrength>0?t.requiredStrength+a:0,s=t.requiredDefense>0?t.requiredDefense+a:0,l=t.requiredDexterity>0?t.requiredDexterity+a:0,c=t.requiredDexterity>0?t.requiredDexterity+a:0,u=t.requiredCharisma>0?t.requiredCharisma+a:0,p=t.requiredReputation;return n?(i="Requires:<br>",i+=r.toString()+" hacking<br>",i+=o.toString()+" strength<br>",i+=s.toString()+" defense<br>",i+=l.toString()+" dexterity<br>",i+=c.toString()+" agility<br>",i+=u.toString()+" charisma<br>",i+=p.toString()+" reputation"):(i="(Requires ",r>0&&(i+=r+" hacking, "),o>0&&(i+=o+" strength, "),s>0&&(i+=s+" defense, "),l>0&&(i+=l+" dexterity, "),c>0&&(i+=c+" agility, "),u>0&&(i+=u+" charisma, "),p>1&&(i+=p+" reputation, "),i=i.substring(0,i.length-2),i+=")"),i}},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return s});var i=n(36),a=n(0),r=n(9);function o(e,t){var n=0,o=!1;for(const t in i.Crimes){const r=i.Crimes[t];if(r.type==e){n=r.successRate(a.a),o=!0;break}}return o?Math.random()<=n&&(a.a.gainMoney(t),!0):(console.log(crime),void Object(r.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer"))}function s(e){return e.includes("shoplift")?i.Crimes.Shoplift:e.includes("rob")&&e.includes("store")?i.Crimes.RobStore:e.includes("mug")?i.Crimes.Mug:e.includes("larceny")?i.Crimes.Larceny:e.includes("drugs")?i.Crimes.DealDrugs:e.includes("bond")&&e.includes("forge")?i.Crimes.BondForgery:e.includes("traffick")&&e.includes("arms")?i.Crimes.TraffickArms:e.includes("homicide")?i.Crimes.Homicide:e.includes("grand")&&e.includes("auto")?i.Crimes.GrandTheftAuto:e.includes("kidnap")?i.Crimes.Kidnap:e.includes("assassinate")?i.Crimes.Assassination:e.includes("heist")?i.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 i=n(28),a=(n(1),n(0)),r=n(2);const o={};function s(){for(const e in o){const t=i.Programs[e];o[e].style.display="none",!a.a.hasProgram(t.name)&&t.create.req(a.a)&&(o[e].style.display="inline-block")}}function l(){var e=0;for(const t in i.Programs)null!=i.Programs[t].create&&(a.a.hasProgram(i.Programs[t].name)||i.Programs[t].create.req(a.a)&&e++);return!1===a.a.firstProgramAvailable&&e>0&&(a.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 i.Programs){if(null===i.Programs[t].create)continue;const n=Object(r.createElement)("a",{class:"a-link-button",id:i.Programs[t].htmlID(),innerText:i.Programs[t].name,tooltip:i.Programs[t].create.tooltip});o[t]=n,e.appendChild(n)}for(const e in o){const t=i.Programs[e];o[e].addEventListener("click",function(){return a.a.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(17);t.getRandomByte=function(e){const t=Math.max(Math.min(e,255),0);return i.getRandomInt(0,t)}},,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 i=n(254),a=n(253);t.ResearchMap={};for(const e of a.researchMetadata)r=e,null!=t.ResearchMap[r.name]&&console.warn(`Duplicate Research being defined: ${r.name}`),t.ResearchMap[r.name]=new i.Research(r);var r},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(48),a=n(16),r=n(0),o=n(12),s=n(17);function l(){const e=Object.keys(i.CodingContractTypes);let t=e[Object(s.getRandomInt)(0,e.length-1)];const n=c(),a=u();let r=p(a,n),o=new i.CodingContract(r,t,n);a.addContract(o)}function c(){let e={};e.type=Object(s.getRandomInt)(0,i.CodingContractRewardType.Money),e.type=function(e){let t=e;const n=r.a.factions.filter(e=>{try{return a.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});return t===i.CodingContractRewardType.FactionReputation&&0===n.length&&(t=i.CodingContractRewardType.CompanyReputation),t===i.CodingContractRewardType.FactionReputationAll&&0===n.length&&(t=i.CodingContractRewardType.CompanyReputation),t===i.CodingContractRewardType.CompanyReputation&&0===Object.keys(r.a.jobs).length&&(t=i.CodingContractRewardType.Money),t}(e.type);const t=r.a.factions.filter(e=>{try{return a.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 i.CodingContractRewardType.FactionReputation:var n=t.length,o=t[Object(s.getRandomInt)(0,n-1)];e.name=o;break;case i.CodingContractRewardType.CompanyReputation:const a=Object.keys(r.a.jobs);a.length>0?e.name=a[Object(s.getRandomInt)(0,a.length-1)]:e.type=i.CodingContractRewardType.Money}return e}function u(){const e=Object.keys(o.b);let t=Object(s.getRandomInt)(0,e.length-1),n=o.b[e[t]];for(let i=0;i<200&&!1!==n.purchasedByPlayer;++i)t=Object(s.getRandomInt)(0,e.length-1),n=o.b[e[t]];return n}function p(e,t){let n=`contract-${Object(s.getRandomInt)(0,1e6)}`;for(let t=0;t<1e3&&!(e.contracts.filter(e=>e.fn===n).length<=0);++t)n=`contract-${Object(s.getRandomInt)(0,1e6)}`;return t.name&&(n+=`-${t.name.replace(/\s/g,"")}`),n}},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var i=n(11),a=n(27),r=n(2),o=n(42),s=n(44),l=!1;function c(e){if(l=!0,e.constructor!==Array)throw new Error("Invalid non-array argument passed into writeCinematicText()");i.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(a.removeChildrenFromElement)(t);for(var n=0;n<e.length;++n)if(!Object(s.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(i=t[n],new Promise(function(e,t){var n=document.getElementById("cinematic-text-container"),a=document.createElement("p");n.appendChild(a);var r=function e(t,n,i=0){return new Promise(function(a,r){setTimeout(function(){if(i>=n.length){var o=n.substring(0,i);return t.innerHTML=o,a(!0)}var o=n.substring(0,i);t.innerHTML=o+"<span class='typed-cursor'> &#9608; </span>";var s=e(t,n,i+1);s.then(function(e){a(e)},function(e){r(e)})},15)})}(a,i,0);r.then(function(t){e(t)},function(e){t(e)})})).then(function(){return e(t,n+1)});var i}(e).then(function(){return e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container"),e.appendChild(Object(r.createElement)("br")),new Promise(function(n,o){e.appendChild(Object(r.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(a.removeChildrenFromElement)(e),i.Engine.loadTerminalContent(),t.style.visibility="visible",l=!1,n()}}))});var e,t}).catch(function(e){Object(o.exceptionAlert)(e)})}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});const i=n(393).js_beautify;class a{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=i(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});const i=n(148),a=n(227),r=n(1),o=n(5),s=n(16),l=n(146),c=n(113),u=n(36),p=n(4),m=n(13),h=n(9),d=n(90),g=n(42),_=n(21),y=n(2),f=n(55),b=n(40),E=n(78),v=n(99),k=n(27),O=n(66),C=n(23),T={container:null,docButton:null,faqButton:null,info:null,sleeveList:null,sleeves:null};let S;function M(){if(m.routing.isOn(m.Page.Sleeves))try{for(let e=0;e<S.sleeves.length;++e){A(S.sleeves[e],T.sleeves[e])}}catch(e){g.exceptionAlert(e)}}function P(e,t){const n={container:null,statsPanel:null,stats:null,moreStatsButton:null,travelButton:null,taskPanel:null,taskSelector:null,taskDetailsSelector:null,taskDetailsSelector2:null,taskDescription:null,taskSetButton:null,taskProgressBar:null,earningsPanel:null,currentEarningsInfo:null,totalEarningsButton:null};return m.routing.isOn(m.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:()=>{h.dialogBoxCreate(["<h2><u>Stats:</u></h2>",`Hacking: ${e.hacking_skill} (${p.numeralWrapper.formatBigNumber(e.hacking_exp)} exp)`,`Strength: ${e.strength} (${p.numeralWrapper.formatBigNumber(e.strength_exp)} exp)`,`Defense: ${e.defense} (${p.numeralWrapper.formatBigNumber(e.defense_exp)} exp)`,`Dexterity: ${e.dexterity} (${p.numeralWrapper.formatBigNumber(e.dexterity_exp)} exp)`,`Agility: ${e.agility} (${p.numeralWrapper.formatBigNumber(e.agility_exp)} exp)`,`Charisma: ${e.charisma} (${p.numeralWrapper.formatBigNumber(e.charisma_exp)} exp)<br>`,"<h2><u>Multipliers:</u></h2>",`Hacking Level multiplier: ${p.numeralWrapper.formatPercentage(e.hacking_mult)}`,`Hacking Experience multiplier: ${p.numeralWrapper.formatPercentage(e.hacking_exp_mult)}`,`Strength Level multiplier: ${p.numeralWrapper.formatPercentage(e.strength_mult)}`,`Strength Experience multiplier: ${p.numeralWrapper.formatPercentage(e.strength_exp_mult)}`,`Defense Level multiplier: ${p.numeralWrapper.formatPercentage(e.defense_mult)}`,`Defense Experience multiplier: ${p.numeralWrapper.formatPercentage(e.defense_exp_mult)}`,`Dexterity Level multiplier: ${p.numeralWrapper.formatPercentage(e.dexterity_mult)}`,`Dexterity Experience multiplier: ${p.numeralWrapper.formatPercentage(e.dexterity_exp_mult)}`,`Agility Level multiplier: ${p.numeralWrapper.formatPercentage(e.agility_mult)}`,`Agility Experience multiplier: ${p.numeralWrapper.formatPercentage(e.agility_exp_mult)}`,`Charisma Level multiplier: ${p.numeralWrapper.formatPercentage(e.charisma_mult)}`,`Charisma Experience multiplier: ${p.numeralWrapper.formatPercentage(e.charisma_exp_mult)}`,`Faction Reputation Gain multiplier: ${p.numeralWrapper.formatPercentage(e.faction_rep_mult)}`,`Company Reputation Gain multiplier: ${p.numeralWrapper.formatPercentage(e.company_rep_mult)}`,`Salary multiplier: ${p.numeralWrapper.formatPercentage(e.work_money_mult)}`,`Crime Money multiplier: ${p.numeralWrapper.formatPercentage(e.crime_money_mult)}`,`Crime Success multiplier: ${p.numeralWrapper.formatPercentage(e.crime_success_mult)}`].join("<br>"),!1)}}),n.travelButton=y.createElement("button",{class:"std-button",innerText:"Travel",clickListener:()=>{const i="sleeve-travel-popup",a=[];a.push(E.createPopupCloseButton(i,{class:"std-button"})),a.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 ${p.numeralWrapper.formatMoney(r.CONSTANTS.TravelCost)}. `+"It will also CANCEL the sleeve's current task (setting it to idle)"}));for(const o in c.Cities)e.city!==c.Cities[o]&&function(e,o){a.push(y.createElement("div",{class:"cmpy-mgmt-find-employee-option",innerText:c.Cities[o],clickListener:()=>S.canAfford(r.CONSTANTS.TravelCost)?(e.city=c.Cities[o],S.loseMoney(r.CONSTANTS.TravelCost),e.resetTaskStatus(),C.removeElementById(i),A(e,n),R(e,n,t),!1):(h.dialogBoxCreate("You cannot afford to have this sleeve travel to another city",!1),!1)}))}(e,o);b.createPopup(i,a)}}),n.statsPanel.appendChild(n.stats),n.statsPanel.appendChild(n.moreStatsButton),n.statsPanel.appendChild(n.travelButton),n.taskPanel=y.createElement("div",{class:"sleeve-panel",width:"40%"}),n.taskSelector=y.createElement("select"),n.taskSelector.add(f.createOptionElement("------")),n.taskSelector.add(f.createOptionElement("Work for Company")),n.taskSelector.add(f.createOptionElement("Work for Faction")),n.taskSelector.add(f.createOptionElement("Commit Crime")),n.taskSelector.add(f.createOptionElement("Take University Course")),n.taskSelector.add(f.createOptionElement("Workout at Gym")),n.taskSelector.add(f.createOptionElement("Shock Recovery")),n.taskSelector.add(f.createOptionElement("Synchronize")),n.taskDetailsSelector=y.createElement("select"),n.taskDetailsSelector2=y.createElement("select"),n.taskDescription=y.createElement("p"),n.taskProgressBar=y.createElement("p"),n.taskSelector.addEventListener("change",()=>{R(e,n,t)}),n.taskSelector.selectedIndex=e.currentTask,n.taskSelector.dispatchEvent(new Event("change")),N(e,n),n.taskSetButton=y.createElement("button",{class:"std-button",innerText:"Set Task",clickListener:()=>{!function(e,t){try{if(null==S)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");const n=v.getSelectValue(t.taskSelector),a=v.getSelectValue(t.taskDetailsSelector),r=v.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(S,a);break;case"Work for Faction":o=e.workForFaction(S,a,r);break;case"Commit Crime":o=e.commitCrime(S,a);break;case"Take University Course":o=e.takeUniversityCourse(S,r,a);break;case"Workout at Gym":o=e.workoutAtGym(S,r,a);break;case"Shock Recovery":e.currentTask=i.SleeveTaskType.Recovery,o=!0;break;case"Synchronize":e.currentTask=i.SleeveTaskType.Sync,o=!0;break;default:console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${n}`)}if(o)N(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(m.routing.isOn(m.Page.Sleeves)){M();for(const e of T.sleeves)e.taskSelector.dispatchEvent(new Event("change"))}}catch(e){return console.error(`Exception caught in setSleeveTask(): ${e}`),g.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:()=>{h.dialogBoxCreate(["<h2><u>Earnings for Current Task:</u></h2>",`Money: ${p.numeralWrapper.formatMoney(e.earningsForTask.money)}`,`Hacking Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForTask.hack)}`,`Strength Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForTask.str)}`,`Defense Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForTask.def)}`,`Dexterity Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForTask.dex)}`,`Agility Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForTask.agi)}`,`Charisma Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForTask.cha)}<br>`,"<h2><u>Total Earnings for Host Consciousness:</u></h2>",`Money: ${p.numeralWrapper.formatMoney(e.earningsForPlayer.money)}`,`Hacking Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForPlayer.hack)}`,`Strength Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForPlayer.str)}`,`Defense Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForPlayer.def)}`,`Dexterity Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForPlayer.dex)}`,`Agility Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForPlayer.agi)}`,`Charisma Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForPlayer.cha)}<br>`,"<h2><u>Total Earnings for Other Sleeves:</u></h2>",`Money: ${p.numeralWrapper.formatMoney(e.earningsForSleeves.money)}`,`Hacking Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForSleeves.hack)}`,`Strength Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForSleeves.str)}`,`Defense Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForSleeves.def)}`,`Dexterity Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForSleeves.dex)}`,`Agility Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForSleeves.agi)}`,`Charisma Exp: ${p.numeralWrapper.formatBigNumber(e.earningsForSleeves.cha)}`].join("<br>"),!1)}}),n.earningsPanel.appendChild(n.currentEarningsInfo),n.earningsPanel.appendChild(n.totalEarningsButton),A(e,n),n.container.appendChild(n.statsPanel),n.container.appendChild(n.taskPanel),n.container.appendChild(n.earningsPanel),n):n}function A(e,t){if(!m.routing.isOn(m.Page.Sleeves))return;t.stats.innerHTML=[`Hacking: ${p.numeralWrapper.format(e.hacking_skill,"0,0")}`,`Strength: ${p.numeralWrapper.format(e.strength,"0,0")}`,`Defense: ${p.numeralWrapper.format(e.defense,"0,0")}`,`Dexterity: ${p.numeralWrapper.format(e.dexterity,"0,0")}`,`Agility: ${p.numeralWrapper.format(e.agility,"0,0")}`,`Charisma: ${p.numeralWrapper.format(e.charisma,"0,0")}`,`HP: ${p.numeralWrapper.format(e.hp,"0,0")} / ${p.numeralWrapper.format(e.max_hp,"0,0")}`,`City: ${e.city}`,`Shock: ${p.numeralWrapper.format(100-e.shock,"0,0.000")}`,`Sync: ${p.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(S);n=`Reputation: ${p.numeralWrapper.format(5*t,"0.00")} / s`}if(e.currentTask===i.SleeveTaskType.Crime)t.currentEarningsInfo.innerHTML=["Earnings (Pre-Synchronization):",`Money: ${p.numeralWrapper.formatMoney(parseFloat(e.currentTaskLocation))} if successful`,`Hacking Exp: ${p.numeralWrapper.format(e.gainRatesForTask.hack,"0.00")} (2x if successful)`,`Strength Exp: ${p.numeralWrapper.format(e.gainRatesForTask.str,"0.00")} (2x if successful)`,`Defense Exp: ${p.numeralWrapper.format(e.gainRatesForTask.def,"0.00")} (2x if successful)`,`Dexterity Exp: ${p.numeralWrapper.format(e.gainRatesForTask.dex,"0.00")} (2x if successful)`,`Agility Exp: ${p.numeralWrapper.format(e.gainRatesForTask.agi,"0.00")} (2x if successful)`,`Charisma Exp: ${p.numeralWrapper.format(e.gainRatesForTask.cha,"0.00")} (2x if successful)`].join("<br>"),t.taskProgressBar.innerText=d.createProgressBarText({progress:e.currentTaskTime/e.currentTaskMaxTime,totalTicks:25});else{const i=["Earnings (Pre-Synchronization):",`Money: ${p.numeralWrapper.formatMoney(5*e.gainRatesForTask.money)} / s`,`Hacking Exp: ${p.numeralWrapper.format(5*e.gainRatesForTask.hack,"0.00")} / s`,`Strength Exp: ${p.numeralWrapper.format(5*e.gainRatesForTask.str,"0.00")} / s`,`Defense Exp: ${p.numeralWrapper.format(5*e.gainRatesForTask.def,"0.00")} / s`,`Dexterity Exp: ${p.numeralWrapper.format(5*e.gainRatesForTask.dex,"0.00")} / s`,`Agility Exp: ${p.numeralWrapper.format(5*e.gainRatesForTask.agi,"0.00")} / s`,`Charisma Exp: ${p.numeralWrapper.format(5*e.gainRatesForTask.cha,"0.00")} / s`];""!==n&&i.push(n),t.currentEarningsInfo.innerHTML=i.join("<br>"),t.taskProgressBar.innerText=""}}t.createSleevesPage=function(e){if(m.routing.isOn(m.Page.Sleeves))try{S=e,T.container=y.createElement("div",{class:"generic-menupage-container",id:"sleeves-container",position:"fixed"}),T.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>"}),T.faqButton=y.createElement("button",{class:"std-button",display:"inline-block",innerText:"FAQ",clickListener:()=>{h.dialogBoxCreate(a.SleeveFaq,!1)}}),T.docButton=y.createElement("button",{class:"std-button",display:"inline-block",innerText:"Documentation"}),T.sleeveList=y.createElement("ul"),T.sleeves=[];for(const t of e.sleeves){const n=P(t,e.sleeves);T.sleeveList.appendChild(n.container),T.sleeves.push(n)}T.container.appendChild(T.info),T.container.appendChild(T.faqButton),T.container.appendChild(T.sleeveList),document.getElementById("entire-game-container").appendChild(T.container)}catch(e){g.exceptionAlert(e)}},t.updateSleevesPage=M,t.clearSleevesPage=function(){T.container instanceof HTMLElement&&O.removeElement(T.container);for(const e in T)T[e]=null;S=null};const w=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],x=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function R(e,t,n){if(null==S)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(k.removeChildrenFromElement(t.taskDetailsSelector),k.removeChildrenFromElement(t.taskDetailsSelector2),t.taskDetailsSelector2=_.clearEventListeners(t.taskDetailsSelector2),v.getSelectValue(t.taskSelector)){case"Work for Company":let n=0;const i=Object.keys(S.jobs);for(let r=0;r<i.length;++r)a.includes(i[r])||(t.taskDetailsSelector.add(f.createOptionElement(i[r])),e.currentTaskLocation===i[r]&&(t.taskDetailsSelector.selectedIndex=n),++n),t.taskDetailsSelector2.add(f.createOptionElement("------"));break;case"Work for Faction":let p=0;for(let n=0;n<S.factions.length;++n){const i=S.factions[n];r.includes(i)||(t.taskDetailsSelector.add(f.createOptionElement(i)),e.currentTaskLocation===i&&(t.taskDetailsSelector.selectedIndex=p),++p)}t.taskDetailsSelector.addEventListener("change",()=>{const n=v.getSelectValue(t.taskDetailsSelector),i=s.Factions[n];if(null==i)return void console.warn(`Invalid faction name when trying to update Sleeve Task Selector: ${n}`);const a=i.getInfo();k.removeChildrenFromElement(t.taskDetailsSelector2);let r=0;a.offerHackingWork&&(t.taskDetailsSelector2.add(f.createOptionElement("Hacking Contracts")),e.factionWorkType===l.FactionWorkType.Hacking&&(t.taskDetailsSelector2.selectedIndex=r),++r),a.offerFieldWork&&(t.taskDetailsSelector2.add(f.createOptionElement("Field Work")),e.factionWorkType===l.FactionWorkType.Field&&(t.taskDetailsSelector2.selectedIndex=r),++r),a.offerSecurityWork&&(t.taskDetailsSelector2.add(f.createOptionElement("Security Work")),e.factionWorkType===l.FactionWorkType.Security&&(t.taskDetailsSelector2.selectedIndex=r),++r)}),t.taskDetailsSelector.dispatchEvent(new Event("change"));break;case"Commit Crime":let m=0;for(const n in u.Crimes){const i=u.Crimes[n].name;if(t.taskDetailsSelector.add(f.createOptionElement(i,n)),""===e.crimeType)continue;const a=u.Crimes[e.crimeType];null!=a&&(i===a.name&&(t.taskDetailsSelector.selectedIndex=m),++m)}t.taskDetailsSelector2.add(f.createOptionElement("------"));break;case"Take University Course":for(let e=0;e<w.length;++e)t.taskDetailsSelector.add(f.createOptionElement(w[e]));switch(e.city){case c.Cities.Aevum:t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.AevumSummitUniversity));break;case c.Cities.Sector12:t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.Sector12RothmanUniversity));break;case c.Cities.Volhaven:t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.VolhavenZBInstituteOfTechnology));break;default:t.taskDetailsSelector2.add(f.createOptionElement("No university available in city!"))}break;case"Workout at Gym":for(let n=0;n<x.length;++n)t.taskDetailsSelector.add(f.createOptionElement(x[n])),e.gymStatType===x[n]&&(t.taskDetailsSelector.selectedIndex=n);switch(e.city){case c.Cities.Aevum:t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.AevumCrushFitnessGym)),t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.AevumSnapFitnessGym)),e.currentTaskLocation===o.Locations.AevumCrushFitnessGym?t.taskDetailsSelector2.selectedIndex=0:e.currentTaskLocation===o.Locations.AevumSnapFitnessGym&&(t.taskDetailsSelector2.selectedIndex=1);break;case c.Cities.Sector12:t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.Sector12IronGym)),t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.Sector12PowerhouseGym)),e.currentTaskLocation===o.Locations.Sector12IronGym?t.taskDetailsSelector2.selectedIndex=0:e.currentTaskLocation===o.Locations.Sector12PowerhouseGym&&(t.taskDetailsSelector2.selectedIndex=1);break;case c.Cities.Volhaven:t.taskDetailsSelector2.add(f.createOptionElement(o.Locations.VolhavenMilleniumFitnessGym));break;default:t.taskDetailsSelector2.add(f.createOptionElement("No gym available in city!"))}break;case"Shock Recovery":case"Synchronize":case"------":return t.taskDetailsSelector.add(f.createOptionElement("------")),void t.taskDetailsSelector2.add(f.createOptionElement("------"))}}function N(e,t){try{if(null==S)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");const n=v.getSelectValue(t.taskSelector),i=v.getSelectValue(t.taskDetailsSelector),a=v.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 ${a} for ${e.currentTaskLocation}.`;break;case"Commit Crime":t.taskDescription.innerText=`This sleeve is currently attempting to ${u.Crimes[i].type} (Success Rate: ${p.numeralWrapper.formatPercentage(u.Crimes[i].successRate(S))}).`;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}`),g.exceptionAlert(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(34);t.getNextCompanyPosition=function(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:i.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});const i=n(31),a=n(85),r=n(251),o=n(113),s=n(15),l=n(17);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.Cities.Aevum]:[0,0,0],[o.Cities.Chongqing]:[0,0,0],[o.Cities.Sector12]:[0,0,0],[o.Cities.NewTokyo]:[0,0,0],[o.Cities.Ishima]:[0,0,0],[o.Cities.Volhaven]:[0,0,0]},this.loc="",this.siz=0,this.reqMats={},this.prdman={[o.Cities.Aevum]:[!1,0],[o.Cities.Chongqing]:[!1,0],[o.Cities.Sector12]:[!1,0],[o.Cities.NewTokyo]:[!1,0],[o.Cities.Ishima]:[!1,0],[o.Cities.Volhaven]:[!1,0]},this.sllman={[o.Cities.Aevum]:[!1,0],[o.Cities.Chongqing]:[!1,0],[o.Cities.Sector12]:[!1,0],[o.Cities.NewTokyo]:[!1,0],[o.Cities.Ishima]:[!1,0],[o.Cities.Volhaven]:[!1,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,r=e[i.EmployeePositions.Engineer]/e.total,o=e[i.EmployeePositions.Management]/e.total,s=e[i.EmployeePositions.RandD]/e.total,c=e[i.EmployeePositions.Operations]/e.total,u=e[i.EmployeePositions.Business]/e.total,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[i.EmployeePositions.Engineer]+.05*e[i.EmployeePositions.Management]+.05*e[i.EmployeePositions.RandD]+.02*e[i.EmployeePositions.Operations]+.02*e[i.EmployeePositions.Business]),this.per=m*(.15*e[i.EmployeePositions.Engineer]+.02*e[i.EmployeePositions.Management]+.02*e[i.EmployeePositions.RandD]+.02*e[i.EmployeePositions.Operations]+.02*e[i.EmployeePositions.Business]),this.dur=m*(.05*e[i.EmployeePositions.Engineer]+.02*e[i.EmployeePositions.Management]+.08*e[i.EmployeePositions.RandD]+.05*e[i.EmployeePositions.Operations]+.05*e[i.EmployeePositions.Business]),this.rel=m*(.02*e[i.EmployeePositions.Engineer]+.08*e[i.EmployeePositions.Management]+.02*e[i.EmployeePositions.RandD]+.05*e[i.EmployeePositions.Operations]+.08*e[i.EmployeePositions.Business]),this.aes=m*(0*e[i.EmployeePositions.Engineer]+.08*e[i.EmployeePositions.Management]+.05*e[i.EmployeePositions.RandD]+.02*e[i.EmployeePositions.Operations]+.1*e[i.EmployeePositions.Business]),this.fea=m*(.08*e[i.EmployeePositions.Engineer]+.05*e[i.EmployeePositions.Management]+.02*e[i.EmployeePositions.RandD]+.05*e[i.EmployeePositions.Operations]+.05*e[i.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+=a.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";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.CorporationUpgrades={0:[0,2e9,1.07,.03,"Smart Factories","Advanced AI automatically optimizes the operation and productivity of factories. Each level of this upgrade increases your global production by 3% (additive)."],1:[1,2e9,1.07,.1,"Smart Storage","Advanced AI automatically optimizes your warehouse storage methods. Each level of this upgrade increases your global warehouse storage size by 10% (additive)."],2:[2,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});class i{constructor(e,t,n,i,a,r){this.infoText=e,this.enemies=t,this.offerHackingMission=n,this.offerHackingWork=i,this.offerFieldWork=a,this.offerSecurityWork=r,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}}t.FactionInfo=i,t.FactionInfos={Illuminati:new i("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 i("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",[],!0,!0,!0,!1),"The Covenant":new i("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 i("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 i("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 i("Where Law and Business meet - thats where we are.<br><br>Legal Insight - Business Instinct - Experience Innovation",[],!0,!0,!0,!0),"Blade Industries":new i("Augmentation is salvation",[],!0,!0,!0,!0),NWO:new i("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 i("Unlocking the power of the genome",[],!0,!0,!0,!0),"OmniTek Incorporated":new i("Simply put, our mission is to design and build robots that make a difference",[],!0,!0,!0,!0),"Four Sigma":new i("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 i("Dream big. Work hard. Make history.",[],!0,!0,!0,!0),"Fulcrum Secret Technologies":new i("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 i("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. Its 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 i("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 i(" __..__ <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 i("The Silicon City",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Chongqing:new i("Serve the people",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),Ishima:new i("The East Asian Order of the Future",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"New Tokyo":new i("Asia's World City",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"Sector-12":new i("The City of the Future",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Volhaven:new i("Benefit, Honour, and Glory",["Chongqing","Sector-12","New Tokyo","Aevum","Ishima"],!0,!0,!0,!0),"Speakers for the Dead":new i("It is better to reign in hell than to serve in heaven.",[],!0,!0,!0,!0),"The Dark Army":new i("The World doesn't care about right or wrong. It's all about power.",[],!0,!0,!0,!1),"The Syndicate":new i("Honor holds you back",[],!0,!0,!0,!0),Silhouette:new i("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 i("Following the Mandate of Heaven and Carrying out the Way",[],!1,!1,!0,!0),"Slum Snakes":new i("Slum Snakes rule!",[],!1,!1,!0,!0),Netburners:new i("~~//*>H4CK||3T 8URN3R5**>?>\\~~",[],!0,!0,!1,!1),"Tian Di Hui":new i("Obey Heaven and Work Righteousness",[],!0,!0,!1,!0),CyberSec:new i("The Internet is the first thing that humanity has built that humanity doesnt 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 i("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 i=n(75),a=n(47),r=n(81);function o(e,t){this.vars=t?Object.assign({},t.vars):Object(a.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 a=this.lookup(e);if(!a&&this.parent)throw new Error("Undefined variable "+e);var o=(a||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 i.a)throw new Error("Cannot assign a Hacknet Node handle to a new value");if(s[t[t.length-1]]instanceof r.a)throw new Error("Cannot assign a Netscript Port handle to a new value");return s[t[t.length-1]]=n},def:function(e,t){return this.vars[e]=t}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return executeJSScript});var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urlStack=null,script=workerScript.getScript();""===script.module&&(urlStack=_getScriptUrls(script,scripts,[]),script.module=await eval("import(urlStack[urlStack.length - 1])")),loadedModule=script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.d)(workerScript,`${script.filename} cannot be run because it does not have a main function.`);return loadedModule.main(ns)}finally{if(null!=urlStack)for(const e in urlStack)URL.revokeObjectURL(e)}}function _getScriptUrls(e,t,n){const i=[];n.push(e);try{let a=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|";)/g,(e,a,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 i.push(...l),[a,l[l.length-1],o].join("")});return a+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',i.push(URL.createObjectURL(makeScriptBlob(a))),i}catch(e){for(const e in i)URL.revokeObjectURL(e);throw e}finally{n.pop()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(61),a=n(23);t.removeLoadingScreen=function(){a.removeElementById("loader"),i.getElementById("entire-game-container").style.visibility="visible"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(226),a=n(14),r=n(4),o=n(13),s=n(9),l=n(42),c=n(2),u=n(55),p=n(99),m=n(27),h=n(66),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"}),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=a.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:()=>{i.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){var t;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=i.generateResleeves()),d.sortTag=c.createElement("p",{display:"inline-block",innerText:"Sort By: "}),d.sortSelector=c.createElement("select"),(t=t||(t={})).Cost="Cost",t.Hacking="Hacking",t.Strength="Strength",t.Defense="Defense",t.Dexterity="Dexterity",t.Agility="Agility",t.Charisma="Charisma",t.AverageCombatStats="AverageCombat",t.AverageAllStats="AverageAllStats",t.TotalNumAugmentations="TotalNumAugmentations",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 r}),n.d(t,"a",function(){return o});n(6),n(115),n(28),n(16),n(0),n(12),n(67),n(24),n(32),n(58),n(4),n(9),n(42),n(2),n(55),n(99);var i=n(23);const a="dev-menu-container";function r(){throw new Error("Cannot create Dev Menu because you are not in a dev build")}function o(){Object(i.removeElementById)(a)}},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var i=n(80),a=n(0),r=n(37),o=n(8),s=n(102);n(3);function l(){if(r.a.hasOwnProperty("Darkweb Server")){var e=r.a["Darkweb Server"];if(!Object(s.isValidIPAddress)(e))return;e==a.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 i.DarkWebItems){const t=i.DarkWebItems[e];Object(o.post)(t.toString())}}():function(e){e=e.toLowerCase();let t=null;for(const n in i.DarkWebItems){const a=i.DarkWebItems[n];a.program.toLowerCase()==e&&(t=a)}if(null===t)return void Object(o.post)("Unrecognized item: "+e);if(a.a.hasProgram(t.program))return void Object(o.post)("You already have the "+t.program+" program");if(a.a.money.lt(t.price))return void Object(o.post)("Not enough money to purchase "+t.program);a.a.loseMoney(t.price),a.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 i=n(15);t.AllCorporationStates=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class a{constructor(){this.state=0}static fromJSON(e){return i.Generic_fromJSON(a,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 i.Generic_toJSON("CorporationState",this)}}t.CorporationState=a,i.Reviver.constructors.CorporationState=a},,,,,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 i=n(10),a=n(113),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.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=a.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*i.BitNodeMultipliers.HackingLevelMultiplier))),this.strength=Math.max(1,Math.floor(this.calculateStat(this.strength_exp,this.strength_mult*i.BitNodeMultipliers.StrengthLevelMultiplier))),this.defense=Math.max(1,Math.floor(this.calculateStat(this.defense_exp,this.defense_mult*i.BitNodeMultipliers.DefenseLevelMultiplier))),this.dexterity=Math.max(1,Math.floor(this.calculateStat(this.dexterity_exp,this.dexterity_mult*i.BitNodeMultipliers.DexterityLevelMultiplier))),this.agility=Math.max(1,Math.floor(this.calculateStat(this.agility_exp,this.agility_mult*i.BitNodeMultipliers.AgilityLevelMultiplier))),this.charisma=Math.max(1,Math.floor(this.calculateStat(this.charisma_exp,this.charisma_mult*i.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}),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});const i=n(1);t.Crime=class{constructor(e="",t="",n=0,i=0,a=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=i,this.difficulty=a,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+i.CONSTANTS.IntelligenceCrimeWeight*e.intelligence;return t/=i.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 i=n(26);function a(e,t,n){for(var i=0;i<t.length;++i)e?(t[i].style.opacity="1",t[i].style.maxHeight=t[i].scrollHeight+"px"):(t[i].style.opacity="0",t[i].style.maxHeight=null);for(i=0;i<n.length;++i)e?(n[i].style.opacity="1",n[i].style.maxHeight=n[i].scrollHeight+"px",n[i].style.pointerEvents="auto"):(n[i].style.opacity="0",n[i].style.maxHeight=null,n[i].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=[i.MainMenuLinks.Terminal,i.MainMenuLinks.ScriptEditor,i.MainMenuLinks.ActiveScripts,i.MainMenuLinks.CreateProgram];e.style.maxHeight?(a(!1,l,c),s.style.display="none"):(a(!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=[i.MainMenuLinks.Stats,i.MainMenuLinks.Factions,i.MainMenuLinks.Augmentations,i.MainMenuLinks.HacknetNodes,i.MainMenuLinks.Sleeves];t.style.maxHeight?a(!1,c,u):a(!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=[i.MainMenuLinks.City,i.MainMenuLinks.Travel,i.MainMenuLinks.Job,i.MainMenuLinks.StockMarket,i.MainMenuLinks.Bladeburner,i.MainMenuLinks.Corporation,i.MainMenuLinks.Gang];t.style.maxHeight?a(!1,p,m):a(!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=[i.MainMenuLinks.Tutorial,i.MainMenuLinks.Options];n&&(o.push(r("dev-tab")),s.push(r("dev-menu-link"))),e.style.maxHeight?a(!1,o,s):a(!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 i=n(11),a=n(19),r=n(4);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=a.Settings.CodeInstructionRunTime+"ms",t.innerHTML=a.Settings.MaxLogCapacity,n.innerHTML=a.Settings.MaxPortCapacity,o.checked=a.Settings.SuppressMessages,s.checked=a.Settings.SuppressFactionInvites,l.checked=a.Settings.SuppressTravelConfirmation,c.checked=a.Settings.SuppressBuyAugmentationConfirmation,u.checked=a.Settings.SuppressHospitalizationPopup,p.innerHTML=a.Settings.AutosaveInterval,m.checked=a.Settings.DisableHotkeys,h.value=a.Settings.Locale,r.numeralWrapper.updateLocale(a.Settings.Locale);var d=document.getElementById("settingsNSExecTimeRangeVal"),g=document.getElementById("settingsNSLogRangeVal"),_=document.getElementById("settingsNSPortRangeVal"),y=document.getElementById("settingsAutosaveIntervalVal");d.value=a.Settings.CodeInstructionRunTime,g.value=a.Settings.MaxLogCapacity,_.value=a.Settings.MaxPortCapacity,y.value=a.Settings.AutosaveInterval,d.oninput=function(){e.innerHTML=this.value+"ms",a.Settings.CodeInstructionRunTime=this.value},g.oninput=function(){t.innerHTML=this.value,a.Settings.MaxLogCapacity=this.value},_.oninput=function(){n.innerHTML=this.value,a.Settings.MaxPortCapacity=this.value},y.oninput=function(){p.innerHTML=this.value,a.Settings.AutosaveInterval=Number(this.value),0===Number(this.value)?i.Engine.Counters.autoSaveCounter=1/0:i.Engine.Counters.autoSaveCounter=5*Number(this.value)},o.onclick=function(){a.Settings.SuppressMessages=this.checked},s.onclick=function(){a.Settings.SuppressFactionInvites=this.checked},l.onclick=function(){a.Settings.SuppressTravelConfirmation=this.checked},c.onclick=function(){a.Settings.SuppressBuyAugmentationConfirmation=this.checked},u.onclick=function(){a.Settings.SuppressHospitalizationPopup=this.checked},m.onclick=function(){a.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 a.Settings.Locale=e,void(h.value=e)}a.Settings.Locale=h.value}}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(0),a=n(4);function r(){this.hp=document.getElementById("character-hp-text"),this.money=document.getElementById("character-money-text"),this.hack=document.getElementById("character-hack-text"),this.str=document.getElementById("character-str-text"),this.def=document.getElementById("character-def-text"),this.dex=document.getElementById("character-dex-text"),this.agi=document.getElementById("character-agi-text"),this.cha=document.getElementById("character-cha-text"),this.int=document.getElementById("character-int-text"),this.intWrapper=document.getElementById("character-int-wrapper"),this.repaintElem=document.getElementById("character-overview-text")}r.prototype.repaint=function(){this.repaintElem.getClientRects()},r.prototype.update=function(){null==i.a.hp&&(i.a.hp=i.a.max_hp);const e=function(e,t){return e.textContent!==t&&(e.textContent=t,!0)};let t=!1;t=e(this.hp,i.a.hp+" / "+i.a.max_hp)||t,t=e(this.money,a.numeralWrapper.format(i.a.money.toNumber(),"$0.000a"))||t,t=e(this.hack,i.a.hacking_skill.toLocaleString())||t,t=e(this.str,i.a.strength.toLocaleString())||t,t=e(this.def,i.a.defense.toLocaleString())||t,t=e(this.dex,i.a.dexterity.toLocaleString())||t,t=e(this.agi,i.a.agility.toLocaleString())||t,t=e(this.cha,i.a.charisma.toLocaleString())||t,t=e(this.int,i.a.intelligence.toLocaleString())||t;const n=this.intWrapper,r=n.style.display,o=i.a.intelligence>=1?"":"none";r!==o&&(n.style.display=o,t=!0),t&&this.repaint()}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(54),a=function(e,t,n=0){this.sourceCode=e,this.sourceCodeLineOffset=n,"string"==typeof e&&(e=i.parse(e,a.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=i.parse(this.polyfills_.join("\n"),a.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new a.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=e,(o=new a.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack};a.PARSE_OPTIONS={ecmaVersion:5,locations:!0},a.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},a.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},a.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},a.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},a.STEP_ERROR={},a.SCOPE_REFERENCE={},a.VALUE_IN_DESCRIPTOR={},a.toStringCycles_=[],a.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}},a.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)"},a.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=i.parse(e,a.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},a.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var n=t.node,i=n.type;if("Program"===i&&t.done)return!1;if(this.paused_)return!0;try{var r=this.stepFunctions_[i](e,t,n)}catch(e){if(e!==a.STEP_ERROR)throw e}return r&&e.push(r),!!n.end||this.step()},a.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},a.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,a.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,a.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,a.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,a.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,a.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new a.Object(null),this.FUNCTION_PROTO=new a.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,a.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 i=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],r=0;r<i.length;r++){var o=function(e){return function(n){try{return e(n)}catch(e){t.throwException(t.URI_ERROR,e.message)}}}(i[r][0]);this.setProperty(e,i[r][1],this.createNativeFunction(o,!1),a.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)},a.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=i.parse("(function("+s+") {"+o+"})",a.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,a.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,a.NONENUMERABLE_DESCRIPTOR),this.FUNCTION_PROTO.nativeFunc=function(){},this.FUNCTION_PROTO.nativeFunc.id=this.functionCounter_++,this.setProperty(this.FUNCTION_PROTO,"length",0,a.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 i=n.stateStack[n.stateStack.length-1];i.func_=this,i.funcThis_=o(e),i.arguments_=[],null!==t&&void 0!==t&&(t.isObject?i.arguments_=n.arrayPseudoToNative(t):n.throwException(n.TYPE_ERROR,"CreateListFromArrayLike called on non-object")),i.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 i=1;i<arguments.length;i++)t.arguments_.push(arguments[i]);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),a.NONENUMERABLE_DESCRIPTOR),t=function(){return this.valueOf()},this.setNativeFunctionPrototype(this.FUNCTION,"valueOf",t),this.setProperty(this.FUNCTION,"valueOf",this.createNativeFunction(t,!1),a.NONENUMERABLE_DESCRIPTOR)},a.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,a.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"Object",this.OBJECT);var i=function(e){void 0!==e&&null!==e||n.throwException(n.TYPE_ERROR,"Cannot convert '"+e+"' to object")};t=function(e){i(e);var t=e.isObject?e.properties:e;return n.arrayNativeToPseudo(Object.getOwnPropertyNames(t))},this.setProperty(this.OBJECT,"getOwnPropertyNames",this.createNativeFunction(t,!1),a.NONENUMERABLE_DESCRIPTOR),t=function(e){return i(e),e.isObject&&(e=e.properties),n.arrayNativeToPseudo(Object.keys(e))},this.setProperty(this.OBJECT,"keys",this.createNativeFunction(t,!1),a.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),a.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,i){return t=String(t),e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object.defineProperty called on non-object"),i&&i.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,a.VALUE_IN_DESCRIPTOR,i.properties),e},this.setProperty(this.OBJECT,"defineProperty",this.createNativeFunction(t,!1),a.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 i=Object.getOwnPropertyDescriptor(e.properties,t),a=e.getter[t],r=e.setter[t];(a||r)&&(i.get=a,i.set=r,delete i.value,delete i.writable);var o=i.value,s="value"in i;delete i.value;var l=n.nativeToPseudo(i);return s&&n.setProperty(l,"value",o),l}},this.setProperty(this.OBJECT,"getOwnPropertyDescriptor",this.createNativeFunction(t,!1),a.NONENUMERABLE_DESCRIPTOR),t=function(e){return i(e),n.getPrototype(e)},this.setProperty(this.OBJECT,"getPrototypeOf",this.createNativeFunction(t,!1),a.NONENUMERABLE_DESCRIPTOR),t=function(e){return Boolean(e)&&!e.preventExtensions},this.setProperty(this.OBJECT,"isExtensible",this.createNativeFunction(t,!1),a.NONENUMERABLE_DESCRIPTOR),t=function(e){return e&&e.isObject&&(e.preventExtensions=!0),e},this.setProperty(this.OBJECT,"preventExtensions",this.createNativeFunction(t,!1),a.NONENUMERABLE_DESCRIPTOR),this.setNativeFunctionPrototype(this.OBJECT,"toString",a.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"toLocaleString",a.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"valueOf",a.Object.prototype.valueOf),t=function(e){return i(this),this.isObject?String(e)in this.properties:this.hasOwnProperty(e)},this.setNativeFunctionPrototype(this.OBJECT,"hasOwnProperty",t),t=function(e){return i(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)},a.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 i=arguments[0];if(1===arguments.length&&"number"==typeof i)isNaN(a.legalArrayLength(i))&&n.throwException(n.RANGE_ERROR,"Invalid array length"),t.properties.length=i;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),a.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 i=Array.prototype.splice.apply(this.properties,arguments);return n.arrayNativeToPseudo(i)},this.setNativeFunctionPrototype(this.ARRAY,"splice",t),t=function(e,t){var i=Array.prototype.slice.call(this.properties,e,t);return n.arrayNativeToPseudo(i)},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=[],i=0,a=n.getProperty(this,"length"),r=0;r<a;r++){if(n.hasProperty(this,r)){var o=n.getProperty(this,r);t[i]=o}i++}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[i]=n.getProperty(s,c)),i++;else t[i]=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(',');","}","});","")},a.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),a.NONENUMERABLE_DESCRIPTOR);for(var i=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],r=0;r<i.length;r++)this.setNativeFunctionPrototype(this.STRING,i[r],String.prototype[i[r]]);t=function(e,t,i){return t=t?n.pseudoToNative(t):void 0,i=i?n.pseudoToNative(i):void 0,String(this).localeCompare(e,t,i)},this.setNativeFunctionPrototype(this.STRING,"localeCompare",t),t=function(e,t){n.isa(e,n.REGEXP)&&(e=e.data);var i=String(this).split(e,t);return n.arrayNativeToPseudo(i)},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;","};","}","")},a.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)},a.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 i=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],r=0;r<i.length;r++)this.setProperty(this.NUMBER,i[r],Number[i[r]],a.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)},a.prototype.initDate=function(e){var t,n=this;t=function(e,t){if(!n.calledWithNew())return Date();var i=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(Date,i)),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),a.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"parse",this.createNativeFunction(Date.parse,!1),a.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"UTC",this.createNativeFunction(Date.UTC,!1),a.NONENUMERABLE_DESCRIPTOR);for(var i=["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<i.length;r++)t=function(e){return function(t){for(var i=[],a=0;a<arguments.length;a++)i[a]=n.pseudoToNative(arguments[a]);return this.data[e].apply(this.data,i)}}(i[r]),this.setNativeFunctionPrototype(this.DATE,i[r],t)},a.prototype.initRegExp=function(e){var t,n=this;t=function(e,t){if(n.calledWithNew())var i=this;else i=n.createObjectProto(n.REGEXP_PROTO);return e=e?e.toString():"",t=t?t.toString():"",n.populateRegExp(i,new RegExp(e,t)),i},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,a.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"ignoreCase",void 0,a.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"multiline",void 0,a.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"source","(?:)",a.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 i=n.createObjectProto(n.ARRAY_PROTO),a=0;a<t.length;a++)n.setProperty(i,a,t[a]);return n.setProperty(i,"index",t.index),n.setProperty(i,"input",t.input),i}return null},this.setNativeFunctionPrototype(this.REGEXP,"exec",t)},a.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),a.NONENUMERABLE_DESCRIPTOR),n},!0),this.setProperty(e,"Error",this.ERROR),this.setProperty(this.ERROR.properties.prototype,"message","",a.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.ERROR.properties.prototype,"name","Error",a.NONENUMERABLE_DESCRIPTOR);var n=function(n){var i=t.createNativeFunction(function(e){if(t.calledWithNew())var n=this;else n=t.createObject(i);return e&&t.setProperty(n,"message",String(e),a.NONENUMERABLE_DESCRIPTOR),n},!0);return t.setProperty(i,"prototype",t.createObject(t.ERROR)),t.setProperty(i.properties.prototype,"name",n,a.NONENUMERABLE_DESCRIPTOR),t.setProperty(e,n,i),i};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")},a.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"],i=0;i<n.length;i++)this.setProperty(t,n[i],Math[n[i]],a.READONLY_NONENUMERABLE_DESCRIPTOR);var r=["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","random","round","sin","sqrt","tan"];for(i=0;i<r.length;i++)this.setProperty(t,r[i],this.createNativeFunction(Math[r[i]],!1),a.NONENUMERABLE_DESCRIPTOR)},a.prototype.initJSON=function(e){var t=this,n=t.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"JSON",n);var i=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(i,!1)),i=function(e){var n=t.pseudoToNative(e);try{var i=JSON.stringify(n)}catch(e){t.throwException(t.TYPE_ERROR,e.message)}return i},this.setProperty(n,"stringify",this.createNativeFunction(i,!1))},a.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},a.legalArrayLength=function(e){var t=e>>>0;return t===Number(e)?t:NaN},a.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},a.Value,a.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},a.Object.prototype.proto=null,a.Object.prototype.isObject=!0,a.Object.prototype.class="Object",a.Object.prototype.data=null,a.Object.prototype.toString=function(){if("Array"===this.class){(i=a.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!==i.indexOf(n)?"...":n}}finally{i.pop()}return e.join(",")}if("Error"===this.class){var i,r,o;if(-1!==(i=a.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);i.push(this);try{r=r&&r.toString(),o=o&&o.toString()}finally{i.pop()}return o?r+": "+o:String(r)}return null!==this.data?String(this.data):"[object "+this.class+"]"},a.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},a.prototype.createObject=function(e){return this.createObjectProto(e&&e.properties.prototype)},a.prototype.createObjectProto=function(e){if("object"!=typeof e)throw Error("Non object prototype");var t=new a.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},a.prototype.populateRegExp=function(e,t){e.data=t,this.setProperty(e,"lastIndex",t.lastIndex,a.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"source",t.source,a.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"global",t.global,a.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"ignoreCase",t.ignoreCase,a.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"multiline",t.multiline,a.READONLY_NONENUMERABLE_DESCRIPTOR)},a.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,a.READONLY_DESCRIPTOR),n},a.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,a.READONLY_DESCRIPTOR),t?this.setProperty(n.properties.prototype,"constructor",n,a.NONENUMERABLE_DESCRIPTOR):!1===t&&(n.illegalConstructor=!0,this.setProperty(n,"prototype",void 0)),n},a.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,a.READONLY_DESCRIPTOR),t},a.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 i=this;return this.createNativeFunction(function(){return i.nativeToPseudo(e.apply(i,Array.prototype.slice.call(arguments).map(function(e){return i.pseudoToNative(e)})))},void 0)}var a;if(Array.isArray(e)){a=this.createObjectProto(this.ARRAY_PROTO);for(var r=0;r<e.length;r++)r in e&&this.setProperty(a,r,this.nativeToPseudo(e[r]))}else for(var o in a=this.createObjectProto(this.OBJECT_PROTO),e)this.setProperty(a,o,this.nativeToPseudo(e[o]));return a},a.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,i=t||{pseudo:[],native:[]};if(-1!==(r=i.pseudo.indexOf(e)))return i.native[r];if(i.pseudo.push(e),this.isa(e,this.ARRAY)){n=[],i.native.push(n);for(var a=this.getProperty(e,"length"),r=0;r<a;r++)this.hasProperty(e,r)&&(n[r]=this.pseudoToNative(this.getProperty(e,r),i))}else{var o;for(var s in n={},i.native.push(n),e.properties)o=e.properties[s],n[s]=this.pseudoToNative(o,i)}return i.pseudo.pop(),i.native.pop(),n},a.prototype.arrayNativeToPseudo=function(e){for(var t=this.createObjectProto(this.ARRAY_PROTO),n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++)this.setProperty(t,n[i],e[n[i]]);return t},a.prototype.arrayPseudoToNative=function(e){var t=[];for(var n in e.properties)t[n]=this.getProperty(e,n);return t.length=a.legalArrayLength(this.getProperty(e,"length"))||0,t},a.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},a.prototype.getProperty=function(e,t,n){if(t=String(t),void 0===e||null===e){let i;null!=n&&null!=n.loc&&null!=n.loc.start&&(i=n.loc.start.line),this.throwException(this.TYPE_ERROR,"Cannot read property '"+t+"' of "+e,i)}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 i=a.legalArrayIndex(t);if(!isNaN(i)&&i<String(e).length)return String(e)[i]}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))},a.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=a.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},a.prototype.setProperty=function(e,t,n,i){t=String(t),void 0!==e&&null!==e||this.throwException(this.TYPE_ERROR,"Cannot set property '"+t+"' of "+e),i&&("get"in i||"set"in i)&&("value"in i||"writable"in i)&&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=a.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(i){if(!("value"in i))return;n=i.value}if(n=a.legalArrayLength(n),isNaN(n)&&this.throwException(this.RANGE_ERROR,"Invalid array length"),n<l)for(s in e.properties)s=a.legalArrayIndex(s),!isNaN(s)&&n<=s&&delete e.properties[s]}else isNaN(s=a.legalArrayIndex(t))||(e.properties.length=Math.max(l,s+1))}if(!e.preventExtensions||t in e.properties)if(i){"get"in i&&(i.get?e.getter[t]=i.get:delete e.getter[t]),"set"in i&&(i.set?e.setter[t]=i.set:delete e.setter[t]);var c={};"configurable"in i&&(c.configurable=i.configurable),"enumerable"in i&&(c.enumerable=i.enumerable),"writable"in i&&(c.writable=i.writable,delete e.getter[t],delete e.setter[t]),"value"in i?(c.value=i.value,delete e.getter[t],delete e.setter[t]):n!==a.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===a.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+"'")},a.prototype.setNativeFunctionPrototype=function(e,t,n){this.setProperty(e.properties.prototype,t,this.createNativeFunction(n,!1),a.NONENUMERABLE_DESCRIPTOR)},a.prototype.getScope=function(){var e=this.stateStack[this.stateStack.length-1].scope;if(!e)throw Error("No scope found.");return e},a.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 i=e.body&&e.body[0];i&&i.expression&&"Literal"===i.expression.type&&"use strict"===i.expression.value&&(n.strict=!0)}return n},a.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},a.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 i,a=this.stateStack[this.stateStack.length-1].node;"UnaryExpression"===a.type&&"typeof"===a.operator||(null!=t&&null!=t.loc&&null!=t.loc.start&&(i=t.loc.start.line),this.throwException(this.REFERENCE_ERROR,e+" is not defined",i))},a.prototype.setValueToScope=function(e,t){for(var n=this.getScope(),i=n.strict;n&&n!==this.global;){if(e in n.properties)return void(n.properties[e]=t);n=n.parentScope}if(n===this.global&&(!i||this.hasProperty(n,e)))return this.setProperty(n,e,t);this.throwException(this.REFERENCE_ERROR,e+" is not defined")},a.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,a.VARIABLE_DESCRIPTOR);else{if("FunctionDeclaration"===e.type)return void this.setProperty(t,e.id.name,this.createFunction(e,t),a.VARIABLE_DESCRIPTOR);if("FunctionExpression"===e.type)return;if("ExpressionStatement"===e.type)return}var i=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===i&&this.populateScope_(o[n],t);else o.constructor===i&&this.populateScope_(o,t)}},a.prototype.stripLocations_=function(e,t,n){for(var i in t?e.start=t:delete e.start,n?e.end=n:delete e.end,e)if(e.hasOwnProperty(i)){var a=e[i];a&&"object"==typeof a&&this.stripLocations_(a,t,n)}},a.prototype.calledWithNew=function(){return this.stateStack[this.stateStack.length-1].isConstructor},a.prototype.getValue=function(e,t){return e[0]===a.SCOPE_REFERENCE?this.getValueFromScope(e[1],t):this.getProperty(e[0],e[1],t)},a.prototype.setValue=function(e,t){return e[0]===a.SCOPE_REFERENCE?this.setValueToScope(e[1],t):this.setProperty(e[0],e[1],t)},a.Completion={NORMAL:0,BREAK:1,CONTINUE:2,RETURN:3,THROW:4},a.prototype.throwException=function(e,t,n){if(void 0===t)var i=e;else{i=this.createObject(e);this.setProperty(i,"message",t,a.NONENUMERABLE_DESCRIPTOR)}var r;throw null!=n&&(r=this.getErrorLineNumberMessage(n)),this.unwind(a.Completion.THROW,i,void 0,r),a.STEP_ERROR},a.prototype.unwind=function(e,t,n,i=""){if(e===a.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===a.Completion.RETURN)return void(o.value=t);if(e!==a.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===a.Completion.BREAK){if(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop||o.isSwitch)return void r.pop()}else if(e===a.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+i)}else s=String(t)+i;throw s},a.prototype.createGetter_=function(e,t){var n=Array.isArray(t)?t[0]:t,i=new this.nodeConstructor;i.type="CallExpression";var r=new a.State(i,this.stateStack[this.stateStack.length-1].scope);return r.doneCallee_=!0,r.funcThis_=n,r.func_=e,r.doneArgs_=!0,r.arguments_=[],r},a.prototype.createSetter_=function(e,t,n){var i=Array.isArray(t)?t[0]:this.global,r=new this.nodeConstructor;r.type="CallExpression";var o=new a.State(r,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=i,o.func_=e,o.doneArgs_=!0,o.arguments_=[n],o},a.State=function(e,t){this.node=e,this.scope=t},a.prototype.stepArrayExpression=function(e,t,n){var i=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=i.length);r<i.length;){if(i[r])return t.n_=r,new a.State(i[r],t.scope);r++}e.pop(),e[e.length-1].value=t.array_},a.prototype.stepAssignmentExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var i=new a.State(n.left,t.scope);return i.components=!0,i}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 a.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},a.prototype.stepBinaryExpression=function(e,t,n){if(!t.doneLeft_)return t.doneLeft_=!0,new a.State(n.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new a.State(n.right,t.scope);e.pop();var i,r=t.leftValue_,o=t.value;switch(n.operator){case"==":i=r==o;break;case"!=":i=r!=o;break;case"===":i=r===o;break;case"!==":i=r!==o;break;case">":i=r>o;break;case">=":i=r>=o;break;case"<":i=r<o;break;case"<=":i=r<=o;break;case"+":i=r+o;break;case"-":i=r-o;break;case"*":i=r*o;break;case"/":i=r/o;break;case"%":i=r%o;break;case"&":i=r&o;break;case"|":i=r|o;break;case"^":i=r^o;break;case"<<":i=r<<o;break;case">>":i=r>>o;break;case">>>":i=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)}i=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)}i=!!r.isObject&&this.isa(r,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=i},a.prototype.stepBlockStatement=function(e,t,n){var i=t.n_||0,r=n.body[i];if(r)return t.n_=i+1,new a.State(r,t.scope);e.pop()},a.prototype.stepBreakStatement=function(e,t,n){var i=n.label&&n.label.name;this.unwind(a.Completion.BREAK,void 0,i)},a.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var r=new a.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]===a.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 a.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_,a.READONLY_DESCRIPTOR),t.value=void 0,new a.State(l.body,c)}if(o.eval){var g=t.arguments_[0];if("string"==typeof g){try{var _=i.parse(g.toString(),a.PARSE_OPTIONS)}catch(e){let t=this.getErrorLineNumber(n);this.throwException(this.SYNTAX_ERROR,"Invalid code: "+e.message,t)}var y=new this.nodeConstructor;return y.type="EvalProgram_",y.body=_.body,this.stripLocations_(y,n.start,n.end),(c=t.directEval_?t.scope:this.global).strict?c=this.createScope(_,c):this.populateScope_(_,c),this.value=void 0,new a.State(y,c)}t.value=g}else if(o.nativeFunc)t.value=o.nativeFunc.apply(t.funcThis_,t.arguments_);else{if(o.asyncFunc){var f=this,b=t.arguments_.concat(function(e){t.value=e,f.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)}}}},a.prototype.stepCatchClause=function(e,t,n){if(!t.done_){t.done_=!0;var i=this.createSpecialScope(t.scope);return this.setProperty(i,n.param.name,t.throwValue),new a.State(n.body,i)}e.pop()},a.prototype.stepConditionalExpression=function(e,t,n){var i=t.mode_||0;if(0===i)return t.mode_=1,new a.State(n.test,t.scope);if(1===i){t.mode_=2;var r=Boolean(t.value);if(r&&n.consequent)return new a.State(n.consequent,t.scope);if(!r&&n.alternate)return new a.State(n.alternate,t.scope);this.value=void 0}e.pop(),"ConditionalExpression"===n.type&&(e[e.length-1].value=t.value)},a.prototype.stepContinueStatement=function(e,t,n){var i=n.label&&n.label.name;this.unwind(a.Completion.CONTINUE,void 0,i)},a.prototype.stepDebuggerStatement=function(e,t,n){e.pop()},a.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 a.State(n.test,t.scope);if(t.value){if(n.body)return t.test_=!1,t.isLoop=!0,new a.State(n.body,t.scope)}else e.pop()},a.prototype.stepEmptyStatement=function(e,t,n){e.pop()},a.prototype.stepEvalProgram_=function(e,t,n){var i=t.n_||0,r=n.body[i];if(r)return t.n_=i+1,new a.State(r,t.scope);e.pop(),e[e.length-1].value=this.value},a.prototype.stepExpressionStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new a.State(n.expression,t.scope);e.pop(),this.value=t.value},a.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 a.State(n.left,t.scope)}if(!t.doneObject_)return t.doneObject_=!0,t.variable_||(t.variable_=t.value),new a.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===(i=t.props_.shift()))break;if(Object.prototype.hasOwnProperty.call(t.object_.properties,i)&&(!t.visited_[i]&&(t.visited_[i]=!0,Object.prototype.propertyIsEnumerable.call(t.object_.properties,i)))){t.name_=i;break e}}else if(null!==t.object_&&void 0!==t.object_)for(t.props_||(t.props_=Object.getOwnPropertyNames(t.object_));;){var i;if(void 0===(i=t.props_.shift()))break;if(t.visited_[i]=!0,Object.prototype.propertyIsEnumerable.call(t.object_,i)){t.name_=i;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 a.State(r,t.scope);return o.components=!0,o}t.variable_=[a.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 a.State(n.body,t.scope):void 0},a.prototype.stepForStatement=function(e,t,n){var i=t.mode_||0;if(0===i){if(t.mode_=1,n.init)return new a.State(n.init,t.scope)}else if(1===i){if(t.mode_=2,n.test)return new a.State(n.test,t.scope)}else if(2===i){if(t.mode_=3,!n.test||t.value)return t.isLoop=!0,new a.State(n.body,t.scope);e.pop()}else if(3===i&&(t.mode_=1,n.update))return new a.State(n.update,t.scope)},a.prototype.stepFunctionDeclaration=function(e,t,n){e.pop()},a.prototype.stepFunctionExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.createFunction(n,t.scope)},a.prototype.stepIdentifier=function(e,t,n){if(e.pop(),t.components)e[e.length-1].value=[a.SCOPE_REFERENCE,n.name];else{var i=this.getValueFromScope(n.name,n);if(i&&"object"==typeof i&&i.isGetter){i.isGetter=!1;for(var r=t.scope;!this.hasProperty(r,n.name);)r=r.parentScope;var o=i;return this.createGetter_(o,this.global)}e[e.length-1].value=i}},a.prototype.stepIfStatement=a.prototype.stepConditionalExpression,a.prototype.stepLabeledStatement=function(e,t,n){e.pop();var i=t.labels||[];i.push(n.label.name);var r=new a.State(n.body,t.scope);return r.labels=i,r},a.prototype.stepLiteral=function(e,t,n){e.pop();var i=n.value;if(i instanceof RegExp){var a=this.createObjectProto(this.REGEXP_PROTO);this.populateRegExp(a,i),i=a}e[e.length-1].value=i},a.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 a.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 a.State(n.right,t.scope);e.pop(),e[e.length-1].value=t.value}},a.prototype.stepMemberExpression=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new a.State(n.object,t.scope);var i;if(n.computed){if(!t.doneProperty_)return t.object_=t.value,t.doneProperty_=!0,new a.State(n.property,t.scope);i=t.value}else t.object_=t.value,i=n.property.name;if(e.pop(),t.components)e[e.length-1].value=[t.object_,i];else{var r=this.getProperty(t.object_,i);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}},a.prototype.stepNewExpression=a.prototype.stepCallExpression,a.prototype.stepObjectExpression=function(e,t,n){var i=t.n_||0,r=n.properties[i];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_=++i,r=n.properties[i]}else t.object_=this.createObjectProto(this.OBJECT_PROTO),t.properties_=Object.create(null);if(r)return new a.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_},a.prototype.stepProgram=function(e,t,n){var i=n.body.shift();if(i)return t.done=!1,new a.State(i,t.scope);t.done=!0},a.prototype.stepReturnStatement=function(e,t,n){if(n.argument&&!t.done_)return t.done_=!0,new a.State(n.argument,t.scope);this.unwind(a.Completion.RETURN,t.value,void 0)},a.prototype.stepSequenceExpression=function(e,t,n){var i=t.n_||0,r=n.expressions[i];if(r)return t.n_=i+1,new a.State(r,t.scope);e.pop(),e[e.length-1].value=t.value},a.prototype.stepSwitchStatement=function(e,t,n){if(!t.test_)return t.test_=1,new a.State(n.discriminant,t.scope);for(1===t.test_&&(t.test_=2,t.switchValue_=t.value,t.defaultCase_=-1);;){var i=t.index_||0,r=n.cases[i];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 a.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 a.State(r.consequent[o],t.scope)}t.tested_=!1,t.n_=0,t.index_=i+1}else t.matched_=!0,t.index_=t.defaultCase_;else t.defaultCase_=i,t.index_=i+1}},a.prototype.stepThisExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.getValueFromScope("this",n)},a.prototype.stepThrowStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new a.State(n.argument,t.scope);this.throwException(t.value)},a.prototype.stepTryStatement=function(e,t,n){if(!t.doneBlock_)return t.doneBlock_=!0,new a.State(n.block,t.scope);if(t.cv&&t.cv.type===a.Completion.THROW&&!t.doneHandler_&&n.handler){t.doneHandler_=!0;var i=new a.State(n.handler,t.scope);return i.throwValue=t.cv.value,t.cv=void 0,i}if(!t.doneFinalizer_&&n.finalizer)return t.doneFinalizer_=!0,new a.State(n.finalizer,t.scope);e.pop(),t.cv&&this.unwind(t.cv.type,t.cv.value,t.cv.label)},a.prototype.stepUnaryExpression=function(e,t,n){if(!t.done_){t.done_=!0;var i=new a.State(n.argument,t.scope);return i.components="delete"===n.operator,i}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===a.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},a.prototype.stepUpdateExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var i=new a.State(n.argument,t.scope);return i.components=!0,i}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},a.prototype.stepVariableDeclaration=function(e,t,n){var i=n.declarations,r=t.n_||0,o=i[r];for(t.init_&&o&&(this.setValueToScope(o.id.name,t.value),t.init_=!1,o=i[++r]);o;){if(o.init)return t.n_=r,t.init_=!0,new a.State(o.init,t.scope);o=i[++r]}e.pop()},a.prototype.stepWithStatement=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new a.State(n.object,t.scope);if(!t.doneBody_){t.doneBody_=!0;var i=this.createSpecialScope(t.scope,t.value);return new a.State(n.body,i)}e.pop()},a.prototype.stepWhileStatement=a.prototype.stepDoWhileStatement,a.prototype.step=a.prototype.step,a.prototype.run=a.prototype.run,a.prototype.appendCode=a.prototype.appendCode,a.prototype.createObject=a.prototype.createObject,a.prototype.createObjectProto=a.prototype.createObjectProto,a.prototype.createAsyncFunction=a.prototype.createAsyncFunction,a.prototype.createNativeFunction=a.prototype.createNativeFunction,a.prototype.getProperty=a.prototype.getProperty,a.prototype.setProperty=a.prototype.setProperty,a.prototype.nativeToPseudo=a.prototype.nativeToPseudo,a.prototype.pseudoToNative=a.prototype.pseudoToNative,a.prototype.createPrimitive=function(e){return 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";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 i=n(51),a=n(11),r=n(0),o=n(21),s=n(13);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){var t;t="You have received a faction invitation from "+e.name,document.getElementById("faction-invitation-box-text").innerHTML=t,e.alreadyInvited=!0,r.a.factionInvitations.push(e.name),s.routing.isOn(s.Page.Factions)&&a.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(i.c)(e),l(),s.routing.isOn(s.Page.Factions)&&a.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}),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";n.d(t,"a",function(){return m});var i=n(9),a=n(21),r=n(3),o=n(10),s=n(1),l=(n(62),n(16)),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,g=m*c.a.faction_rep_mult*s.CONSTANTS.InfiltrationRepValue*o.BitNodeMultipliers.InfiltrationRep,_=m*s.CONSTANTS.InfiltrationMoneyValue*o.BitNodeMultipliers.InfiltrationMoney;d="You can sell the classified documents and secrets you stole from "+e.companyName+" for <span class='money-gold'>$"+Object(r.formatNumber)(_,2)+"</span> on the black market or you can give it to a faction to gain <span class='light-yellow'>"+Object(r.formatNumber)(g,3)+" reputation</span> with that faction.",document.getElementById("infiltration-box-text").innerHTML=d;var y=document.getElementById("infiltration-faction-select");y.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]||(y.innerHTML+="<option value='"+c.a.factions[e]+"'>"+c.a.factions[e]+"</option>"));if(""!==u)for(let e=0;e<y.options.length;++e)if(y.options[e].value===u){y.selectedIndex=e;break}var f=Object(a.clearEventListeners)("infiltration-box-sell");setTimeout(function(){f.addEventListener("click",function(t){return!!t.isTrusted&&(c.a.gainMoney(_),Object(i.dialogBoxCreate)("You sold the classified information you stole from "+e.companyName+" for <span class='money-gold'>$"+Object(r.formatNumber)(_,2)+"</span> on the black market!<br><br>"+n),p(),!1)})},750);var b=Object(a.clearEventListeners)("infiltration-box-faction");setTimeout(function(){b.addEventListener("click",function(t){if(!t.isTrusted)return!1;var a=y.options[y.selectedIndex].value;u=a;var o=l.Factions[a];return null==o?(Object(i.dialogBoxCreate)("Error finding faction. This is a bug please report to developer"),!1):(o.playerReputation+=g,Object(i.dialogBoxCreate)("You gave the classified information you stole from "+e.companyName+" to "+a+" and gained <span class='light-yellow'>"+Object(r.formatNumber)(g,3)+" reputation</span> with the faction. <br><br>"+n),p(),!1)})},750),document.getElementById("infiltration-box-container").style.display="flex"}else Object(i.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 i=n(10),a=n(1),r=n(11),o=n(0),s=n(9),l=n(21),c=n(17),u=n(162),p=n(3);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,i,a){this.companyName=e,this.clearanceLevel=0,this.maxClearanceLevel=i,this.securityLevel=t,this.difficulty=a,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,i,a){var r=new h(e,t,n,i,a);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"),i=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"),v=Object(l.clearEventListeners)("infiltration-escape");t.style.display="none",n.style.display="none",i.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",v.style.display="none";var O=null;switch(Object(c.getRandomInt)(0,5)){case 1:O=m.TechOnly,s.style.display="block",u.style.display="block",h.style.display="block",v.style.display="block";break;case 2:O=m.TechOrLockedDoor,s.style.display="block",u.style.display="block",h.style.display="block",d.style.display="block",v.style.display="block";break;case 3:O=m.Bots,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=k(e);if(n[0])return f("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,y(e),!1;var i=Math.max(1,Math.round(1.5*e.securityLevel/o.a.defense));f("You <span class='failure'>FAILED</span> to kill the security bots. The bots fight back and raise the alarm! You take "+i+" damage and the facility's security level increases by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(i)&&g(e,!1),E(e,O),b(e)}),r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return f("You <span class='success'>SUCCESSFULLY</span> assassinated the security bots without being detected!"),o.a.karma-=1,y(e),!1;f("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()+"%"),E(e,O),b(e)}),s.style.display="block",h.style.display="block",v.style.display="block";break;default:O=m.Guards,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=k(e);if(n[0])return f("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,y(e),!1;var i=Math.max(1,Math.round(e.securityLevel/o.a.defense));f("You <span class='failure'>FAILED</span> to kill the security guard. The guard fights back and raises the alarm! You take "+i+" damage and the facility's security level has increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(i)&&g(e,!1),E(e,O),b(e)}),n.style.display="block",i.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 f("You <span class='success'>SUCCESSFULLY</span> assassinated the security guard without being detected!"),o.a.karma-=3,++o.a.numPeopleKilled,y(e),!1;f("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()+"%"),E(e,O),b(e)}),h.style.display="block",_.style.display="block",v.style.display="block"}n.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=C(e);return e.gainStrengthExp(e.securityLevel/70),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/70),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/70),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/70),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.03,[!0,1.03]):(e.securityLevel*=1.1,[!1,1.1])}(e);if(n[0])return f("You <span class='success'>SUCCESSFULLY</span> knocked out the security guard! Unfortunately you made a lot of noise and alerted other security."),f("The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),y(e),!1;var i=Math.max(1,Math.round(e.securityLevel/o.a.defense));return f("You <span class='failure'>FAILED</span> to knockout the security guard. The guard raises the alarm and fights back! You take "+i+" damage and the facility's security level increases by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(i)&&g(e,!1),E(e,O),b(e),!1}),i.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=T(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 f("You <span class='success'>SUCCESSFULLY</span> knocked out the security guard without making any noise!"),y(e),!1;var i=Math.max(1,Math.round(e.securityLevel/o.a.defense));return f("You <span class='failure'>FAILED</span> to stealthily knockout the security guard. The guard raises the alarm and fights back! You take "+i+" damage and the facility's security level increases by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(i)&&g(e,!1),E(e,O),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]?(f("You <span class='success'>SUCCESSFULLY</span> hacked and disabled the security system!"),f("The facility's security level increased by "+(100*n[1]-100).toString()+"%"),y(e),!1):(f("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()+"%"),E(e,O),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]?(f("You <span class='success'>SUCCESSFULLY</span> and violently destroy the security system!"),f("The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),y(e),!1):(f("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()+"%"),E(e,O),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]?(f("You <span class='success'>SUCCESSFULLY</span> sneak past the security undetected!"),y(e),!1):(f("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()+"%"),E(e,O),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]?(f("You <span class='success'>SUCCESSFULLY</span> pick the locked door!"),f("The facility's security level increased by "+Object(p.formatNumber)(100*n[1]-100,2).toString()+"%"),y(e),!1):(f("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()+"%"),E(e,O),b(e),!1)}),_.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=a.CONSTANTS.InfiltrationBribeBaseAmount*e.clearanceLevel;if(o.a.money.lt(n))return f("You do not have enough money to bribe the guard. You need $"+n),!1;var i=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 i[0]?(f("You <span class='success'>SUCCESSFULLY</span> bribed a guard to let you through to the next clearance level for $"+n),o.a.loseMoney(n),y(e),!1):(f("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*i[1]-100,2).toString()+"%"),E(e,O),b(e),!1)}),v.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]?(f("You <span class='success'>SUCCESSFULLY</span> escape from the facility with the stolen classified documents and company secrets!"),g(e,!0),!1):(f("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),E(e,O),b(e),!1)}),E(e,O),f(""),f("You are now on clearance level "+e.clearanceLevel+".<br>"+O)}function y(e){if(e.clearanceLevel%5==0){var t=e.baseValue*e.clearanceLevel/2,n=t*o.a.faction_rep_mult*a.CONSTANTS.InfiltrationRepValue*i.BitNodeMultipliers.InfiltrationRep,r=t*a.CONSTANTS.InfiltrationMoneyValue*i.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,f("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 f(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*a.CONSTANTS.InfiltrationRepValue*i.BitNodeMultipliers.InfiltrationRep,n+=e.secretsStolen[r]*a.CONSTANTS.InfiltrationMoneyValue*i.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 E(e,t){var n=O(e),i=C(e),a=T(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*i,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*a,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 v=a.CONSTANTS.IntelligenceInfiltrationWeight;function k(e){var t=O(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/75),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/75),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/75),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.05,[!0,1.05]):(e.securityLevel*=1.1,[!1,1.1])}function O(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.45*t))}function C(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.7*t))}function T(e){var t=e.securityLevel;return Math.min(.95,(.55*o.a.strength+2*o.a.dexterity+2*o.a.agility+v*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+v*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+v*o.a.intelligence)/t)}function w(e){var t=e.securityLevel;return Math.min(.95,(o.a.agility+.5*o.a.dexterity+v*o.a.intelligence)/(2*t))}function x(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+v*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+v*o.a.intelligence)/t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSelector=function(e){for(let t=e.options.length-1;t>=0;t--)e.remove(t)}},,,,,,,,,,,,,,,,,,function(e,t,n){},,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 i=n(147),a=n(14),r=n(15);class o extends i.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=a.Augmentations[this.augmentations[e].name];null!=n?t+=n.baseCost: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 i=n(225),a=n(14),r=n(89),o=n(6),s=n(17);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 a.Augmentations)a.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):a.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)),a.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 i.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(a.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 i=a.Augmentations[t];n.augmentations.push({name:i.name,level:1}),n.applyAugmentation(a.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 sleeves work?</strong></u><br>","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>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 i=n(3);t.DarkWebItem=class{constructor(e,t,n){this.program=e,this.price=t,this.description=n}toString(){return[this.program,"$"+i.formatNumber(this.price,0),this.description].join(" - ")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1);function a(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:a(1),time:i.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:a(50),time:2*i.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:a(100),time:i.CONSTANTS.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:a(250),time:i.CONSTANTS.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:a(500),time:i.CONSTANTS.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:a(750),time:i.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:a(75),time:i.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:a(400),time:i.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:a(75),time:i.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:a(25),time:i.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:i.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){!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 i=t.split("\n");for(let e=0;e<i.length;++e)i[e].match(/.*async function.+{/g)?i[e]+=" // jshint ignore:line":i[e].match(/.*await.+;/g)&&(i[e]+=" // jshint ignore:line");const a=i.join("\n");n.indent||(n.indent=1),n.esversion=6,JSHINT(a,n,n.globals);var r=JSHINT.data().errors,o=[];return r&&function(t,n){for(var i=0;i<t.length;i++){var a=t[i];if(a){if(0==a.line)continue;if(a.line<0){window.console&&window.console.warn("Cannot display JSHint error (invalid line "+a.line+")",a);continue}var r=a.character-1,o=r+1;if(a.evidence){var s=a.evidence.substring(r).search(/.\b/);s>-1&&(o+=s)}var l={message:a.reason,severity:a.code&&a.code.startsWith("W")?"warning":"error",from:e.Pos(a.line-1,r),to:e.Pos(a.line-1,o)};n.push(l)}}}(r,o),o})}(n(50))},,,,function(e,t,n){!function(e){"use strict";e.defineMode("netscript",function(t,n){var i,a,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"),i=e("keyword c"),a=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:a,break:a,continue:a,new:e("new"),delete:i,void:i,throw:i,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:i,export:e("export"),import:e("import"),extends:i,await:i,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,getActionTime:o,getActionEstimatedSuccessChance:o,getActionCountRemaining:o,getActionMaxLevel:o,getActionCurrentLevel:o,getActionAutolevel:o,getActionRepGain:o,setActionAutolevel:o,setActionLevel:o,getRank: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,getBonusTime:o,codingcontract:o,attempt:o,getContractType:o,getData:o,getDescription:o,getNumTriesRemaining:o}}(),m=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function d(e,t,n){return i=e,a=n,t}function g(e,t){var n,i=e.next();if('"'==i||"'"==i)return t.tokenize=(n=i,function(e,t){var i,a=!1;if(s&&"@"==e.peek()&&e.match(h))return t.tokenize=g,d("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=n||a);)a=!a&&"\\"==i;return a||(t.tokenize=g),d("string","string")}),t.tokenize(e,t);if("."==i&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return d("number","number");if("."==i&&e.match(".."))return d("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(i))return d(i);if("="==i&&e.eat(">"))return d("=>","operator");if("0"==i&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return d("number","number");if(/\d/.test(i))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),d("number","number");if("/"==i)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,i=!1;null!=(t=e.next());){if(!n){if("/"==t&&!i)return;"["==t?i=!0:i&&"]"==t&&(i=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),d("regexp","string-2")):(e.eat("="),d("operator","operator",e.current()));if("`"==i)return t.tokenize=y,y(e,t);if("#"==i)return e.skipToEnd(),d("error","error");if(m.test(i))return">"==i&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=i&&"="!=i||e.eat("="):/[<>*+\-]/.test(i)&&(e.eat(i),">"==i&&e.eat(i))),d("operator","operator",e.current());if(u.test(i)){e.eatWhile(u);var a=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(a)){var r=p[a];return d(r.type,r.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,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=g;break}i="*"==n}return d("comment","comment")}function y(e,t){for(var n,i=!1;null!=(n=e.next());){if(!i&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}i=!i&&"\\"==n}return d("quasi","string-2",e.current())}var f="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));i&&(n=i.index)}for(var a=0,r=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),l=f.indexOf(s);if(l>=0&&l<3){if(!a){++o;break}if(0==--a){"("==s&&(r=!0);break}}else if(l>=3&&l<6)++a;else if(u.test(s))r=!0;else{if(/["'\/]/.test(s))return;if(r&&!a){++o;break}}}r&&!a&&(t.fatArrowAt=o)}}var E={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function v(e,t,n,i,a,r){this.indented=e,this.column=t,this.type=n,this.prev=a,this.info=r,null!=i&&(this.align=i)}function k(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var i=e.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==t)return!0}var O={state:null,column:null,marked:null,cc:null};function C(){for(var e=arguments.length-1;e>=0;e--)O.cc.push(arguments[e])}function T(){return C.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=O.state;if(O.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var i=function e(t,n){if(n){if(n.block){var i=e(t,n.prev);return i?i==n.prev?n:new A(i,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!=i)return void(t.context=i)}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(){O.state.context=new A(O.state.context,O.state.localVars,!1),O.state.localVars=x}function N(){O.state.context=new A(O.state.context,O.state.localVars,!0),O.state.localVars=null}function I(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}function L(e,t){var n=function(){var n=O.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var a=n.lexical;a&&")"==a.type&&a.align;a=a.prev)i=a.indented;n.lexical=new v(i,O.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function D(){var e=O.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?T():";"==e||"}"==n||")"==n||"]"==n?C():T(t)}}function j(e,t){return"var"==e?T(L("vardef",t),fe,B(";"),D):"keyword a"==e?T(L("form"),H,j,D):"keyword b"==e?T(L("form"),j,D):"keyword d"==e?O.stream.match(/^\s*$/,!1)?T():T(L("stat"),K,B(";"),D):"debugger"==e?T(B(";")):"{"==e?T(L("}"),N,oe,D,I):";"==e?T():"if"==e?("else"==O.state.lexical.info&&O.state.cc[O.state.cc.length-1]==D&&O.state.cc.pop()(),T(L("form"),H,j,D,Ce)):"function"==e?T(we):"for"==e?T(L("form"),Te,j,D):"class"==e||c&&"interface"==t?(O.marked="keyword",T(L("form","class"==e?e:t),Le,D)):"variable"==e?c&&"declare"==t?(O.marked="keyword",T(j)):c&&("module"==t||"enum"==t||"type"==t)&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword","enum"==t?T(Ye):"type"==t?T(Re,B("operator"),ue,B(";")):T(L("form"),be,B("{"),L("}"),oe,D,D)):c&&"namespace"==t?(O.marked="keyword",T(L("form"),F,j,D)):c&&"abstract"==t?(O.marked="keyword",T(j)):T(L("stat"),Z):"switch"==e?T(L("form"),H,B("{"),L("}","switch"),N,oe,D,D,I):"case"==e?T(F,B(":")):"default"==e?T(B(":")):"catch"==e?T(L("form"),R,W,j,D,I):"export"==e?T(L("stat"),We,D):"import"==e?T(L("stat"),Ue,D):"async"==e?T(j):"@"==t?T(F,j):C(L("stat"),F,B(";"),D)}function W(e){if("("==e)return T(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?C():T(L(")"),F,B(")"),D)}function G(e,t,n){if(O.state.fatArrowAt==O.stream.start){var i=n?J:V;if("("==e)return T(R,L(")"),ae(Ne,")"),D,B("=>"),i,I);if("variable"==e)return C(R,be,B("=>"),i,I)}var a=n?$:q;return E.hasOwnProperty(e)?T(a):"function"==e?T(we,a):"class"==e||c&&"interface"==t?(O.marked="keyword",T(L("form"),Ie,D)):"keyword c"==e||"async"==e?T(n?U:F):"("==e?T(L(")"),K,B(")"),D,a):"operator"==e||"spread"==e?T(n?U:F):"["==e?T(L("]"),$e,D,a):"{"==e?re(te,"}",null,a):"quasi"==e?C(Y,a):"new"==e?T(function(e){return function(t){return"."==t?T(e?Q:X):"variable"==t&&c?T(ge,e?$:q):C(e?U:F)}}(n)):"import"==e?T(F):T()}function K(e){return e.match(/[;\}\)\],]/)?C():C(F)}function q(e,t){return","==e?T(F):$(e,t,!1)}function $(e,t,n){var i=0==n?q:$,a=0==n?F:U;return"=>"==e?T(R,n?J:V,I):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?T(i):c&&"<"==t&&O.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?T(L(">"),ae(ue,">"),D,i):"?"==t?T(F,B(":"),a):T(a):"quasi"==e?C(Y,i):";"!=e?"("==e?re(U,")","call",i):"."==e?T(ee,i):"["==e?T(L("]"),K,B("]"),D,i):c&&"as"==t?(O.marked="keyword",T(ue,i)):"regexp"==e?(O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),T(a)):void 0:void 0}function Y(e,t){return"quasi"!=e?C():"${"!=t.slice(t.length-2)?T(Y):T(F,z)}function z(e){if("}"==e)return O.marked="string-2",O.state.tokenize=y,T(Y)}function V(e){return b(O.stream,O.state),C("{"==e?j:F)}function J(e){return b(O.stream,O.state),C("{"==e?j:U)}function X(e,t){if("target"==t)return O.marked="keyword",T(q)}function Q(e,t){if("target"==t)return O.marked="keyword",T($)}function Z(e){return":"==e?T(D,j):C(q,B(";"),D)}function ee(e){if("variable"==e)return O.marked="property",T()}function te(e,t){if("async"==e)return O.marked="property",T(te);if("variable"==e||"keyword"==O.style){return O.marked="property","get"==t||"set"==t?T(ne):(c&&O.state.fatArrowAt==O.stream.start&&(n=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+n[0].length),T(ie));var n}else{if("number"==e||"string"==e)return O.marked=s?"property":O.style+" property",T(ie);if("jsonld-keyword"==e)return T(ie);if(c&&P(t))return O.marked="keyword",T(te);if("["==e)return T(F,se,B("]"),ie);if("spread"==e)return T(U,ie);if("*"==t)return O.marked="keyword",T(te);if(":"==e)return C(ie)}}function ne(e){return"variable"!=e?C(ie):(O.marked="property",T(we))}function ie(e){return":"==e?T(U):"("==e?C(we):void 0}function ae(e,t,n){function i(a,r){if(n?n.indexOf(a)>-1:","==a){var o=O.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),T(function(n,i){return n==t||i==t?C():C(e)},i)}return a==t||r==t?T():n&&n.indexOf(";")>-1?C(e):T(B(t))}return function(n,a){return n==t||a==t?T():C(e,i)}}function re(e,t,n){for(var i=3;i<arguments.length;i++)O.cc.push(arguments[i]);return T(L(t,n),ae(e,t),D)}function oe(e){return"}"==e?T():C(j,oe)}function se(e,t){if(c){if(":"==e||"in"==t)return T(ue);if("?"==t)return T(se)}}function le(e){if(c&&":"==e)return O.stream.match(/^\s*\w+\s+is\b/,!1)?T(F,ce,ue):T(ue)}function ce(e,t){if("is"==t)return O.marked="keyword",T()}function ue(e,t){return"keyof"==t||"typeof"==t||"infer"==t?(O.marked="keyword",T("typeof"==t?U:ue)):"variable"==e||"void"==t?(O.marked="type",T(de)):"string"==e||"number"==e||"atom"==e?T(de):"["==e?T(L("]"),ae(ue,"]",","),D,de):"{"==e?T(L("}"),ae(me,"}",",;"),D,de):"("==e?T(ae(he,")"),pe,de):"<"==e?T(ae(ue,">"),ue):void 0}function pe(e){if("=>"==e)return T(ue)}function me(e,t){return"variable"==e||"keyword"==O.style?(O.marked="property",T(me)):"?"==t||"number"==e||"string"==e?T(me):":"==e?T(ue):"["==e?T(B("variable"),se,B("]"),me):"("==e?C(xe,me):void 0}function he(e,t){return"variable"==e&&O.stream.match(/^\s*[?:]/,!1)||"?"==t?T(he):":"==e?T(ue):"spread"==e?T(he):C(ue)}function de(e,t){return"<"==t?T(L(">"),ae(ue,">"),D,de):"|"==t||"."==e||"&"==t?T(ue):"["==e?T(ue,B("]"),de):"extends"==t||"implements"==t?(O.marked="keyword",T(ue)):"?"==t?T(ue,B(":"),ue):void 0}function ge(e,t){if("<"==t)return T(L(">"),ae(ue,">"),D,de)}function _e(){return C(ue,ye)}function ye(e,t){if("="==t)return T(ue)}function fe(e,t){return"enum"==t?(O.marked="keyword",T(Ye)):C(be,se,ke,Oe)}function be(e,t){return c&&P(t)?(O.marked="keyword",T(be)):"variable"==e?(M(t),T()):"spread"==e?T(be):"["==e?re(ve,"]"):"{"==e?re(Ee,"}"):void 0}function Ee(e,t){return"variable"!=e||O.stream.match(/^\s*:/,!1)?("variable"==e&&(O.marked="property"),"spread"==e?T(be):"}"==e?C():"["==e?T(F,B("]"),B(":"),Ee):T(B(":"),be,ke)):(M(t),T(ke))}function ve(){return C(be,ke)}function ke(e,t){if("="==t)return T(U)}function Oe(e){if(","==e)return T(fe)}function Ce(e,t){if("keyword b"==e&&"else"==t)return T(L("form","else"),j,D)}function Te(e,t){return"await"==t?T(Te):"("==e?T(L(")"),Se,B(")"),D):void 0}function Se(e){return"var"==e?T(fe,B(";"),Pe):";"==e?T(Pe):"variable"==e?T(Me):C(F,B(";"),Pe)}function Me(e,t){return"in"==t||"of"==t?(O.marked="keyword",T(F)):T(q,Pe)}function Pe(e,t){return";"==e?T(Ae):"in"==t||"of"==t?(O.marked="keyword",T(F)):C(F,B(";"),Ae)}function Ae(e){")"!=e&&T(F)}function we(e,t){return"*"==t?(O.marked="keyword",T(we)):"variable"==e?(M(t),T(we)):"("==e?T(R,L(")"),ae(Ne,")"),D,le,j,I):c&&"<"==t?T(L(">"),ae(_e,">"),D,we):void 0}function xe(e,t){return"*"==t?(O.marked="keyword",T(xe)):"variable"==e?(M(t),T(xe)):"("==e?T(R,L(")"),ae(Ne,")"),D,le,I):c&&"<"==t?T(L(">"),ae(_e,">"),D,xe):void 0}function Re(e,t){return"keyword"==e||"variable"==e?(O.marked="type",T(Re)):"<"==t?T(L(">"),ae(_e,">"),D):void 0}function Ne(e,t){return"@"==t&&T(F,Ne),"spread"==e?T(Ne):c&&P(t)?(O.marked="keyword",T(Ne)):C(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),T(De)}function De(e,t){return"<"==t?T(L(">"),ae(_e,">"),D,De):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(O.marked="keyword"),T(c?ue:F,De)):"{"==e?T(L("}"),Be,D):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&P(t))&&O.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(O.marked="keyword",T(Be)):"variable"==e||"keyword"==O.style?(O.marked="property",T(c?je:we,Be)):"number"==e||"string"==e?T(c?je:we,Be):"["==e?T(F,se,B("]"),c?je:we,Be):"*"==t?(O.marked="keyword",T(Be)):c&&"("==e?C(xe,Be):";"==e||","==e?T(Be):"}"==e?T():"@"==t?T(F,Be):void 0}function je(e,t){if("?"==t)return T(je);if(":"==e)return T(ue,ke);if("="==t)return T(U);var n=O.state.lexical.prev,i=n&&"interface"==n.info;return C(i?xe:we)}function We(e,t){return"*"==t?(O.marked="keyword",T(qe,B(";"))):"default"==t?(O.marked="keyword",T(F,B(";"))):"{"==e?T(ae(Fe,"}"),qe,B(";")):C(j)}function Fe(e,t){return"as"==t?(O.marked="keyword",T(B("variable"))):"variable"==e?C(U,Fe):void 0}function Ue(e){return"string"==e?T():"("==e?C(F):C(He,Ge,qe)}function He(e,t){return"{"==e?re(He,"}"):("variable"==e&&M(t),"*"==t&&(O.marked="keyword"),T(Ke))}function Ge(e){if(","==e)return T(He,Ge)}function Ke(e,t){if("as"==t)return O.marked="keyword",T(He)}function qe(e,t){if("from"==t)return O.marked="keyword",T(F)}function $e(e){return"]"==e?T():C(ae(U,"]"))}function Ye(){return C(L("form"),be,B("{"),L("}"),ae(ze,"}"),D,D)}function ze(){return C(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 v((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"==i?n:(t.lastType="operator"!=i||"++"!=a&&"--"!=a?i:"incdec",function(e,t,n,i,a){var r=e.cc;for(O.state=e,O.stream=a,O.marked=null,O.cc=r,O.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var o=r.length?r.pop():l?F:j;if(o(n,i)){for(;r.length&&r[r.length-1].lex;)r.pop()();return O.marked?O.marked:"variable"==n&&k(e,i)?"variable-2":t}}}(t,n,i,a,e))},indent:function(t,i){if(t.tokenize==_)return e.Pass;if(t.tokenize!=g)return 0;var a,s=i&&i.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(i))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==D)l=l.prev;else if(u!=Ce)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(a=t.cc[t.cc.length-1])&&(a==q||a==$)&&!/^[,\.=+\-*:?[\(]/.test(i));)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,i)?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(i)?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(50))},,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 i=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},r.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};i.inherits(r,a),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 i=e("../lib/oop"),a=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|getRank|getSkillPoints|getSkillLevel|getSkillUpgradeCost|upgradeSkill|getTeamSize|getCity|setTeamSize|getCityEstimatedPopulation|getCityEstimatedCommunities|getCityChaos|switchCity|getStamina|joinBladeburnerFaction|getBonusTime|codingcontract|attempt|getContractType|getData|getDescription|getNumTriesRemaining";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:[a.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:[a.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 i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},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(a,"doc-",[a.getEndRule("no_regex")]),this.normalizeRules()};function c(e){return[{token:"comment",regex:/\/\*/,next:[a.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[a.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}i.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 i=e("../range").Range,a=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 a=n[1].length,r=e.findMatchingBracket({row:t,column:a});if(!r||r.row==t)return 0;var o=this.$getIndent(e.getLine(r.row));e.replace(new i(t,0,t,a-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(a.prototype),t.MatchingBraceOutdent=a}),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 i=e("../../lib/oop"),a=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)))};i.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 i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var a=this._getFoldWidgetBase(e,t,n);return!a&&this.startRegionRe.test(i)?"start":a},this.getFoldWidgetRange=function(e,t,n,i){var a,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(a=r.match(this.foldingStartMarker)){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(i?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(a=r.match(this.foldingStopMarker))){o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=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(i>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(i==c)break}s=t}}return new a(r,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=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 a(o,i,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,i){"use strict";var a=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};a.inherits(p,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),a=this.getTokenizer().getLineTokens(t,e),r=a.tokens,o=a.state;if(r.length&&"comment"==r[r.length-1].type)return i;if("start"==e||"no_regex"==e)(s=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(i+=n);else if("doc-start"==e){if("start"==o||"no_regex"==o)return"";var s;(s=t.match(/^\s*(\/?)\*/))&&(s[1]&&(i+=" "),i+="* ")}return i},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(246),"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 i=n(17);function a(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function r(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:()=>i.getRandomInt(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let n=2,i=e;for(;i>n;)i%n==0?(i=Math.round(i/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.",`${e.toString()}`].join(" "),difficulty:1,gen:()=>{const e=i.getRandomInt(5,40),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=i.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:()=>i.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 i=t;i<=e;++i)n[i]+=n[i-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=i.getRandomInt(1,10),t=i.getRandomInt(1,10),n=[];n.length=e;for(let i=0;i<e;++i)n[i]=[],n[i].length=t;for(let a=0;a<e;++a)for(let e=0;e<t;++e)n[a][e]=i.getRandomInt(1,50);return n},name:"Spiralize Matrix",numTries:10,solver:(e,t)=>{const n=[];let i=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[i][t],++l;if(++i>r)break;for(let t=i;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<i)break;for(let t=r;t>=i;t--)n[l]=e[t][o],++l;if(++o>s)break}const c=a(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=i.getRandomInt(1,25),t=[];t.length=e;for(let e=0;e<t.length;++e)Math.random()<.2?t[e]=0:t[e]=i.getRandomInt(0,10);return t},name:"Array Jumping Game",numTries:1,solver:(e,t)=>{const n=e.length;let i=0;for(let t=0;i<n&&i<=t;++i)t=Math.max(i+e[i],t);const a=i===n;return!("1"!==t||!a)||"0"===t&&!a}},{desc:e=>["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${r(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=i.getRandomInt(1,20);for(let n=0;n<t;++n){const t=i.getRandomInt(1,25),n=t+i.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 i=[];let o=n[0][0],s=n[0][1];for(const e of n)e[0]<=s?s=Math.max(s,e[1]):(i.push([o,s]),o=e[0],s=e[1]);i.push([o,s]);const l=r(i),c=t.replace(/\s/g,"");return l===c||l===a(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+=i.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 i=1;i<=3;++i)for(let a=1;a<=3;++a)for(let r=1;r<=3;++r)if(t+i+a+r===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+i),10),l=parseInt(e.substring(t+i,t+i+a),10),c=parseInt(e.substring(t+i+a,t+i+a+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 i=a(t).replace(/\s/g,"").split(",");if(i.length!==n.length)return!1;for(const e of i)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=i.getRandomInt(1,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=i.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader I",numTries:5,solver:(e,t)=>{let n=0,i=0;for(let t=1;t<e.length;++t)n=Math.max(0,n+=e[t]-e[t-1]),i=Math.max(n,i);return i.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=i.getRandomInt(1,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=i.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=i.getRandomInt(1,50),t=[];t.length=e;for(let n=0;n<e;++n)t[n]=i.getRandomInt(1,200);return t},name:"Algorithmic Stock Trader III",numTries:10,solver:(e,t)=>{let n=Number.MIN_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,a=0,r=0;for(const t of e)r=Math.max(r,i+t),i=Math.max(i,a-t),a=Math.max(a,n+t),n=Math.max(n,-1*t);return r.toString()===t}}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(25);t.ProductRatingWeights={[i.Industries.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[i.Industries.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[i.Industries.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[i.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},[i.Industries.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[i.Industries.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[i.Industries.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[i.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 i=n(114);t.Node=class{constructor(e={cost:0,text:""}){if(this.children=[],this.cost=0,this.researched=!1,this.parent=null,this.text="",null==i.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=i.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>${this.cost} 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")}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 a=n.shift();if(null==a||!a.researched)continue;const r=i.ResearchMap[a.text];if(null==r){console.warn(`Invalid Research name in node: ${a.text}`);continue}const o=r[e];if(null!=o){t*=o;for(let e=0;e<a.children.length;++e)n.push(a.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:"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:1e4,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:"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."},{name:"Market-TA.II",cost:4e4,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."},{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."}]},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.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.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 i=n(114),a=n(252);function r(e){const t=i.ResearchMap[e];if(null==t)throw new Error(`Invalid research name: ${e}`);return new a.Node({text:t.name,cost:t.cost})}t.getBaseResearchTreeCopy=function(){const e=new a.ResearchTree,t=r("Hi-Tech R&D Laboratory"),n=r("AutoBrew"),i=r("AutoPartyManager"),o=r("Automatic Drug Administration"),s=r("CPH4 Injections"),l=r("Drones"),c=r("Drones - Assembly"),u=r("Drones - Transport"),p=r("Go-Juice"),m=r("JoyWire"),h=r("Market-TA.I"),d=r("Market-TA.II"),g=r("Overclock"),_=r("Self-Correcting Assemblers"),y=r("Sti.mu");return o.addChild(p),o.addChild(s),l.addChild(c),l.addChild(u),h.addChild(d),g.addChild(y),t.addChild(n),t.addChild(i),t.addChild(o),t.addChild(l),t.addChild(m),t.addChild(h),t.addChild(g),t.addChild(_),e.setRoot(t),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5),a=n(41),r={},o={},s={},l={},c={},u={},p={},m={},h={},d={},g={},_={},y={},f={},b={},E={},v={},k={};a.SoftwareCompanyPositions.forEach(e=>{r[e]=!0,l[e]=!0}),a.ITCompanyPositions.forEach(e=>{o[e]=!0,l[e]=!0}),a.NetworkEngineerCompanyPositions.forEach(e=>{s[e]=!0,l[e]=!0}),l[a.SecurityEngineerCompanyPositions[0]]=!0,a.BusinessCompanyPositions.forEach(e=>{c[e]=!0}),a.SecurityCompanyPositions.forEach(e=>{p[e]=!0}),a.AgentCompanyPositions.forEach(e=>{u[e]=!0}),a.SoftwareConsultantCompanyPositions.forEach(e=>{m[e]=!0}),a.BusinessConsultantCompanyPositions.forEach(e=>{h[e]=!0});for(let e=0;e<a.SoftwareCompanyPositions.length;++e){const t=a.SoftwareCompanyPositions[e];e<=5&&(d[t]=!0),e<=3&&(g[t]=!0)}for(let e=0;e<a.BusinessCompanyPositions.length;++e){const t=a.BusinessCompanyPositions[e];e<=3&&(_[t]=!0)}y[a.MiscCompanyPositions[0]]=!0,f[a.MiscCompanyPositions[1]]=!0,b[a.PartTimeCompanyPositions[0]]=!0,E[a.PartTimeCompanyPositions[1]]=!0,v[a.BusinessCompanyPositions[3]]=!0,k[a.BusinessCompanyPositions[5]]=!0,t.companiesMetadata=[{name:i.Locations.AevumECorp,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:i.Locations.Sector12MegaCorp,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:i.Locations.AevumBachmanAndAssociates,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:2.6,salaryMultiplier:2.6,jobStatReqOffset:224},{name:i.Locations.Sector12BladeIndustries,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:224},{name:i.Locations.VolhavenNWO,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:249},{name:i.Locations.AevumClarkeIncorporated,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:i.Locations.VolhavenOmniTekIncorporated,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:i.Locations.Sector12FourSigma,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:2.5,salaryMultiplier:2.5,jobStatReqOffset:224},{name:i.Locations.ChongqingKuaiGongInternational,info:"",companyPositions:Object.assign({},l,c,p),expMultiplier:2.2,salaryMultiplier:2.2,jobStatReqOffset:224},{name:i.Locations.AevumFulcrumTechnologies,info:"",companyPositions:Object.assign({},l,c),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:224},{name:i.Locations.IshimaStormTechnologies,info:"",companyPositions:Object.assign({},l,m,c),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:i.Locations.NewTokyoDefComm,info:"",companyPositions:Object.assign({},k,l,m),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:i.Locations.VolhavenHeliosLabs,info:"",companyPositions:Object.assign({},k,l,m),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:i.Locations.NewTokyoVitaLife,info:"",companyPositions:Object.assign({},l,c,m),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:i.Locations.Sector12IcarusMicrosystems,info:"",companyPositions:Object.assign({},l,c,m),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:i.Locations.Sector12UniversalEnergy,info:"",companyPositions:Object.assign({},l,c,m),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:199},{name:i.Locations.AevumGalacticCybersystems,info:"",companyPositions:Object.assign({},l,c,m),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:i.Locations.AevumAeroCorp,info:"",companyPositions:Object.assign({},k,v,l,p),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:i.Locations.VolhavenOmniaCybersystems,info:"",companyPositions:Object.assign({},k,v,l,p),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:i.Locations.ChongqingSolarisSpaceSystems,info:"",companyPositions:Object.assign({},k,v,l,p),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:i.Locations.Sector12DeltaOne,info:"",companyPositions:Object.assign({},k,v,l,p),expMultiplier:1.6,salaryMultiplier:1.6,jobStatReqOffset:199},{name:i.Locations.NewTokyoGlobalPharmaceuticals,info:"",companyPositions:Object.assign({},l,c,m,p),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:224},{name:i.Locations.IshimaNovaMedical,info:"",companyPositions:Object.assign({},l,c,m,p),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:i.Locations.Sector12CIA,info:"",companyPositions:Object.assign({},d,s,o,p,u),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:i.Locations.Sector12NSA,info:"",companyPositions:Object.assign({},d,s,o,p,u),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:i.Locations.AevumWatchdogSecurity,info:"",companyPositions:Object.assign({},d,s,o,p,u,m),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:124},{name:i.Locations.VolhavenLexoCorp,info:"",companyPositions:Object.assign({},l,m,c,p),expMultiplier:1.4,salaryMultiplier:1.4,jobStatReqOffset:99},{name:i.Locations.AevumRhoConstruction,info:"",companyPositions:Object.assign({},g,_),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:49},{name:i.Locations.Sector12AlphaEnterprises,info:"",companyPositions:Object.assign({},g,_,m),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:99},{name:i.Locations.AevumPolice,info:"",companyPositions:Object.assign({},p,g),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:99},{name:i.Locations.VolhavenSysCoreSecurities,info:"",companyPositions:Object.assign({},l),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:124},{name:i.Locations.VolhavenCompuTek,info:"",companyPositions:Object.assign({},l),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:i.Locations.AevumNetLinkTechnologies,info:"",companyPositions:Object.assign({},l),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:99},{name:i.Locations.Sector12CarmichaelSecurity,info:"",companyPositions:Object.assign({},l,u,p),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:i.Locations.Sector12FoodNStuff,info:"",companyPositions:Object.assign({},f,E),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:i.Locations.Sector12JoesGuns,info:"",companyPositions:Object.assign({},f,E),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:i.Locations.IshimaOmegaSoftware,info:"",companyPositions:Object.assign({},r,m,o),expMultiplier:1.1,salaryMultiplier:1.1,jobStatReqOffset:49},{name:i.Locations.NewTokyoNoodleBar,info:"",companyPositions:Object.assign({},y,b),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(41);t.companyPositionMetadata=[{name:i.SoftwareCompanyPositions[0],nextPosition:i.SoftwareCompanyPositions[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:i.SoftwareCompanyPositions[1],nextPosition:i.SoftwareCompanyPositions[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:i.SoftwareCompanyPositions[2],nextPosition:i.SoftwareCompanyPositions[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:i.SoftwareCompanyPositions[3],nextPosition:i.SoftwareCompanyPositions[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:i.SoftwareCompanyPositions[4],nextPosition:i.SoftwareCompanyPositions[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:i.SoftwareCompanyPositions[5],nextPosition:i.SoftwareCompanyPositions[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:i.SoftwareCompanyPositions[6],nextPosition:i.SoftwareCompanyPositions[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:i.SoftwareCompanyPositions[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:i.ITCompanyPositions[0],nextPosition:i.ITCompanyPositions[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:i.ITCompanyPositions[1],nextPosition:i.ITCompanyPositions[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:i.ITCompanyPositions[2],nextPosition:i.ITCompanyPositions[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:i.ITCompanyPositions[3],nextPosition:i.SoftwareCompanyPositions[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:i.SecurityEngineerCompanyPositions[0],nextPosition:i.SoftwareCompanyPositions[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:i.NetworkEngineerCompanyPositions[0],nextPosition:i.NetworkEngineerCompanyPositions[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:i.NetworkEngineerCompanyPositions[1],nextPosition:i.SoftwareCompanyPositions[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:i.BusinessCompanyPositions[0],nextPosition:i.BusinessCompanyPositions[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:i.BusinessCompanyPositions[1],nextPosition:i.BusinessCompanyPositions[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:i.BusinessCompanyPositions[2],nextPosition:i.BusinessCompanyPositions[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:i.BusinessCompanyPositions[3],nextPosition:i.BusinessCompanyPositions[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:i.BusinessCompanyPositions[4],nextPosition:i.BusinessCompanyPositions[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:i.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:i.SecurityCompanyPositions[0],nextPosition:i.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:i.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:i.SecurityCompanyPositions[2],nextPosition:i.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:i.SecurityCompanyPositions[3],nextPosition:i.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:i.SecurityCompanyPositions[4],nextPosition:i.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:i.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:i.AgentCompanyPositions[0],nextPosition:i.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:i.AgentCompanyPositions[1],nextPosition:i.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:i.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:i.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:i.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:i.SoftwareConsultantCompanyPositions[0],nextPosition:i.SoftwareConsultantCompanyPositions[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:i.SoftwareConsultantCompanyPositions[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:i.BusinessConsultantCompanyPositions[0],nextPosition:i.BusinessConsultantCompanyPositions[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:i.BusinessConsultantCompanyPositions[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:i.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:i.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